Due to FilesActivity set "android:documentLaunchMode="intoExisting", it will create new task when launched from Storage Setting page. When select FilesActivity task from recents & press back key, it will not back to settings page. Using startActivityForResult to set task as source task can fix task separated case. Change-Id: I26362928261a1a9c0e485a486be493423d1fcf61 Fixes: 33117269 Test: Manual Test: atest StorageItemPreferenceControllerTest
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.