|
|
@@ -1,11 +1,13 @@
|
|
|
package com.xzjmyk.pm.activity.ui.me;
|
|
|
|
|
|
+import android.annotation.TargetApi;
|
|
|
import android.app.AlertDialog;
|
|
|
import android.app.ProgressDialog;
|
|
|
import android.content.DialogInterface;
|
|
|
import android.content.Intent;
|
|
|
import android.net.Uri;
|
|
|
import android.os.AsyncTask;
|
|
|
+import android.os.Build;
|
|
|
import android.os.Bundle;
|
|
|
import android.text.TextUtils;
|
|
|
import android.util.Log;
|
|
|
@@ -216,13 +218,17 @@ public class SettingActivity extends ActionBackActivity implements View.OnClickL
|
|
|
}
|
|
|
}).create().show();
|
|
|
}
|
|
|
+ @TargetApi(Build.VERSION_CODES.HONEYCOMB)
|
|
|
private void clearCache() {
|
|
|
String filePath = MyApplication.getInstance().mAppDir;
|
|
|
//删除文件
|
|
|
VideoFileDao.getInstance().deleteAllVideoFile(
|
|
|
VideoFileDao.getInstance().getVideoFiles(
|
|
|
MyApplication.getInstance().mLoginUser.getUserId()));
|
|
|
- new ClearCacheAsyncTaska(filePath).execute(true);
|
|
|
+ if (Build.VERSION.SDK_INT >= 11)
|
|
|
+ new ClearCacheAsyncTaska(filePath).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR,true);
|
|
|
+ else
|
|
|
+ new ClearCacheAsyncTaska(filePath).execute(true);
|
|
|
}
|
|
|
|
|
|
private class ClearCacheAsyncTaska extends AsyncTask<Boolean, String, Integer> {
|