mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-02-04 14:07:32 +01: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:
parent
6a397b9119
commit
7409349154
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user