Commit Graph

11 Commits

Author SHA1 Message Date
Kuan Wang
4028e6123c Reset Optimization Mode of apps when users reset app settings.
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
2022-05-16 05:01:20 +00:00
ykhung
c8a63b3416 Fix broken tests: com.android.settings.fuelgauge
Bug: 215064709
Fixes: 215064709
Test: make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.fuelgauge"
Change-Id: I79a27b4fcef3a21207b37db422d983ae9d521b45
2022-01-23 16:28:31 +08:00
Tsung-Mao Fang
c6c9e2eb16 Ignore tests in Battery package
Bug: 215064709
Test: run robo test
Change-Id: I74d84318a1546e934579d23c79a6a43805880a99
2022-01-18 15:07:08 +08:00
Wesley.CW Wang
151b88f76f Optimize battery optimize page control flow
- 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
2021-11-01 14:52:42 +08:00
YUKAI HUNG
b1e10399cc [B&R] avoid to backup & restore app which is in the PowerSaveWhitelistExceptIdle
This reverts commit 9de5fe158d.

Reason for revert: revert it too based on ag/16048452

Change-Id: I97ffcfcbc37fb4a99e66213023b95af759d1ed3e
2021-10-14 09:34:27 +00:00
ykhung
9de5fe158d [B&R] avoid to backup & restore app which is in the PowerSaveWhitelistExceptIdle
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
adb shell bmgr restore 3e9867a7660315b8 com.android.settings

Bug: 192523697
Test: make SettingsRoboTests
Change-Id: I78f34870af3146698e6d1b9fbc5ec4385a8d5384
2021-09-23 17:29:22 +08:00
ykhung
adec23a106 [B&R] restore the backup data for app optimization mode back
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
adb shell bmgr restore 3e9867a7660315b8 com.android.settings

Bug: 192523697
Test: make SettingsRoboTests
Change-Id: Ia35f8caa8fe2408be28c3494785a174a1aeb11da
2021-08-30 06:45:26 +00:00
ykhung
a90496e92e [B&R] ignore backup system app or default app optimization modes
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
2021-08-25 15:01:52 +00:00
ykhung
0ab0a3af56 Refactor BatteryOptimizeUtils from enum to @IntDef
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
2021-08-24 12:04:31 +00:00
ykhung
37ddf4bc3e [B&R] backup the battery optimization mode for installed apps
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: I4671e48a9d3b315362b451384db637d5cae36a4d
2021-08-23 12:32:07 +08:00
ykhung
7cbc683d3e [B&R] backup the getFullPowerWhitelist() for battery setting
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: I2d5c51b5b5788d703a233f5df719a298382feb98
2021-08-19 23:59:21 +00:00