widget: if final json request fails, do not crash
This commit is contained in:
parent
068bc6bb81
commit
d363cb5346
@ -78,6 +78,7 @@ public class WidgetUpdateService extends Service {
|
|||||||
@Override
|
@Override
|
||||||
protected void onPostExecute(JsonElement result) {
|
protected void onPostExecute(JsonElement result) {
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
|
try {
|
||||||
JsonObject content = result.getAsJsonObject();
|
JsonObject content = result.getAsJsonObject();
|
||||||
|
|
||||||
if (content != null) {
|
if (content != null) {
|
||||||
@ -89,6 +90,9 @@ public class WidgetUpdateService extends Service {
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
view.setViewVisibility(R.id.progress, View.GONE);
|
view.setViewVisibility(R.id.progress, View.GONE);
|
||||||
|
Loading…
Reference in New Issue
Block a user