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
This commit is contained in:
committed by
YUKAI HUNG
parent
cedf4573b6
commit
3f7839cad0
@@ -130,6 +130,13 @@ public class BatteryOptimizeUtils {
|
||||
|| mPowerAllowListBackend.isDefaultActiveApp(mPackageName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return {@code true} if this package is in allow list except idle app.
|
||||
*/
|
||||
public boolean isAllowlistedExceptIdleApp() {
|
||||
return mPowerAllowListBackend.isAllowlistedExceptIdle(mPackageName);
|
||||
}
|
||||
|
||||
String getPackageName() {
|
||||
return mPackageName == null ? UNKNOWN_PACKAGE : mPackageName;
|
||||
}
|
||||
|
Reference in New Issue
Block a user