Rather than check for the state of the work profile in
LockScreenNotificationPreferenceController#handlePreferenceTreeClick, do so in
the RestrictedListPreference#performClick.
The drawback of checking the state in handlePreferenceTreeClick is that the
preferences are displayed first and then the requirement to unlock/enable the
work profile is displayed on top of it.
This is rather poor UX, so switch to doing the check in performClick and
returning early if the work profile needs to be unlocked/enabled.
This is similar to Patchset 1 from ag/3805482.
The main difference is that the user is returned to the settings screen
both after enabling the work profile and unlocking it.
Test: Manually with TestDPC
Test: atest SettingsRoboTests:RestrictedListPreferenceTest
Bug: 77408805
Merged-In: Id168911b082fffac193cd7c7a658ab92d6ce2c15
Change-Id: I0a3a4ec4dda78e28ee88a11d383eda49e9cf50a6
- Added a footer in feature flags, displaying "Experimental" during
onStart.
- Ui test to verify the text shows correctly.
Change-Id: Ibf4f79cb3c12e460384e83201a16005a18d6437d
Fixes: 78887450
Test: atest
- Add null check for the package info when trying to retrieve the
install app state. During package update, the package info might becomes
null. The App info activity will finish in that case, but this method
might be called before the activity actually finishes.
Change-Id: I18ff448666dfb403bb6693fccd3e54276db36f37
Fixes: 78257414
Test: make RunSettingsRoboTests
- Move preference related logic to controllers.
- Add some test cases for controllers.
Test: manual
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.nfc
make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.core
atest SettingsGatewayTest UniquePreferenceTest
Change-Id: I061a194c170f63fab51974f26c24be43d67d6f6f
Developer options page crash for restricted users because the page
removes all preferences while DashboardFeatureProvider tries to
manipulate preferences on screen.
Added a null check to skip changin prefs in DashboardFeatureProvider
because the pref is going to be removed either way.
Change-Id: Ic83fd0dfb2a906605fb1d992d7b36c2163630e89
Fixes: 78655710
Test: robotests
As of ag/3932176 the slice indexer now queries getSummary() for each
controller. So we need to create all necessary objects before
getSummary(). In this case, the PSCD object.
Change-Id: I0162996be37d740f1e450880bf4698acd94ca0ad
Fixes: 78897071
Test: atest
Rather than check for the state of the work profile in
LockScreenNotificationPreferenceController#handlePreferenceTreeClick, do so in
the RestrictedListPreference#performClick.
The drawback of checking the state in handlePreferenceTreeClick is that the
preferences are displayed first and then the requirement to unlock/enable the
work profile is displayed on top of it.
This is rather poor UX, so switch to doing the check in performClick and
returning early if the work profile needs to be unlocked/enabled.
This is similar to Patchset 1 from ag/3805482.
The main difference is that the user is returned to the settings screen
both after enabling the work profile and unlocking it.
Test: Manually with TestDPC
Test: atest SettingsRoboTests:RestrictedListPreferenceTest
Bug: 77408805
Change-Id: Id168911b082fffac193cd7c7a658ab92d6ce2c15
- Build a controller to generate/manage a list of preferences.
- Move some logics to the controller and add tests.
- Rename to ChooseAccountFragment.
Bug: 73899467
Test: make RunSettingsRoboTests -j
atest UniquePreferenceTest SettingsGatewayTest
Change-Id: Id2906c4b922ef159d08c803b976671264c54665f
* For fix the conflicts in pi-dev, cherry pick the ag/3944480 in
master and merge the conflict.
* Remove the gear icon in "currently connected" section.
* Change the tapping event in "currently connected" section.
When tapping device in this section, take user to device detail page.
* Add test to verify when ConnectedBluetoothDeviceUpdater add preference
the shouldHideSecondTarget() is return true.
Bug: 78490845
Test: make -j40 RunSettingsRoboTests
Change-Id: I25f8455def3c38e24dea9af9e9e29ba37c250f67
If job has been stopped by any reason, we should cancel the background
thread, otherwise it will throw SecurityException when dequeuing from
JobParams.
This CL adds a lock to synchronize the method and stops dequeue work
if job has been canceled.
Change-Id: I7732b7f7d444a55a4b4ba6645cd2c16b6f840a6c
Merged-In: I7732b7f7d444a55a4b4ba6645cd2c16b6f840a6c
Fixes: 77968649
Test: RunSettingsRoboTests
- Migrate FirmwareVersionPreferenceController to BasePreferenceController class.
- Because slices feature needs an unique uri,
we should avoid same firmware key in my_device_info.xml and device_info_settings.xml.
- Modify test case for new firmware version controller.
Test: slice uri > content://android.settings.slices/intent/my_device_firmware_version
Test: make RunSettingsRoboTests -j
atest UniquePreferenceTest SettingsGatewayTest
Change-Id: If516bbdb3ddb823db9909123ef694a2beaf5dc66