From 1e3efd7d3b48c268bd6f4ec58d89a06ce0e044e5 Mon Sep 17 00:00:00 2001 From: Philipp Schaefer Date: Sun, 29 Sep 2013 00:38:38 +0200 Subject: [PATCH] bugfix: run setLoadingState on UI thread in CheckHttpResponse --- .../com/cradle/iitc_mobile/async/CheckHttpResponse.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mobile/src/com/cradle/iitc_mobile/async/CheckHttpResponse.java b/mobile/src/com/cradle/iitc_mobile/async/CheckHttpResponse.java index 431dee3c..057b0c74 100644 --- a/mobile/src/com/cradle/iitc_mobile/async/CheckHttpResponse.java +++ b/mobile/src/com/cradle/iitc_mobile/async/CheckHttpResponse.java @@ -43,7 +43,13 @@ public class CheckHttpResponse extends AsyncTask { int code = response.getStatusLine().getStatusCode(); if (code != HttpStatus.SC_OK) { Log.d("iitcm", "received error code: " + code); - ((IITC_Mobile) mContext).setLoadingState(false); + final IITC_Mobile iitc = (IITC_Mobile) mContext; + iitc.runOnUiThread(new Runnable() { + @Override + public void run() { + iitc.setLoadingState(false); + } + }); // TODO: remove when google login issue is fixed if (urls[0].contains("uberauth=WILL_NOT_SIGN_IN")) { return true;