Update FileUtil.java

pull/183/head
FongMi 3 years ago
parent 03e14d44e3
commit 605ffad2f8
  1. 7
      app/src/main/java/com/fongmi/android/tv/utils/FileUtil.java

@ -44,10 +44,6 @@ public class FileUtil {
return new File(getRootPath() + File.separator + path);
}
public static File getExternalCacheDir() {
return App.get().getExternalCacheDir();
}
public static File getCacheDir() {
return App.get().getCacheDir();
}
@ -190,14 +186,13 @@ public class FileUtil {
new WebView(App.get()).clearCache(true);
App.execute(() -> {
clearDir(getCacheDir());
clearDir(getExternalCacheDir());
App.post(callback::success);
});
}
public static void getCacheSize(Callback callback) {
App.execute(() -> {
String result = byteCountToDisplaySize(getFolderSize(getCacheDir()) + getFolderSize(getExternalCacheDir()));
String result = byteCountToDisplaySize(getFolderSize(getCacheDir()));
App.post(() -> callback.success(result));
});
}

Loading…
Cancel
Save