BatteryController: Add battery monitoring from Bluetooth
For input devices that are connected over Bluetooth, we will monitor their Bluetooth battery state by registering a BroadcastReceiver to listen to battery changes over Bluetooth. We always prioritize reporting the Bluetooth battery state first, and if invalid, fall back to using the battery state queried through the sysfs node. In this CL, we add a BluetoothBatteryManager interface to hide the details of dealing with the Bluetooth APIs to simplify testing. Bug: 243005009 Test: atest FrameworkServicesTest Test: manual, with Lenovo Precision Pen 3 Change-Id: I40864c0aeaf72c252a5f8d0b2217903613ca9543
Loading
Please register or sign in to comment