use of nodomain.freeyourgadget.gadgetbridge.service.devices.qhybrid.requests.fossil.SetDeviceStateRequest in project Gadgetbridge by Freeyourgadget.
the class FossilHRWatchAdapter method initializeAfterWatchConfirmation.
private void initializeAfterWatchConfirmation(boolean authenticated) {
setNotificationConfigurations();
setQuickRepliesConfiguration();
if (authenticated) {
setVibrationStrength();
setUnitsConfig();
syncSettings();
setTime();
}
overwriteButtons(null);
loadBackground();
loadWidgets();
// renderWidgets();
// dunno if there is any point in doing this at start since when no watch is connected the QHybridSupport will not receive any intents anyway
queueWrite(new SetDeviceStateRequest(GBDevice.State.INITIALIZED));
}
use of nodomain.freeyourgadget.gadgetbridge.service.devices.qhybrid.requests.fossil.SetDeviceStateRequest in project Gadgetbridge by Freeyourgadget.
the class FossilHRWatchAdapter method initializeAfterAuthentication.
private void initializeAfterAuthentication(boolean authenticated) {
queueWrite(new SetDeviceStateRequest(GBDevice.State.INITIALIZING));
if (!authenticated) {
GB.toast(getContext().getString(R.string.fossil_hr_auth_failed), Toast.LENGTH_LONG, GB.ERROR);
initializeAfterWatchConfirmation(false);
return;
}
boolean versionSupportsConfirmation = getCleanFWVersion().compareTo(new Version("1.0.2.22")) != -1;
if (!versionSupportsConfirmation) {
initializeAfterWatchConfirmation(true);
return;
}
boolean shouldAuthenticateOnWatch = getDeviceSpecificPreferences().getBoolean("enable_on_device_confirmation", true);
if (!shouldAuthenticateOnWatch) {
GB.toast("Skipping on-device confirmation", Toast.LENGTH_SHORT, GB.INFO);
initializeAfterWatchConfirmation(false);
return;
}
confirmOnWatch();
}
use of nodomain.freeyourgadget.gadgetbridge.service.devices.qhybrid.requests.fossil.SetDeviceStateRequest in project Gadgetbridge by Freeyourgadget.
the class FossilWatchAdapter method initializeWithSupportedFileVersions.
protected void initializeWithSupportedFileVersions() {
syncConfiguration();
syncNotificationSettings();
syncButtonSettings();
queueWrite(new SetDeviceStateRequest(GBDevice.State.INITIALIZED), false);
}
use of nodomain.freeyourgadget.gadgetbridge.service.devices.qhybrid.requests.fossil.SetDeviceStateRequest in project Gadgetbridge by Freeyourgadget.
the class FossilHRWatchAdapter method initializeWithSupportedFileVersions.
@Override
protected void initializeWithSupportedFileVersions() {
if (getDeviceSupport().getDevice().getFirmwareVersion().contains("prod")) {
GB.toast("Dummy FW, skipping initialization", Toast.LENGTH_LONG, GB.INFO);
queueWrite(new SetDeviceStateRequest(GBDevice.State.INITIALIZED), false);
return;
}
queueWrite(new SetDeviceStateRequest(GBDevice.State.AUTHENTICATING));
negotiateSymmetricKey();
}
Aggregations