Move GetCacheSizeAsync to main thread
This commit is contained in:
parent
6481399d27
commit
3a71397f15
1 changed files with 3 additions and 4 deletions
|
@ -655,14 +655,13 @@ public class SettingsActivity extends PreferenceActivity {
|
|||
protected Boolean doInBackground(Void... params) {
|
||||
DatabaseConnectionOrm dbConn = new DatabaseConnectionOrm(_mActivity);
|
||||
dbConn.resetDatabase();
|
||||
boolean success = ImageHandler.clearCache(_mActivity);
|
||||
new GetCacheSizeAsync().execute((Void)null);
|
||||
return success;
|
||||
return ImageHandler.clearCache(_mActivity);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(Boolean result) {
|
||||
pd.dismiss();
|
||||
new GetCacheSizeAsync().execute((Void)null);
|
||||
pd.dismiss();
|
||||
if(result)
|
||||
LoginDialogFragment.ShowAlertDialog("Information" , "Cache is cleared!", _mActivity);
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue