/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/stylus/ |
D | StylusManagerTest.kt | 60 @Mock lateinit var batteryState: BatteryState in <lambda>() variable in com.android.systemui.stylus.StylusManagerTest 109 whenever(btStylusDevice.batteryState).thenReturn(batteryState) in <lambda>() 110 whenever(stylusDevice.batteryState).thenReturn(batteryState) in <lambda>() 111 whenever(batteryState.capacity).thenReturn(0.5f) in <lambda>() 511 whenever(batteryState.isPresent).thenReturn(true) in <lambda>() 513 stylusManager.onBatteryStateChanged(STYLUS_DEVICE_ID, 1, batteryState) in <lambda>() 520 whenever(batteryState.isPresent).thenReturn(true) in <lambda>() 522 stylusManager.onBatteryStateChanged(STYLUS_DEVICE_ID, 1, batteryState) in <lambda>() 529 whenever(batteryState.isPresent).thenReturn(true) in <lambda>() 531 stylusManager.onBatteryStateChanged(STYLUS_DEVICE_ID, 1, batteryState) in <lambda>() [all …]
|
D | StylusUsiPowerStartableTest.kt | 117 val batteryState = FixedCapacityBatteryState(0.1f) in onStylusUsiBatteryStateChanged_batteryPresentValidCapacity_refreshesNotification() constant 119 startable.onStylusUsiBatteryStateChanged(STYLUS_DEVICE_ID, 123, batteryState) in onStylusUsiBatteryStateChanged_batteryPresentValidCapacity_refreshesNotification() 121 verify(stylusUsiPowerUi, times(1)).updateBatteryState(STYLUS_DEVICE_ID, batteryState) in onStylusUsiBatteryStateChanged_batteryPresentValidCapacity_refreshesNotification() 126 val batteryState = FixedCapacityBatteryState(0f) in onStylusUsiBatteryStateChanged_batteryPresentInvalidCapacity_noop() constant 128 startable.onStylusUsiBatteryStateChanged(STYLUS_DEVICE_ID, 123, batteryState) in onStylusUsiBatteryStateChanged_batteryPresentInvalidCapacity_noop() 135 val batteryState = mock(BatteryState::class.java) in onStylusUsiBatteryStateChanged_batteryNotPresent_noop() constant 136 whenever(batteryState.isPresent).thenReturn(false) in onStylusUsiBatteryStateChanged_batteryNotPresent_noop() 138 startable.onStylusUsiBatteryStateChanged(STYLUS_DEVICE_ID, 123, batteryState) in onStylusUsiBatteryStateChanged_batteryNotPresent_noop()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/stylus/ |
D | StylusUsiPowerStartable.kt | 56 batteryState: BatteryState in onStylusUsiBatteryStateChanged() 58 if (batteryState.isPresent && batteryState.capacity > 0f) { in onStylusUsiBatteryStateChanged() 59 stylusUsiPowerUi.updateBatteryState(deviceId, batteryState) in onStylusUsiBatteryStateChanged()
|
D | StylusManager.kt | 89 it.isInternalStylusSource && isBatteryStateValid(it.batteryState) in <lambda>() 197 batteryState: BatteryState in <lambda>() 208 val batteryStateValid = isBatteryStateValid(batteryState) in <lambda>() 215 cb.onStylusUsiBatteryStateChanged(deviceId, eventTimeMillis, batteryState) in <lambda>() 318 private fun isBatteryStateValid(batteryState: BatteryState): Boolean { in <lambda>() 319 return batteryState.isPresent && batteryState.capacity > 0.0f in <lambda>() 381 batteryState: BatteryState, in <lambda>()
|
D | StylusUsiPowerUI.kt | 111 fun updateBatteryState(deviceId: Int, batteryState: BatteryState) { in updateBatteryState() 114 if (batteryState.capacity == batteryCapacity || batteryState.capacity <= 0f) in updateBatteryState() 117 batteryCapacity = batteryState.capacity in updateBatteryState()
|
/frameworks/base/core/tests/coretests/src/android/hardware/input/ |
D | InputDeviceBatteryListenerTest.kt | 140 deviceId: Int, eventTime: Long, batteryState: BatteryState -> in <lambda>() method 143 assertEquals(true, batteryState.isPresent) in <lambda>() 144 assertEquals(BatteryState.STATUS_DISCHARGING, batteryState.status) in <lambda>() 145 assertEquals(0.5f, batteryState.capacity) in <lambda>()
|
/frameworks/base/core/java/android/hardware/input/ |
D | IInputDeviceBatteryListener.aidl | 28 void onBatteryStateChanged(in IInputDeviceBatteryState batteryState); in onBatteryStateChanged() argument
|
D | InputManager.java | 1339 int deviceId, long eventTimeMillis, @NonNull BatteryState batteryState); in onBatteryStateChanged() argument
|
/frameworks/base/services/tests/servicestests/src/com/android/server/input/ |
D | BatteryControllerTests.kt | 445 val batteryState = batteryController.getBatteryState(DEVICE_ID) in testGetBatteryState() constant 446 assertThat("battery state matches", batteryState, in testGetBatteryState() 461 val batteryState = batteryController.getBatteryState(DEVICE_ID) in testGetBatteryStateWithListener() constant 462 assertThat("battery matches state", batteryState, in testGetBatteryStateWithListener()
|