bugfix: run setLoadingState on UI thread in CheckHttpResponse

This commit is contained in:
Philipp Schaefer 2013-09-29 00:38:38 +02:00
parent 924c384ab9
commit 1e3efd7d3b

View File

@ -43,7 +43,13 @@ public class CheckHttpResponse extends AsyncTask<String, Void, Boolean> {
int code = response.getStatusLine().getStatusCode(); int code = response.getStatusLine().getStatusCode();
if (code != HttpStatus.SC_OK) { if (code != HttpStatus.SC_OK) {
Log.d("iitcm", "received error code: " + code); 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 // TODO: remove when google login issue is fixed
if (urls[0].contains("uberauth=WILL_NOT_SIGN_IN")) { if (urls[0].contains("uberauth=WILL_NOT_SIGN_IN")) {
return true; return true;