Address potential performance issue
This commit is contained in:
parent
69fad87166
commit
08760618d1
|
@ -239,8 +239,12 @@ public class FeedInfoActivity extends ActionBarActivity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
if (android.os.Build.VERSION.SDK_INT > android.os.Build.VERSION_CODES.GINGERBREAD_MR1) {
|
||||||
|
loadTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, feedId);
|
||||||
|
} else {
|
||||||
loadTask.execute(feedId);
|
loadTask.execute(feedId);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private boolean authInfoChanged = false;
|
private boolean authInfoChanged = false;
|
||||||
|
|
|
@ -121,7 +121,7 @@ public class GpodnetAuthenticationActivity extends ActionBarActivity {
|
||||||
final String passwordStr = password.getText().toString();
|
final String passwordStr = password.getText().toString();
|
||||||
|
|
||||||
if (BuildConfig.DEBUG) Log.d(TAG, "Checking login credentials");
|
if (BuildConfig.DEBUG) Log.d(TAG, "Checking login credentials");
|
||||||
new AsyncTask<GpodnetService, Void, Void>() {
|
AsyncTask<GpodnetService, Void, Void> authTask = new AsyncTask<GpodnetService, Void, Void>() {
|
||||||
|
|
||||||
volatile Exception exception;
|
volatile Exception exception;
|
||||||
|
|
||||||
|
@ -160,7 +160,12 @@ public class GpodnetAuthenticationActivity extends ActionBarActivity {
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}.execute(service);
|
};
|
||||||
|
if (android.os.Build.VERSION.SDK_INT > android.os.Build.VERSION_CODES.GINGERBREAD_MR1) {
|
||||||
|
authTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, service);
|
||||||
|
} else {
|
||||||
|
authTask.execute();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue