Revert "Add PowerSaveWhitelistExceptIdle as Optimizted modes condition"
- Reverts commit e7cca4cd81
- Add try-catch to handle unexpected operate
Reason for revert: Previous fix will cause a side effect which makes app stuck at Optimize mode after switching state from Unrestricted to Optimize, add a try catch to handle previous issue first
BYPASS_INCLUSIVE_LANGUAGE_REASON=legacy naming, not edit by this code change
Bug: 199892006
Test: make SettingsRoboTests
Change-Id: I3b1850ab66bbf4cd605f14152a244a8ed7edd578
Merged-In: I3b1850ab66bbf4cd605f14152a244a8ed7edd578
This commit is contained in:
committed by
Wesley Wang
parent
3efe6e59f7
commit
d11dec2f82
@@ -53,9 +53,6 @@ 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