Merge "Fix b/264582296: Incorrect app battery usage after switching between 'restricted/unrestricted/optimized'."

This commit is contained in:
TreeHugger Robot
2023-01-12 06:37:09 +00:00
committed by Android (Google) Code Review

View File

@@ -118,7 +118,7 @@ public class BatteryOptimizeUtils {
/** Sets the {@link OptimizationMode} for associated app. */
public void setAppUsageState(@OptimizationMode int mode, Action action) {
if (getAppOptimizationMode(mMode, mAllowListed) == mode) {
if (getAppOptimizationMode() == mode) {
Log.w(TAG, "set the same optimization mode for: " + mPackageName);
return;
}