Searched refs:batteryState (Results 1 – 3 of 3) sorted by relevance
86 BatteryState batteryState = mInputDevice.getBatteryState(); in refresh() local90 if (isValidBatteryState(batteryState)) { in refresh()93 NumberFormat.getPercentInstance().format(batteryState.getCapacity())); in refresh()111 private boolean isValidBatteryState(BatteryState batteryState) { in isValidBatteryState() argument112 return batteryState != null in isValidBatteryState()113 && batteryState.isPresent() in isValidBatteryState()114 && batteryState.getCapacity() > 0f; in isValidBatteryState()129 @NonNull BatteryState batteryState) { in onBatteryStateChanged() argument
137 @NonNull BatteryState batteryState) { in onBatteryStateChanged() argument138 mLastBatteryState = batteryState; in onBatteryStateChanged()
233 BatteryState batteryState = mock(BatteryState.class); in onBatteryStateChanged_detectsValidUsi() local234 doReturn(true).when(batteryState).isPresent(); in onBatteryStateChanged_detectsValidUsi()235 doReturn(0.5f).when(batteryState).getCapacity(); in onBatteryStateChanged_detectsValidUsi()238 batteryState); in onBatteryStateChanged_detectsValidUsi()246 BatteryState batteryState = mock(BatteryState.class); in onBatteryStateChanged_detectsInvalidUsi_batteryNotPresent() local247 doReturn(false).when(batteryState).isPresent(); in onBatteryStateChanged_detectsInvalidUsi_batteryNotPresent()250 batteryState); in onBatteryStateChanged_detectsInvalidUsi_batteryNotPresent()