Pebble: do not display a toast when watchapp configuration could not be found during initialization of appmessage handler
Unfortunately all users without TimeStyle installed got an error in Gadgetbridge 0.17.2
This commit is contained in:
parent
4f45ad660d
commit
25433ef6bc
|
@ -28,8 +28,9 @@ class AppMessageHandlerHealthify extends AppMessageHandler {
|
||||||
JSONObject appKeys = getAppKeys();
|
JSONObject appKeys = getAppKeys();
|
||||||
KEY_TEMPERATURE = appKeys.getInt("TEMPERATURE");
|
KEY_TEMPERATURE = appKeys.getInt("TEMPERATURE");
|
||||||
KEY_CONDITIONS = appKeys.getInt("CONDITIONS");
|
KEY_CONDITIONS = appKeys.getInt("CONDITIONS");
|
||||||
} catch (IOException | JSONException e) {
|
} catch (JSONException e) {
|
||||||
GB.toast("There was an error accessing the watchface configuration.", Toast.LENGTH_LONG, GB.ERROR);
|
GB.toast("There was an error accessing the Helthify watchface configuration.", Toast.LENGTH_LONG, GB.ERROR);
|
||||||
|
} catch (IOException ignore) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -71,8 +71,9 @@ class AppMessageHandlerMorpheuz extends AppMessageHandler {
|
||||||
keyAutoReset = appKeys.getInt("keyAutoReset");
|
keyAutoReset = appKeys.getInt("keyAutoReset");
|
||||||
keySnoozes = appKeys.getInt("keySnoozes");
|
keySnoozes = appKeys.getInt("keySnoozes");
|
||||||
keyFault = appKeys.getInt("keyFault");
|
keyFault = appKeys.getInt("keyFault");
|
||||||
} catch (IOException | JSONException e) {
|
} catch (JSONException e) {
|
||||||
GB.toast("There was an error accessing the watchface configuration.", Toast.LENGTH_LONG, GB.ERROR);
|
GB.toast("There was an error accessing the morpheuz watchapp configuration.", Toast.LENGTH_LONG, GB.ERROR);
|
||||||
|
} catch (IOException ignore) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,8 +34,9 @@ class AppMessageHandlerSquare extends AppMessageHandler {
|
||||||
CfgKeyWeatherMode = appKeys.getInt("CfgKeyWeatherMode");
|
CfgKeyWeatherMode = appKeys.getInt("CfgKeyWeatherMode");
|
||||||
CfgKeyUseCelsius = appKeys.getInt("CfgKeyUseCelsius");
|
CfgKeyUseCelsius = appKeys.getInt("CfgKeyUseCelsius");
|
||||||
CfgKeyWeatherLocation = appKeys.getInt("CfgKeyWeatherLocation");
|
CfgKeyWeatherLocation = appKeys.getInt("CfgKeyWeatherLocation");
|
||||||
} catch (IOException | JSONException e) {
|
} catch (JSONException e) {
|
||||||
GB.toast("There was an error accessing the watchface configuration.", Toast.LENGTH_LONG, GB.ERROR);
|
GB.toast("There was an error accessing the Square watchface configuration.", Toast.LENGTH_LONG, GB.ERROR);
|
||||||
|
} catch (IOException ignore) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,8 +53,9 @@ class AppMessageHandlerTimeStylePebble extends AppMessageHandler {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (IOException | JSONException e) {
|
} catch (JSONException e) {
|
||||||
GB.toast("There was an error accessing the watchface configuration.", Toast.LENGTH_LONG, GB.ERROR);
|
GB.toast("There was an error accessing the timestyle watchface configuration.", Toast.LENGTH_LONG, GB.ERROR);
|
||||||
|
} catch (IOException ignore) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,8 +35,9 @@ class AppMessageHandlerTrekVolle extends AppMessageHandler {
|
||||||
MESSAGE_KEY_WEATHER_TEMPERATURE_MIN = appKeys.getInt("WEATHER_TEMPERATURE_MIN");
|
MESSAGE_KEY_WEATHER_TEMPERATURE_MIN = appKeys.getInt("WEATHER_TEMPERATURE_MIN");
|
||||||
MESSAGE_KEY_WEATHER_TEMPERATURE_MAX = appKeys.getInt("WEATHER_TEMPERATURE_MAX");
|
MESSAGE_KEY_WEATHER_TEMPERATURE_MAX = appKeys.getInt("WEATHER_TEMPERATURE_MAX");
|
||||||
MESSAGE_KEY_WEATHER_LOCATION = appKeys.getInt("WEATHER_LOCATION");
|
MESSAGE_KEY_WEATHER_LOCATION = appKeys.getInt("WEATHER_LOCATION");
|
||||||
} catch (IOException | JSONException e) {
|
} catch (JSONException e) {
|
||||||
GB.toast("There was an error accessing the watchface configuration.", Toast.LENGTH_LONG, GB.ERROR);
|
GB.toast("There was an error accessing the TrekVolle watchface configuration.", Toast.LENGTH_LONG, GB.ERROR);
|
||||||
|
} catch (IOException ignore) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue