When the screen rotates, currently the startActivityForResult() within RequestPermissionActivity could be called multiple times, so the multiple RequestPermissionHelperActivity will be created, which caused the issue. Replace RequestPermissionHelperActivity with AlertDialog (as an unfinished TODO of RequestPermissionHelperActivity) can fix this issue. Fix: 243601277 Test: Manually with adb shell commands Test: Unit test Change-Id: If1e2b2807b69a87bbcfffa543ee0da134d4c4312
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.