It occurs NPE in invoking refreshUi() of AppButtonsPreferenceController when user fully install the instant app from google play and then directly open app info from the shortcut suggestion in launcher. Root cause: AppButtonsPreferenceController.refreshUi() will be invoked when user directly open app info from the shortcut suggestion in launcher. In refreshUi(), we will update the information of button preference, but the preferences will not be initialized if device existed an instant version for the app. Solution: Check button preference and initial them if need in refreshUi(). Fixes: 137854835 Test: visual, robotests Change-Id: Id5c3e53b9db2683cab970c10eace7925d889eea3
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.