mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-03 08:52:58 +01:00
b902ee96c3
Because the reporting of battery state is inconsistent between different models, the device's battery state was not correctly processed in GB. For at least the firmware on the Xiaomi Watch S1 Active, the charger state is broadcast through a separate message from the message containing the battery level. Even though the battery level was requested by GB upon receiving this broadcast, the charger state got discarded as it was expected to also be included in the result of the subsequent request. This patch changes the name of the `Charger` message to `DeviceState` and includes more fields that may be presented by some device models. Furthemore, the broadcast is cached so that the charger state can be processed from this cache instead of the battery level response message. |
||
---|---|---|
.. | ||
src | ||
build.gradle | ||
lint-baseline.xml | ||
proguard-rules.pro |