Fix ali cache on some tv devices

This commit is contained in:
FongMi 2023-05-14 23:55:17 +08:00
parent 4c1ee8521b
commit 07c41a8879
3 changed files with 7 additions and 3 deletions

View File

@ -11,12 +11,16 @@ import java.io.InputStreamReader;
public class FileUtil {
public static File getCacheDir() {
public static File getExternalCacheDir() {
return Init.context().getExternalCacheDir();
}
public static File getCacheDir() {
return Init.context().getCacheDir();
}
public static File getCacheFile(String fileName) {
return new File(getCacheDir(), fileName);
return getExternalCacheDir().canWrite() ? new File(getExternalCacheDir(), fileName) : new File(getCacheDir(), fileName);
}
public static void write(File file, String data) {

Binary file not shown.

View File

@ -1 +1 @@
ecddb20dad437ff099b1e777bc5545ab
5c42e2f85ec3f05bfd281e4fcf40468a