Add PowerSaveWhitelistExceptIdle as Optimizted modes condition
- Check PowerSaveWhitelistExceptIdle list before update each apps optimizaton mode to avoid duplicate remove action - Make those apps which under PowerSaveWhitelistExceptIdle list keep at optimized mode only BYPASS_INCLUSIVE_LANGUAGE_REASON=legacy naming, not edit by this code change Bug: 199892006 Test: make SettingsRoboTests Change-Id: I3cd10cf51b5132fc12a83e9554801ec4e8578cd1 Merged-In: I3cd10cf51b5132fc12a83e9554801ec4e8578cd1
This commit is contained in:
committed by
YUKAI HUNG
parent
e5644441dd
commit
e7cca4cd81
@@ -53,6 +53,9 @@ public class UnrestrictedPreferenceController extends AbstractPreferenceControll
|
||||
if (mBatteryOptimizeUtils.isSystemOrDefaultApp()) {
|
||||
Log.d(TAG, "is system or default app, unrestricted states only");
|
||||
((RadioButtonPreference) preference).setChecked(true);
|
||||
} else if (mBatteryOptimizeUtils.isAllowlistedExceptIdleApp()) {
|
||||
Log.d(TAG, "in allow list not idle app, disable perf");
|
||||
preference.setEnabled(false);
|
||||
} else if (mBatteryOptimizeUtils.getAppOptimizationMode()
|
||||
== BatteryOptimizeUtils.MODE_UNRESTRICTED) {
|
||||
Log.d(TAG, "is unrestricted states");
|
||||
|
Reference in New Issue
Block a user