Register battery callbacks from USI notification startable.
This fixes a regression whew the stylus low battery notifications wasn't showing. Bug: 269087753 Test: StylusUsiPowerStartableTest Change-Id: I781b36b340cc808fff566e40019304d283c7e3d6
This commit is contained in:
@@ -74,6 +74,7 @@ constructor(
|
||||
|
||||
stylusUsiPowerUi.init()
|
||||
stylusManager.registerCallback(this)
|
||||
stylusManager.registerBatteryCallback(this)
|
||||
stylusManager.startListener()
|
||||
}
|
||||
|
||||
|
||||
@@ -91,6 +91,14 @@ class StylusUsiPowerStartableTest : SysuiTestCase() {
|
||||
verify(stylusUsiPowerUi, times(1)).init()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun start_registersCallbacks() {
|
||||
startable.start()
|
||||
|
||||
verify(stylusManager, times(1)).registerCallback(startable)
|
||||
verify(stylusManager, times(1)).registerBatteryCallback(startable)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun onStylusAdded_internal_updatesNotificationSuppression() {
|
||||
startable.onStylusAdded(STYLUS_DEVICE_ID)
|
||||
|
||||
Reference in New Issue
Block a user