/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batterytip/tips/ |
D | EarlyWarningTipTest.java | 51 new EarlyWarningTip(BatteryTip.StateType.NEW, false /* powerSaveModeOn */); in setUp() 68 new EarlyWarningTip(BatteryTip.StateType.NEW, false /* powerModeOn */); in testInfo_stateNew_displayPowerModeInfo() 79 new EarlyWarningTip(BatteryTip.StateType.INVISIBLE, true /* powerModeOn */); in testUpdate_powerModeTurnedOn_typeBecomeInvisible() 83 assertThat(mEarlyWarningTip.getState()).isEqualTo(BatteryTip.StateType.INVISIBLE); in testUpdate_powerModeTurnedOn_typeBecomeInvisible() 88 final EarlyWarningTip nextTip = new EarlyWarningTip(BatteryTip.StateType.INVISIBLE, in testUpdate_devicePluggedIn_typeBecomeInvisible() 93 assertThat(mEarlyWarningTip.getState()).isEqualTo(BatteryTip.StateType.INVISIBLE); in testUpdate_devicePluggedIn_typeBecomeInvisible() 98 final EarlyWarningTip earlyWarningTip = new EarlyWarningTip(BatteryTip.StateType.INVISIBLE, in testUpdate_turnOnLowPowerModeExplicitly_typeStillInvisible() 100 final EarlyWarningTip nextTip = new EarlyWarningTip(BatteryTip.StateType.INVISIBLE, in testUpdate_turnOnLowPowerModeExplicitly_typeStillInvisible() 105 assertThat(earlyWarningTip.getState()).isEqualTo(BatteryTip.StateType.INVISIBLE); in testUpdate_turnOnLowPowerModeExplicitly_typeStillInvisible() 110 final EarlyWarningTip earlyWarningTip = new EarlyWarningTip(BatteryTip.StateType.HANDLED, in testUpdate_turnOffLowPowerModeExplicitly_typeBecomeInvisible() [all …]
|
D | RestrictAppTipTest.java | 99 mNewBatteryTip = new RestrictAppTip(BatteryTip.StateType.NEW, mUsageAppList); in setUp() 100 mHandledBatteryTip = new RestrictAppTip(BatteryTip.StateType.HANDLED, mUsageAppList); in setUp() 101 mInvisibleBatteryTip = new RestrictAppTip(BatteryTip.StateType.INVISIBLE, in setUp() 120 assertThat(parcelTip.getState()).isEqualTo(BatteryTip.StateType.NEW); in parcelable() 138 mHandledBatteryTip = new RestrictAppTip(BatteryTip.StateType.HANDLED, mUsageAppList); in getTitle_moreAppsHandled_showHandledTitle() 158 mHandledBatteryTip = new RestrictAppTip(BatteryTip.StateType.HANDLED, mUsageAppList); in getSummary_moreAppsHandled_showHandledSummary() 168 assertThat(mNewBatteryTip.getState()).isEqualTo(BatteryTip.StateType.HANDLED); in update_anomalyBecomeInvisible_stateHandled() 175 assertThat(mHandledBatteryTip.getState()).isEqualTo(BatteryTip.StateType.INVISIBLE); in update_handledAnomlayBecomeInvisible_stateInvisible() 181 assertThat(mInvisibleBatteryTip.getState()).isEqualTo(BatteryTip.StateType.NEW); in update_newAnomalyComes_stateNew() 184 assertThat(mHandledBatteryTip.getState()).isEqualTo(BatteryTip.StateType.NEW); in update_newAnomalyComes_stateNew() [all …]
|
D | LowBatteryTipTest.java | 51 mLowBatteryTip = new LowBatteryTip(BatteryTip.StateType.NEW, false /* powerSaveModeOn */); in setUp() 68 mLowBatteryTip.mState = BatteryTip.StateType.NEW; in getSummary_tipNew_showTitle() 75 mLowBatteryTip.mState = BatteryTip.StateType.NEW; in getSummary_tipNew_showSummary() 85 MetricsProto.MetricsEvent.ACTION_LOW_BATTERY_TIP, BatteryTip.StateType.NEW); in log_lowBatteryActionWithCorrectState()
|
D | SmartBatteryTipTest.java | 46 mSmartBatteryTip = new SmartBatteryTip(BatteryTip.StateType.NEW); in setUp() 54 MetricsProto.MetricsEvent.ACTION_SMART_BATTERY_TIP, BatteryTip.StateType.NEW); in testLog()
|
D | UnrestrictAppTipTest.java | 42 mBatteryTip = new UnrestrictAppTip(BatteryTip.StateType.NEW, appInfo); in setUp() 54 assertThat(parcelTip.getState()).isEqualTo(BatteryTip.StateType.NEW); in testParcelable()
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/batterytip/tips/ |
D | RestrictAppTip.java | 41 public RestrictAppTip(@StateType int state, List<AppInfo> restrictApps) { in RestrictAppTip() 42 super(TipType.APP_RESTRICTION, state, state == StateType.NEW /* showDialog */); in RestrictAppTip() 47 public RestrictAppTip(@StateType int state, AppInfo appInfo) { in RestrictAppTip() 48 super(TipType.APP_RESTRICTION, state, state == StateType.NEW /* showDialog */); in RestrictAppTip() 67 return mState == StateType.HANDLED in getTitle() 78 final int resId = mState == StateType.HANDLED in getSummary() 86 return mState == StateType.HANDLED in getIconId() 93 if (tip.mState == StateType.NEW) { in updateState() 95 mState = StateType.NEW; in updateState() 98 } else if (mState == StateType.NEW && tip.mState == StateType.INVISIBLE) { in updateState() [all …]
|
D | BatteryTip.java | 43 @IntDef({StateType.NEW, 44 StateType.HANDLED, 45 StateType.INVISIBLE}) 46 public @interface StateType { annotation in BatteryTip 185 @StateType 191 return mState != StateType.INVISIBLE; in isVisible()
|
D | EarlyWarningTip.java | 32 public EarlyWarningTip(@StateType int state, boolean powerSaveModeOn) { in EarlyWarningTip() 67 if (earlyWarningTip.mState == StateType.NEW) { in updateState() 69 mState = StateType.NEW; in updateState() 72 mState = StateType.INVISIBLE; in updateState()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batterytip/ |
D | BatteryTipUtilsTest.java | 66 mRestrictAppTip = spy(new RestrictAppTip(BatteryTip.StateType.NEW, new ArrayList<>())); in setUp() 68 new EarlyWarningTip(BatteryTip.StateType.NEW, true /* powerSaveModeOn */)); in setUp() 70 new LowBatteryTip(BatteryTip.StateType.NEW, false /* powerSaveModeOn */)); in setUp() 71 mBatteryDefenderTip = spy(new BatteryDefenderTip(BatteryTip.StateType.NEW)); in setUp() 76 when(mRestrictAppTip.getState()).thenReturn(BatteryTip.StateType.NEW); in testGetActionForBatteryTip_typeRestrictStateNew_returnActionRestrict() 84 when(mRestrictAppTip.getState()).thenReturn(BatteryTip.StateType.HANDLED); in testGetActionForBatteryTip_typeRestrictStateHandled_returnActionOpen() 92 when(mEarlyWarningTip.getState()).thenReturn(BatteryTip.StateType.NEW); in testGetActionForBatteryTip_typeEarlyWarningStateNew_returnActionOpen() 100 when(mLowBatteryTip.getState()).thenReturn(BatteryTip.StateType.NEW); in testGetActionForBatteryTip_typeLowBatteryStateNew_returnActionOpen() 109 when(mBatteryDefenderTip.getState()).thenReturn(BatteryTip.StateType.NEW); in testGetActionForBatteryTip_typeBatteryDefenderStateNew_returnActionBatteryDefender()
|
D | BatteryTipDialogFragmentTest.java | 110 mRestrictedOneAppTip = new RestrictAppTip(BatteryTip.StateType.NEW, in setUp() 113 mRestrictTwoAppsTip = new RestrictAppTip(BatteryTip.StateType.NEW, in setUp() 116 mUnrestrictAppTip = new UnrestrictAppTip(BatteryTip.StateType.NEW, mAppInfo); in setUp() 117 mSummaryTip = spy(new SummaryTip(BatteryTip.StateType.NEW, in setUp() 193 final RestrictAppTip restrictSixAppsTip = new RestrictAppTip(BatteryTip.StateType.NEW, in testOnCreateDialog_restrictSixAppsTip_fireRestrictSixAppsDialog()
|
D | BatteryTipPreferenceControllerTest.java | 91 mOldBatteryTips.add(new SummaryTip(BatteryTip.StateType.NEW, AVERAGE_TIME_MS)); in setUp() 93 mNewBatteryTips.add(new SummaryTip(BatteryTip.StateType.INVISIBLE, AVERAGE_TIME_MS)); in setUp() 127 BatteryTip.StateType.NEW); in testUpdateBatteryTips_logBatteryTip()
|
/packages/services/Car/cpp/watchdog/server/tests/ |
D | WatchdogInternalHandlerTest.cpp | 301 ->notifySystemStateChange(aawi::StateType::POWER_CYCLE, in TEST_F() 313 ->notifySystemStateChange(aawi::StateType::POWER_CYCLE, in TEST_F() 326 ->notifySystemStateChange(aawi::StateType::POWER_CYCLE, in TEST_F() 335 aawi::StateType type = aawi::StateType::POWER_CYCLE; in TEST_F() 348 mWatchdogInternalHandler->notifySystemStateChange(aawi::StateType::GARAGE_MODE, in TEST_F() 359 mWatchdogInternalHandler->notifySystemStateChange(aawi::StateType::GARAGE_MODE, in TEST_F() 368 aawi::StateType type = aawi::StateType::USER_STATE; in TEST_F() 381 aawi::StateType type = aawi::StateType::USER_STATE; in TEST_F() 392 aawi::StateType type = aawi::StateType::BOOT_PHASE; in TEST_F() 404 aawi::StateType type = aawi::StateType::BOOT_PHASE; in TEST_F() [all …]
|
/packages/apps/TimeZoneData/testing/xts/src/com/android/timezone/xts/ |
D | TimeZoneUpdateHostTest.java | 291 waitForNoOperationInProgressAndReturn(StateType.ACTIVE_RULES_VERSION); in assertActiveRulesVersion() 296 return waitForNoOperationInProgressAndReturn(StateType.CURRENTLY_INSTALLED_VERSION); in getCurrentInstalledVersion() 300 return waitForNoOperationInProgressAndReturn(StateType.CURRENT_INSTALL_STATE); in getCurrentInstallState() 304 return waitForNoOperationInProgressAndReturn(StateType.STAGED_INSTALL_VERSION); in getStagedInstallVersion() 308 return waitForNoOperationInProgressAndReturn(StateType.STAGED_OPERATION_TYPE); in getStagedOperationType() 312 return waitForNoOperationInProgressAndReturn(StateType.BASE_RULES_VERSION); in getBaseRulesVersion() 318 getDeviceTimeZoneState(StateType.OPERATION_IN_PROGRESS); in isOperationInProgress() 325 private String waitForNoOperationInProgressAndReturn(StateType stateType) throws Exception { in waitForNoOperationInProgressAndReturn() 366 private enum StateType { enum in TimeZoneUpdateHostTest 398 private String getDeviceTimeZoneState(StateType stateType) throws Exception { in getDeviceTimeZoneState()
|
/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/slices/ |
D | BatteryFixSlice.java | 75 Arrays.asList(BatteryTip.StateType.NEW, BatteryTip.StateType.HANDLED)); in UNIMPORTANT_BATTERY_TIPS.put() 77 Arrays.asList(BatteryTip.StateType.NEW, BatteryTip.StateType.HANDLED)); in UNIMPORTANT_BATTERY_TIPS.put() 79 Arrays.asList(BatteryTip.StateType.HANDLED)); in UNIMPORTANT_BATTERY_TIPS.put() 114 if (batteryTip.getState() == BatteryTip.StateType.INVISIBLE) { in getSlice() 196 final int state = prefs.getInt(KEY_CURRENT_TIPS_STATE, BatteryTip.StateType.INVISIBLE); in isBatteryTipAvailableFromCache() 197 if (state == BatteryTip.StateType.INVISIBLE) { in isBatteryTipAvailableFromCache() 215 if (batteryTip.getState() != BatteryTip.StateType.INVISIBLE) { in refreshBatteryTips()
|
/packages/modules/NeuralNetworks/runtime/test/specs/V1_2/ |
D | quantized_lstm.mod.py | 51 StateType = ("TENSOR_QUANT16_SYMM", (n_batch, n_cell), 1 / 2048, 0) variable 53 prev_cell_state = Input("prevCellState", StateType) 56 cell_state_out = Output("cellStateOut", StateType) 150 StateType = ("TENSOR_QUANT16_SYMM", (n_batch, n_cell), 1 / 2048, 0) variable 152 prev_cell_state = Input("prevCellState", StateType) 155 cell_state_out = Output("cellStateOut", StateType)
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/batterytip/detectors/ |
D | RestrictAppDetector.java | 74 return new RestrictAppTip(BatteryTip.StateType.NEW, highUsageApps); in detect() 81 return new RestrictAppTip(autoHandledApps.isEmpty() ? BatteryTip.StateType.INVISIBLE in detect() 82 : BatteryTip.StateType.HANDLED, autoHandledApps); in detect() 85 return new RestrictAppTip(BatteryTip.StateType.INVISIBLE, new ArrayList<>()); in detect() 94 return new RestrictAppTip(BatteryTip.StateType.NEW, highUsageApps); in getFakeData()
|
D | EarlyWarningDetector.java | 59 ? BatteryTip.StateType.INVISIBLE in detect() 61 ? BatteryTip.StateType.NEW in detect() 62 : BatteryTip.StateType.INVISIBLE; in detect()
|
D | BatteryDefenderDetector.java | 38 ? BatteryTip.StateType.NEW in detect() 39 : BatteryTip.StateType.INVISIBLE; in detect()
|
D | SummaryDetector.java | 40 ? BatteryTip.StateType.NEW in detect() 41 : BatteryTip.StateType.INVISIBLE; in detect()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batterytip/detectors/ |
D | RestrictAppDetectorTest.java | 128 assertThat(mRestrictAppDetector.detect().getState()).isEqualTo(BatteryTip.StateType.NEW); in testDetect_hasAnomaly_tipNew() 143 .isEqualTo(BatteryTip.StateType.HANDLED); in testDetect_hasAutoHandledAnomaly_tipHandled() 155 assertThat(restrictAppTip.getState()).isEqualTo(BatteryTip.StateType.NEW); in testDetect_typeNewHasUninstalledAnomaly_removeIt() 172 assertThat(restrictAppTip.getState()).isEqualTo(BatteryTip.StateType.NEW); in testDetect_typeNewHasRestrictedAnomaly_removeIt() 192 assertThat(restrictAppTip.getState()).isEqualTo(BatteryTip.StateType.INVISIBLE); in testDetect_typeHandledHasUnRestrictedAnomaly_removeIt() 201 .isEqualTo(BatteryTip.StateType.INVISIBLE); in testDetect_noAnomaly_tipInvisible()
|
D | LowBatteryDetectorTest.java | 79 assertThat(mLowBatteryDetector.detect().getState()).isEqualTo(BatteryTip.StateType.NEW); in testDetect_enabledByTest_tipNew() 86 assertThat(mLowBatteryDetector.detect().getState()).isEqualTo(BatteryTip.StateType.NEW); in testDetect_lowBattery_tipNew() 90 assertThat(mLowBatteryDetector.detect().getState()).isEqualTo(BatteryTip.StateType.NEW); in testDetect_lowBattery_tipNew() 98 .isEqualTo(BatteryTip.StateType.INVISIBLE); in testDetect_batterySaverOn_tipInvisible()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/homepage/contextualcards/slices/ |
D | BatteryFixSliceTest.java | 88 tips.add(new LowBatteryTip(BatteryTip.StateType.INVISIBLE, false)); in refreshBatteryTips_hasImportantTip_shouldReturnTrue() 89 tips.add(new EarlyWarningTip(BatteryTip.StateType.NEW, false)); in refreshBatteryTips_hasImportantTip_shouldReturnTrue() 105 tips.add(new LowBatteryTip(BatteryTip.StateType.INVISIBLE, false)); in getSlice_unimportantSlice_shouldSkip() 106 tips.add(new EarlyWarningTip(BatteryTip.StateType.HANDLED, false)); in getSlice_unimportantSlice_shouldSkip() 123 tips.add(new EarlyWarningTip(BatteryTip.StateType.NEW, false)); in getSlice_hasImportantTip_shouldTintIcon()
|
/packages/services/Car/cpp/watchdog/server/src/ |
D | WatchdogInternalHandler.cpp | 161 Status WatchdogInternalHandler::notifySystemStateChange(aawi::StateType type, int32_t arg1, in notifySystemStateChange() 168 case aawi::StateType::POWER_CYCLE: { in notifySystemStateChange() 176 case aawi::StateType::GARAGE_MODE: { in notifySystemStateChange() 183 case aawi::StateType::USER_STATE: { in notifySystemStateChange() 192 case aawi::StateType::BOOT_PHASE: { in notifySystemStateChange()
|
/packages/services/Car/service/src/com/android/car/watchdog/ |
D | CarWatchdogService.java | 30 import android.automotive.watchdog.internal.StateType; 103 mCarWatchdogDaemonHelper.notifySystemStateChange(StateType.GARAGE_MODE, 359 mCarWatchdogDaemonHelper.notifySystemStateChange(StateType.USER_STATE, info.id, in registerToDaemon() 413 mCarWatchdogDaemonHelper.notifySystemStateChange(StateType.POWER_CYCLE, in subscribePowerCycleChange() 450 mCarWatchdogDaemonHelper.notifySystemStateChange(StateType.USER_STATE, userId, in subscribeUserStateChange()
|
/packages/services/Car/cpp/watchdog/aidl/android/automotive/watchdog/internal/ |
D | ICarWatchdog.aidl | 24 import android.automotive.watchdog.internal.StateType; 106 void notifySystemStateChange(in StateType type, in int arg1, in int arg2); in notifySystemStateChange()
|