Home
last modified time | relevance | path

Searched refs:MODE_RESTRICTED (Results 1 – 15 of 15) sorted by relevance

/packages/apps/Settings/src/com/android/settings/applications/
DAppStateAppBatteryUsageBridge.java55 static final int MODE_RESTRICTED = 3; field in AppStateAppBatteryUsageBridge
61 MODE_RESTRICTED,
105 mode = MODE_RESTRICTED; in getAppBatteryUsageState()
174 return getAppBatteryUsageDetailsMode(info) == MODE_RESTRICTED;
/packages/apps/Settings/tests/unit/src/com/android/settings/fuelgauge/batteryusage/
DAppOptModeSharedPreferencesUtilsTest.kt25 import com.android.settings.fuelgauge.BatteryOptimizeUtils.MODE_RESTRICTED in <lambda>()
204 whenever(testBatteryOptimizeUtils?.getAppOptimizationMode(true)).thenReturn(MODE_RESTRICTED) in <lambda>()
211 MODE_RESTRICTED, in <lambda>()
216 verify(testBatteryOptimizeUtils)?.setAppUsageState(MODE_RESTRICTED, Action.EXTERNAL_UPDATE) in <lambda>()
217 assertThat(currentOptMode).isEqualTo(MODE_RESTRICTED) in <lambda>()
/packages/apps/Settings/src/com/android/settings/fuelgauge/
DBatteryOptimizeUtils.java75 public static final int MODE_RESTRICTED = 1; field in BatteryOptimizeUtils
83 MODE_RESTRICTED,
105 return MODE_RESTRICTED; in getAppOptimizationMode()
184 && getAppOptimizationMode() != BatteryOptimizeUtils.MODE_RESTRICTED; in isSelectorPreferenceEnabled()
325 mode == MODE_RESTRICTED ? AppOpsManager.MODE_IGNORED : AppOpsManager.MODE_ALLOWED; in setAppUsageStateInternal()
DAllowBackgroundPreferenceController.java67 != BatteryOptimizeUtils.MODE_RESTRICTED; in updateState()
DPowerBackgroundUsageDetail.java192 return BatteryOptimizeUtils.MODE_RESTRICTED; in getSelectedPreference()
306 case BatteryOptimizeUtils.MODE_RESTRICTED: in logMetricCategory()
DAdvancedPowerUsageDetail.java445 : BatteryOptimizeUtils.MODE_RESTRICTED, in onPreferenceChange()
461 case BatteryOptimizeUtils.MODE_RESTRICTED: in logMetricCategory()
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/
DBatteryBackupHelperTest.java21 import static com.android.settings.fuelgauge.BatteryOptimizeUtils.MODE_RESTRICTED;
306 + MODE_RESTRICTED in restoreOptimizationMode_invalidModeFormat_skipRestore()
317 inOrder.verify(mBatteryOptimizeUtils).setAppUsageState(MODE_RESTRICTED, Action.RESTORE); in restoreOptimizationMode_invalidModeFormat_skipRestore()
326 + MODE_RESTRICTED in restoreOptimizationMode_restoreExpectedModes()
334 + MODE_RESTRICTED in restoreOptimizationMode_restoreExpectedModes()
342 inOrder.verify(mBatteryOptimizeUtils).setAppUsageState(MODE_RESTRICTED, Action.RESTORE); in restoreOptimizationMode_restoreExpectedModes()
345 .setAppUsageState(MODE_RESTRICTED, Action.RESTORE); in restoreOptimizationMode_restoreExpectedModes()
DPowerBackgroundUsageDetailTest.java273 final int restrictedMode = BatteryOptimizeUtils.MODE_RESTRICTED; in onSwitchChanged_fromUnrestrictedModeSetDisabled_becomeRestrictedMode()
289 final int restrictedMode = BatteryOptimizeUtils.MODE_RESTRICTED; in onSwitchChanged_fromRestrictedModeSetEnabled_becomeOptimizedMode()
307 final int restrictedMode = BatteryOptimizeUtils.MODE_RESTRICTED; in onPause_optimizationModeChanged_logPreference()
331 final int restrictedMode = BatteryOptimizeUtils.MODE_RESTRICTED; in onPause_optimizationModeIsNotChanged_notInvokeLogging()
DAllowBackgroundPreferenceControllerTest.java92 .thenReturn(BatteryOptimizeUtils.MODE_RESTRICTED); in testUpdateState_isSystemOrDefaultAppAndRestrictedStates_prefChecked()
117 .thenReturn(BatteryOptimizeUtils.MODE_RESTRICTED); in testUpdateState_isRestrictedStates_prefChecked()
DBatterySettingsMigrateCheckerTest.java152 doReturn(BatteryOptimizeUtils.MODE_RESTRICTED) in verifyBatteryOptimizeModeApps_inAllowList_resetOptimizationMode()
181 doReturn(BatteryOptimizeUtils.MODE_RESTRICTED) in verifyBatteryOptimizeModeApps_notInAllowList_noAction()
DBatteryOptimizeUtilsTest.java20 import static com.android.settings.fuelgauge.BatteryOptimizeUtils.MODE_RESTRICTED;
109 assertThat(mBatteryOptimizeUtils.getAppOptimizationMode()).isEqualTo(MODE_RESTRICTED); in testGetAppOptimizationMode_returnRestricted()
163 mBatteryOptimizeUtils.setAppUsageState(MODE_RESTRICTED, Action.UNKNOWN); in testSetAppUsageState_Restricted_verifyAction()
DAdvancedPowerUsageDetailTest.java398 final int restrictedMode = BatteryOptimizeUtils.MODE_RESTRICTED; in onPause_optimizationModeChanged_logPreference()
425 final int restrictedMode = BatteryOptimizeUtils.MODE_RESTRICTED; in onPause_optimizationModeIsNotChanged_notInvokeLogging()
/packages/apps/Settings/src/com/android/settings/fuelgauge/protos/
Dbattery_usage_slot.proto19 MODE_RESTRICTED = 1; enumerator
/packages/apps/Settings/tests/unit/src/com/android/settings/applications/
DAppStateAppBatteryUsageBridgeTest.java62 .isEqualTo(AppStateAppBatteryUsageBridge.MODE_RESTRICTED); in updateExtraInfo_updatesRestricted()
/packages/apps/Settings/src/com/android/settings/spa/app/battery/
DBatteryOptimizationModeAppListPageProvider.kt113 appOptimizationMode == BatteryOptimizeUtils.MODE_RESTRICTED in transform()