mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-26 00:21:45 +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 {
|
public enum AlwaysOnDisplay {
|
||||||
OFF,
|
OFF,
|
||||||
AUTO,
|
AUTOMATIC,
|
||||||
SCHEDULED,
|
SCHEDULED,
|
||||||
ALWAYS
|
ALWAYS
|
||||||
}
|
}
|
||||||
|
@ -565,7 +565,7 @@ public class Huami2021Config {
|
|||||||
case 0x00:
|
case 0x00:
|
||||||
return singletonMap(configArg.getPrefKey(), AlwaysOnDisplay.OFF.name().toLowerCase(Locale.ROOT));
|
return singletonMap(configArg.getPrefKey(), AlwaysOnDisplay.OFF.name().toLowerCase(Locale.ROOT));
|
||||||
case 0x01:
|
case 0x01:
|
||||||
return singletonMap(configArg.getPrefKey(), AlwaysOnDisplay.AUTO.name().toLowerCase(Locale.ROOT));
|
return singletonMap(configArg.getPrefKey(), AlwaysOnDisplay.AUTOMATIC.name().toLowerCase(Locale.ROOT));
|
||||||
case 0x02:
|
case 0x02:
|
||||||
return singletonMap(configArg.getPrefKey(), AlwaysOnDisplay.SCHEDULED.name().toLowerCase(Locale.ROOT));
|
return singletonMap(configArg.getPrefKey(), AlwaysOnDisplay.SCHEDULED.name().toLowerCase(Locale.ROOT));
|
||||||
case 0x03:
|
case 0x03:
|
||||||
|
@ -1155,7 +1155,7 @@ public abstract class Huami2021Support extends HuamiSupport {
|
|||||||
|
|
||||||
final byte aodByte;
|
final byte aodByte;
|
||||||
switch (alwaysOnDisplay) {
|
switch (alwaysOnDisplay) {
|
||||||
case AUTO:
|
case AUTOMATIC:
|
||||||
aodByte = 0x01;
|
aodByte = 0x01;
|
||||||
break;
|
break;
|
||||||
case SCHEDULED:
|
case SCHEDULED:
|
||||||
|
Loading…
Reference in New Issue
Block a user