Add a flag to protect overwrite app optimization mode to restricted mode.

- Skip set app optimization mode to restricted if the flag disabled.

Bug: 348192536
Fix: 348192536
Test: atest
Flag: EXEMPT bug fix
Change-Id: I92d320ce1edfe9b7044afdcd058651b0d54bd6bd
This commit is contained in:
mxyyiyi
2024-07-01 14:20:46 +08:00
parent 90acfa757a
commit a954e914dd
5 changed files with 78 additions and 9 deletions

View File

@@ -44,6 +44,9 @@ public interface PowerUsageFeatureProvider {
/** Check whether the battery tips card is enabled in the battery usage page */
boolean isBatteryTipsEnabled();
/** Check whether overwrite the app optimization mode to restricted mode is enabled */
boolean isRestrictedModeOverwriteEnabled();
/** Check whether force expire the app optimization mode. */
boolean isForceExpireAppOptimizationModeEnabled();