Loading
Introduce monitoring behavior changes for USI devices (2/n)
- USI devices are always expected to report a UEvent whenever the battery state changes. This signals that the current stylus battery level has changed. This means we should only consider the USI battery state as valid when we receive a new UEvent. - Once a stylus battery has been reported, the sysfs battery node will report the last value perpetually, until the next change, even if the stylus is no longer being used. To handle this, we set a validity period, where the USI battery is only valid for a fixed time period (one hour) after the last time the battery changed. DD: go/inputdevice-battery-notifications Bug: 243005009 Test: atest FrameworkServicesTests Test: manual with USI 2.0 device Change-Id: I1c43a04208601c3dda19aa18f1ede3303ececc97