Fix the issue that Optimization Mode is not reset when users click the
"Reset apps" button in the setting.
Bug: 222037028
Test: make RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.fuelgauge" + emulator
Change-Id: I22fb8aa19e284e11882b2920b77b544dee4cc33c
- Post the setup logic into background and setup once only when leaving
this page, this can improve the performance since we won't setup
every time when switching preference
Bug: 195306545
Bug: 199892006
Test: make SettingsRoboTests
Change-Id: I1c3ee4673cf5cdba0abe39f208dfb1412082c579
Avoid backup system app or default app optimization modes, since all of
them are using the MODE_UNRESTRICTED in default, and the system or
default apps may be different in the different devices.
BYPASS_INCLUSIVE_LANGUAGE_REASON=legacy method name
Test command for backup manager:
adb shell bmgr backupnow com.android.settings
adb shell dumpsys backup | grep Current
Bug: 192523697
Test: make SettingsRoboTests
Change-Id: I0862ee31fcfa3bece15c2d4fdef5b0ea70235967
Based on the Android API Council guideline, we should avoid using the
Enum structure to define the constant definition.
go/android-api-guidelines#avoid-enum
Bug: 197595292
Test: make SettingsRoboTests
Change-Id: I4b22f0abde7f4ce2c3a0b076db786e619783d93e
Merged-In: I4b22f0abde7f4ce2c3a0b076db786e619783d93e