This CL shuffles quite a bit of code around, but the effective differences are: * Unified shortcut updating code (language switch & backup restoration). * Shortcuts are also updated on boot (flagged by MODES_UI which will need this). * Removed usage of (long obsolete) AsyncTask. A further CL will add some special-casing for the DND->Modes shortcut transition. Bug: 365545604 Test: atest com.android.settings.shortcut + manual (switch language, reboot) Flag: android.app.modes_ui Change-Id: I30450d13cb05008d2a71ed89d4781eb81e5532b9
Running Settings Robolectric tests
The full suite
$ croot
$ atest SettingsRoboTests
Running a single test class
With a filter
$ croot
$ atest SettingsRoboTests:com.android.settings.display.AdaptiveSleepPreferenceControllerTest
You can also run any single test class with atest (it will try to find the correct path)
$ atest AdaptiveSleepPreferenceControllerTest