Add InputDeviceBatteryListener to InputManager
System apps can now register an InputDeviceBatteryListener on a
per-device basis to be notified of battery changes.
- InputManager manages registration of the binder callback with
InputManagerService to ensure that there is only one battery
listener per process.
- The battery listener is invoked immediately upon registration
to provide the initial battery state for the device.
- The callbacks are removed automatically when the process dies.
- This CL does not yet identify changes in battery state for monitored
devices.
DD: go/inputdevice-battery-notifications
Bug: 243005009
Test: atest FrameworkServicesTests
Test: atest FrameworkCoreTests
Change-Id: Idf2b06a099155a6f5cc13b55dcd40852f54aa56c
Merged-In: Idf2b06a099155a6f5cc13b55dcd40852f54aa56c
(cherry picked from commit e86f73ac50a26d5719815aed320c95d340f464db)
8 files changed