/aosp12/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batterytip/tips/ |
H A 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() 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() 112 final EarlyWarningTip nextTip = new EarlyWarningTip(BatteryTip.StateType.INVISIBLE, in testUpdate_turnOffLowPowerModeExplicitly_typeBecomeInvisible() 117 assertThat(earlyWarningTip.getState()).isEqualTo(BatteryTip.StateType.INVISIBLE); in testUpdate_turnOffLowPowerModeExplicitly_typeBecomeInvisible() [all …]
|
H A 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() 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() 190 assertThat(mInvisibleBatteryTip.getState()).isEqualTo(BatteryTip.StateType.HANDLED); in update_newHandledAnomalyComes_containHandledAnomaly() 202 assertThat(batteryTip.getState()).isEqualTo(BatteryTip.StateType.INVISIBLE); in sanityCheck_appUninstalled_stateInvisible() [all …]
|
H A 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()
|
H A D | SmartBatteryTipTest.java | 46 mSmartBatteryTip = new SmartBatteryTip(BatteryTip.StateType.NEW); in setUp() 54 MetricsProto.MetricsEvent.ACTION_SMART_BATTERY_TIP, BatteryTip.StateType.NEW); in testLog()
|
H A D | UnrestrictAppTipTest.java | 42 mBatteryTip = new UnrestrictAppTip(BatteryTip.StateType.NEW, appInfo); in setUp() 54 assertThat(parcelTip.getState()).isEqualTo(BatteryTip.StateType.NEW); in testParcelable()
|
/aosp12/packages/apps/Settings/src/com/android/settings/fuelgauge/batterytip/tips/ |
H A D | RestrictAppTip.java | 41 public RestrictAppTip(@StateType int state, List<AppInfo> restrictApps) { in RestrictAppTip() 47 public RestrictAppTip(@StateType int state, AppInfo appInfo) { 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() 100 mState = StateType.HANDLED; in updateState() 116 mState = StateType.INVISIBLE; in validateCheck() [all …]
|
H A 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()
|
H A 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()
|
/aosp12/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batterytip/ |
H A 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()
|
H A D | BatteryTipDialogFragmentTest.java | 112 mRestrictedOneAppTip = new RestrictAppTip(BatteryTip.StateType.NEW, in setUp() 115 mRestrictTwoAppsTip = new RestrictAppTip(BatteryTip.StateType.NEW, in setUp() 118 mUnrestrictAppTip = new UnrestrictAppTip(BatteryTip.StateType.NEW, mAppInfo); in setUp() 119 mSummaryTip = spy(new SummaryTip(BatteryTip.StateType.NEW, in setUp() 121 mDefenderTip = new BatteryDefenderTip(BatteryTip.StateType.NEW); in setUp() 196 final RestrictAppTip restrictSixAppsTip = new RestrictAppTip(BatteryTip.StateType.NEW, in testOnCreateDialog_restrictSixAppsTip_fireRestrictSixAppsDialog()
|
/aosp12/packages/services/Car/cpp/watchdog/server/tests/ |
H A D | WatchdogInternalHandlerTest.cpp | 300 ->notifySystemStateChange(aawi::StateType::POWER_CYCLE, in TEST_F() 312 ->notifySystemStateChange(aawi::StateType::POWER_CYCLE, in TEST_F() 325 ->notifySystemStateChange(aawi::StateType::POWER_CYCLE, in TEST_F() 334 aawi::StateType type = aawi::StateType::POWER_CYCLE; in TEST_F() 367 aawi::StateType type = aawi::StateType::USER_STATE; in TEST_F() 378 aawi::StateType type = aawi::StateType::USER_STATE; in TEST_F() 389 aawi::StateType type = aawi::StateType::USER_STATE; in TEST_F() 400 aawi::StateType type = aawi::StateType::USER_STATE; in TEST_F() 411 aawi::StateType type = aawi::StateType::BOOT_PHASE; in TEST_F() 423 aawi::StateType type = aawi::StateType::BOOT_PHASE; in TEST_F() [all …]
|
/aosp12/packages/apps/TimeZoneData/testing/xts/src/com/android/timezone/xts/ |
H A 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()
|
/aosp12/packages/modules/NeuralNetworks/runtime/test/specs/V1_2/ |
H A 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)
|
/aosp12/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/slices/ |
H A 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() 202 final int state = prefs.getInt(KEY_CURRENT_TIPS_STATE, BatteryTip.StateType.INVISIBLE); in isBatteryTipAvailableFromCache() 203 if (state == BatteryTip.StateType.INVISIBLE) { in isBatteryTipAvailableFromCache() 221 if (batteryTip.getState() != BatteryTip.StateType.INVISIBLE) { in refreshBatteryTips()
|
/aosp12/packages/apps/Settings/src/com/android/settings/fuelgauge/batterytip/detectors/ |
H A 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()
|
H A D | EarlyWarningDetector.java | 59 ? BatteryTip.StateType.INVISIBLE in detect() 61 ? BatteryTip.StateType.NEW in detect() 62 : BatteryTip.StateType.INVISIBLE; in detect()
|
H A D | BatteryDefenderDetector.java | 37 ? BatteryTip.StateType.NEW in detect() 38 : BatteryTip.StateType.INVISIBLE; in detect()
|
H A D | SummaryDetector.java | 40 ? BatteryTip.StateType.NEW in detect() 41 : BatteryTip.StateType.INVISIBLE; in detect()
|
H A D | SmartBatteryDetector.java | 59 enableSmartBatteryTip ? BatteryTip.StateType.NEW : BatteryTip.StateType.INVISIBLE; in detect()
|
/aosp12/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/batterytip/detectors/ |
H A 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()
|
H A 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()
|
/aosp12/packages/apps/Settings/tests/robotests/src/com/android/settings/homepage/contextualcards/slices/ |
H A 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()
|
/aosp12/packages/services/Car/cpp/watchdog/server/src/ |
H A D | WatchdogInternalHandler.cpp | 160 Status WatchdogInternalHandler::notifySystemStateChange(aawi::StateType type, int32_t arg1, in notifySystemStateChange() 167 case aawi::StateType::POWER_CYCLE: { in notifySystemStateChange() 175 case aawi::StateType::GARAGE_MODE: { in notifySystemStateChange() 182 case aawi::StateType::USER_STATE: { in notifySystemStateChange() 191 case aawi::StateType::BOOT_PHASE: { in notifySystemStateChange()
|
/aosp12/packages/services/Car/cpp/watchdog/aidl/android/automotive/watchdog/internal/ |
H A D | ICarWatchdog.aidl | 23 import android.automotive.watchdog.internal.StateType; 105 void notifySystemStateChange(in StateType type, in int arg1, in int arg2); in notifySystemStateChange()
|
/aosp12/packages/services/Car/cpp/watchdog/aidl/android/automotive/watchdog/ |
H A D | ICarWatchdog.aidl | 24 import android.automotive.watchdog.StateType; 134 void notifySystemStateChange(in StateType type, in int arg1, in int arg2); in notifySystemStateChange()
|