v2.9.5.9-3dfx

This commit is contained in:
An Bui 2025-09-23 09:55:41 +07:00
parent 73c213b757
commit 0b76e11a05
37 changed files with 1511 additions and 1034 deletions

View file

@ -26,7 +26,7 @@ public class DeviceUtils {
return memoryInfo.totalMem;
}
public static boolean isStorageLow(Context context) {
public static boolean isStorageLow(Context context, boolean isCheckVeryLow) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
try {
File path = Environment.getDataDirectory();
@ -51,7 +51,7 @@ public class DeviceUtils {
long availableBytes = statsManager.getFreeBytes(uuid);
long availableMB = availableBytes / (1024 * 1024);
return availableMB < 2048;
return availableMB < (isCheckVeryLow ? 256 : 2048);
} catch (IOException e) {
Log.e(TAG, "Error getting storage stats", e);
}