Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 854d4bde authored by Prabir Pradhan's avatar Prabir Pradhan
Browse files

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
parent bc1cd9c1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment