mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-29 13:26:50 +01:00
Zepp OS: Fix shortcut cards setting on Zepp OS 2.1
This commit is contained in:
parent
56be4c7bee
commit
ee5325418a
@ -134,7 +134,7 @@ public class ZeppOsShortcutCardsService extends AbstractZeppOsService {
|
|||||||
case CMD_CAPABILITIES_RESPONSE:
|
case CMD_CAPABILITIES_RESPONSE:
|
||||||
version = payload[1];
|
version = payload[1];
|
||||||
getSupport().evaluateGBDeviceEvent(new GBDeviceEventUpdatePreferences(PREF_VERSION, version));
|
getSupport().evaluateGBDeviceEvent(new GBDeviceEventUpdatePreferences(PREF_VERSION, version));
|
||||||
if (version != 3) {
|
if (version != 3 && version != 4) {
|
||||||
LOG.warn("Unsupported shortcut cards service version {}", version);
|
LOG.warn("Unsupported shortcut cards service version {}", version);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -268,6 +268,7 @@ public class ZeppOsShortcutCardsService extends AbstractZeppOsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isSupported(final Prefs devicePrefs) {
|
public static boolean isSupported(final Prefs devicePrefs) {
|
||||||
return devicePrefs.getInt(PREF_VERSION, 0) == 3;
|
final int version = devicePrefs.getInt(PREF_VERSION, 0);
|
||||||
|
return version == 3 || version == 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user