Only add/or remove preferences when absolutely needed.
Also fix a 'load data from backend' method that wasn't.
Fixes: 216747934
Test: ZenModeAutomaticRulesPreferenceControllerTest
Test: view schedules page
Test: add schedule
Test: remove schedule
Test: view schedule child page and return to schedules page
Change-Id: I237c2ca7ea89ee6e42354470a76712068a7f4dd7
Test: Unit - atest SettingsRoboTests
Test: Manual - Set PIN lock and enabled/disabled the setting to observe animation change during PIN entry
Bug: b/204799468
Merged-In: I587b993ef5515a075442e82ebafae88bebdffc20
Change-Id: I587b993ef5515a075442e82ebafae88bebdffc20
Before this CL, Magnification Settings can only be
launched from MagnificationPreferenceController.
This CL initializes FooterPreferenceController if the
parent class does not initialize it from Intent extras.
Bug: 268411305
Test: manual
make RunSettingsRoboTests ROBOTEST_FILTER=MagnificationGesturesPreferenceControllerTest
make RunSettingsRoboTests ROBOTEST_FILTER=ToggleScreenMagnificationPreferenceFragmentTest
Change-Id: I954739c39c823ce7fe0daa711743f729d182571b
- Query the last Hotspot password when security type is SECURITY_TYPE_OPEN and it will be used when the user changes to another security type
- If the last hotspot password is an empty string, then generate random password
Bug: 201789473
Test: manual test
atest -c WifiHotspotRepositoryTest
make RunSettingsRoboTests ROBOTEST_FILTER=WifiTetherPasswordPreferenceControllerTest
Change-Id: Id3a846099238433e7b6c8b934fa26a74df0dcb61
On the backend, the device config would already override the setting by
the UI.
(cherry picked from commit 65116faa29)
Bug: 269523554
Merged-In: Idd249e060a275b58a399349f202fc68b42964eb0
Change-Id: Idd249e060a275b58a399349f202fc68b42964eb0
- The method isAutoPinConfirmFeatureAvailable is changed to static, so refactoring the code to use it properly.
Bug: 270315296
Test: Manual Test
Test: atest AutoPinConfirmPreferenceControllerTest
Test: atest ChooseLockPasswordTest
Change-Id: Idecaeca296b9ae9acdd0c094dcbb736db31b74b3
Only the UM.isManagedProfile property should be used to determine
whether a user is a managed prfile.
There is no need to perform any additional check on top of
UM.isManagedProfile to make sure the user is a managed profile.
After removing the additional check as part of ag/21512484
DataBaseUtilsTest.isWorkProfile_withSystemUser_returnFalse test
is redundant.
Test: atest DataBaseUtilsTest -c
Bug: 270283369
Change-Id: Ic4fd7eef2ac24786e2a59db7dabc9daf4a7ce028
AccessibilityHearingAidPreferenceController can't be instantiated
correctly in tests with the lack of LocalBluetoothManager. This causes
null pointer exception when
AccessibilityHearingAidPreferenceController.setFragmentManager() is
called in AccessibilitySettings.onAttach().
Solution: Mocks the LocalBluetoothManager for tests to successfully
instantiate AccessibilityHearingAidPreferenceController to prevent null
pointer exception from happening.
Bug: 269407238
Test: atest AccessibilitySettingsTest
Change-Id: Ibcfffa10b46fd6e85c1b74b03343e5ee0e8843b3
1) Remove call to redisplay the api when registering our app listener -
this meant all preferences were always removed/readded on page load
because the app list isn't ready at that time
2) Stop rebuilding the UI for events we don't care about
3) Keep existing preferences when possible and just do the diff of prefs
that need to be added/removed
Fixes: 234298144
Test: ZenModeAddBypassingAppsPreferenceControllerTest
Test: ZenModeAllBypassingAppsPreferenceControllerTest
Test: manually view page; add & remove apps that have dnd breakthrough
Change-Id: I57b36d36135dd25d1d2fd73073cf6b7a033659a6
Only show the "additional info", which displays dream complications,
when supported by the user selected dream.
Test: make -j86 RunSettingsRoboTests
ROBOTEST_FILTER="com.android.settings.dream.DreamSettingsTest"
Test: verified on device switching between different dreams
Bug: 223860510
Fix: 223860510
Change-Id: I63872ea9ab9f42be47f8e2f7c3835b55056e6588
Add a configuration boolean to control whether or not to display
Media Vibration switch (default: display the switch).
This configuration can then be overriden by OEMs for devices
that don't support media vibration.
Bug: 268657239
Test: make RunSettingsRoboTests ROBOTEST_FILTER=
"com.android.settings.accessibility.MediaVibration"
Change-Id: I91857fbb04abc97b290559895010c3cbeef7ebab
Root cause: Portrait mode does not always respect the sw600dp qualifier and instead uses the phone (default) resources.
Solution: Using the product to customize the tablet and phone cases is better way than using the configuration qualifier.
Bug: 269130587
Test: Manual testing
Change-Id: I90cc44f1e9bccf8950a4d89f70119ba5e3c0bfdc
(cherry-pick of commit bea25c7513)