mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-23 18:36:50 +01:00
Huawei: Fix battery notifications
This commit is contained in:
parent
f0cce348c4
commit
a0d7c8b77b
@ -25,10 +25,10 @@ import java.util.List;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.activities.devicesettings.DeviceSettingsPreferenceConst;
|
||||
import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEventBatteryInfo;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.HuaweiPacket;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.huawei.packets.DeviceConfig;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.BatteryState;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huawei.HuaweiSupportProvider;
|
||||
import nodomain.freeyourgadget.gadgetbridge.util.GB;
|
||||
|
||||
@ -61,6 +61,7 @@ public class GetBatteryLevelRequest extends Request {
|
||||
getDevice().setBatteryLevel(batteryLevel);
|
||||
|
||||
GBDeviceEventBatteryInfo batteryInfo = new GBDeviceEventBatteryInfo();
|
||||
batteryInfo.state = BatteryState.BATTERY_NORMAL;
|
||||
batteryInfo.level = (int)batteryLevel & 0xff;
|
||||
this.supportProvider.evaluateGBDeviceEvent(batteryInfo);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user