mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-25 19:36:50 +01:00
Zepp OS: Make Alexa an experimental feature
This commit is contained in:
parent
3716a031ce
commit
58704a0eec
@ -450,7 +450,7 @@ public abstract class Huami2021Coordinator extends HuamiCoordinator {
|
||||
}
|
||||
|
||||
public boolean supportsAlexa(final GBDevice device) {
|
||||
return ZeppOsAlexaService.isSupported(getPrefs(device));
|
||||
return experimentalFeatures(device) && ZeppOsAlexaService.isSupported(getPrefs(device));
|
||||
}
|
||||
|
||||
private boolean supportsConfig(final GBDevice device, final ZeppOsConfigService.ConfigArg config) {
|
||||
@ -474,4 +474,8 @@ public abstract class Huami2021Coordinator extends HuamiCoordinator {
|
||||
public static boolean deviceHasConfig(final Prefs devicePrefs, final ZeppOsConfigService.ConfigArg config) {
|
||||
return devicePrefs.getBoolean(Huami2021Coordinator.getPrefKnownConfig(config.name()), false);
|
||||
}
|
||||
|
||||
public static boolean experimentalFeatures(final GBDevice device) {
|
||||
return getPrefs(device).getBoolean("zepp_os_experimental_features", false);
|
||||
}
|
||||
}
|
||||
|
@ -148,8 +148,10 @@ public class ZeppOsAlexaService extends AbstractZeppOsService {
|
||||
|
||||
@Override
|
||||
public void initialize(final TransactionBuilder builder) {
|
||||
requestCapabilities(builder);
|
||||
requestLanguages(builder);
|
||||
if (Huami2021Coordinator.experimentalFeatures(getSupport().getDevice())) {
|
||||
requestCapabilities(builder);
|
||||
requestLanguages(builder);
|
||||
}
|
||||
}
|
||||
|
||||
public void requestCapabilities(final TransactionBuilder builder) {
|
||||
|
Loading…
Reference in New Issue
Block a user