mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Ensure battery states are kept in their correct battery indices
Seems to have missed adding the index here, causing devices with multiple batteries (like that of wireless earbuds) to have incorrect states despite being set properly from their respective device support code. Signed-off-by: John Vincent Corcega <git@tenseventyseven.xyz>
This commit is contained in:
committed by
José Rebelo
parent
6a397b9119
commit
7409349154
+1
-1
@@ -550,7 +550,7 @@ public abstract class AbstractDeviceSupport implements DeviceSupport {
|
||||
Context context = getContext();
|
||||
LOG.info("Got BATTERY_INFO device event");
|
||||
gbDevice.setBatteryLevel(deviceEvent.level, deviceEvent.batteryIndex);
|
||||
gbDevice.setBatteryState(deviceEvent.state);
|
||||
gbDevice.setBatteryState(deviceEvent.state, deviceEvent.batteryIndex);
|
||||
gbDevice.setBatteryVoltage(deviceEvent.voltage, deviceEvent.batteryIndex);
|
||||
|
||||
final DevicePrefs devicePrefs = GBApplication.getDevicePrefs(gbDevice);
|
||||
|
||||
Reference in New Issue
Block a user