This makes trust agent preferences follow the behavior of other features that can be disabled by device admins, otherwise the preference is simply greyed out without context until the user clicks on the preference. Bug: 319095039 Test: Covered by TrustAgentListPreferenceControllerTest#onResume_restrictedPreferenceShouldUseAdminDisabledSummary Test: atest SettingsRoboTests:com.android.settings.security --host Test: manually validated that disabled admin policy results in showing "Controlled by admin" as the summary Flag: EXEMPT bugfix for single preference in settings Change-Id: I89f052cf2479a120d8b5b223414162f129cde89e
Running Settings Robolectric tests
The full suite
$ croot
$ make RunSettingsRoboTests
Running a single test class
$ croot
$ make RunSettingsRoboTests ROBOTEST_FILTER=<ClassName>
For example:
make RunSettingsRoboTests ROBOTEST_FILTER=CodeInspectionTest
You can also use partial class name in ROBOTEST_FILTER. If the partial class name matches multiple file names, all of them will be executed.