Set the AdvancedAppInfoPreferenceController preference to disabled when the app is uninstalled for the current user. This results in every preference under the advanced section to be greyed out, avoiding the null pointer exception. Bug: 238839849 Test: Unit tests && Manual test on multiple apps Change-Id: I5cdf47575da96f53915f5b552213bf0176f9d1d7
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.