diff options
| author | 2022-09-26 17:15:21 +0000 | |
|---|---|---|
| committer | 2022-10-26 20:31:25 +0000 | |
| commit | 6d5a29bc19f7a13404ec20a930d0c9f1245a157a (patch) | |
| tree | 1bf84d5f581831ede845f84bc9a9b33819259cae /libs/androidfw/StringPool.cpp | |
| parent | 545592604ba536896d597845e8db8049e451a135 (diff) | |
Introduce monitoring behavior changes for USI devices (3/n)
Extend USI battery timeout when stylus presence is detected.
The kernel only sends a UEvent for a battery node if there is a change
in the battery state. For example, when a stylus is first being used,
its battery value will be reported via a UEvent. If the stylus is used
again the next day and its battery level has not changed, no UEvent will
be produced.
To address this case, we will validate the USI battery state whenever
the presence of a stylus is detected and extend the validity timeout.
The only exception is when the stylus battery capacity is 0. When
Android first boots, the USI battery capacity will be repoted as 0. In
the event that stylus presence is detected before the battery level is
updated, we do not want to notify listeners of the capacity being 0.
Bug: 243005009
Test: atest BatteryControllerTests
Change-Id: I746496b618d7a6f51f34db65e69e7eb88c92fc87
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions