Merge "Fix b/264582296: Incorrect app battery usage after switching between 'restricted/unrestricted/optimized'."
This commit is contained in:
committed by
Android (Google) Code Review
commit
42da13300c
@@ -118,7 +118,7 @@ public class BatteryOptimizeUtils {
|
|||||||
|
|
||||||
/** Sets the {@link OptimizationMode} for associated app. */
|
/** Sets the {@link OptimizationMode} for associated app. */
|
||||||
public void setAppUsageState(@OptimizationMode int mode, Action action) {
|
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);
|
Log.w(TAG, "set the same optimization mode for: " + mPackageName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user