mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-11 09:31:59 +01:00
Huami: Fix crash when selecting automatic Always On Display
Fixes #2889
This commit is contained in:
parent
7ae2ec1dcf
commit
8c69a8a007
@ -18,7 +18,7 @@ package nodomain.freeyourgadget.gadgetbridge.devices.huami;
|
||||
|
||||
public enum AlwaysOnDisplay {
|
||||
OFF,
|
||||
AUTO,
|
||||
AUTOMATIC,
|
||||
SCHEDULED,
|
||||
ALWAYS
|
||||
}
|
||||
|
@ -565,7 +565,7 @@ public class Huami2021Config {
|
||||
case 0x00:
|
||||
return singletonMap(configArg.getPrefKey(), AlwaysOnDisplay.OFF.name().toLowerCase(Locale.ROOT));
|
||||
case 0x01:
|
||||
return singletonMap(configArg.getPrefKey(), AlwaysOnDisplay.AUTO.name().toLowerCase(Locale.ROOT));
|
||||
return singletonMap(configArg.getPrefKey(), AlwaysOnDisplay.AUTOMATIC.name().toLowerCase(Locale.ROOT));
|
||||
case 0x02:
|
||||
return singletonMap(configArg.getPrefKey(), AlwaysOnDisplay.SCHEDULED.name().toLowerCase(Locale.ROOT));
|
||||
case 0x03:
|
||||
|
@ -1155,7 +1155,7 @@ public abstract class Huami2021Support extends HuamiSupport {
|
||||
|
||||
final byte aodByte;
|
||||
switch (alwaysOnDisplay) {
|
||||
case AUTO:
|
||||
case AUTOMATIC:
|
||||
aodByte = 0x01;
|
||||
break;
|
||||
case SCHEDULED:
|
||||
|
Loading…
Reference in New Issue
Block a user