Even though we unregister contentObserver in onPause and register in onResume, callback still be called while fragment is detached. Anyhow add a null check in settings to stop crash Fixes: 131905853 Test: RunSettingsRoboTests Change-Id: I8c0c2c04c3b8d942e0c97cf71a7d3e735a24b467
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.