diff options
| author | 2022-09-07 19:08:48 +0000 | |
|---|---|---|
| committer | 2022-09-13 20:56:44 +0000 | |
| commit | e4f97779fb3eeee48c10d8aa7f865857a730e721 (patch) | |
| tree | cb111e2eaf4dd68a0c8de3f44323ed3d45fe1323 /libs/androidfw/StringPool.cpp | |
| parent | 4fb7c87f8bbf5ce7359c23b1102756e415841c2d (diff) | |
Update monitored InputDevice battery state on an UEvent notification
When the battery state of any input device is being monitored, we will
register a UEventObserver to listen to all UEvents sent by the
power_supply subsystem.
When we receive a UEvent that notifies us of changes to any batteries,
we will query the battery status of that device, and notify listeners
if there was a change in the state.
The last known battery state of a monitored device is tracked in the
MonitoredDeviceState class in BatteryController.
BatteryController will only start listening to UEvents for a device if
it has a battery, and will update its UEvent listeners based on the
battery presence.
DD: go/inputdevice-battery-notifications
Bug: 243005009
Test: atest InputDeviceBatteryControllerTests
Change-Id: Ic16e1e4aba3bb6371c57f042004844fd78989582
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions