mirror of
https://github.com/xoureldeen/Vectras-VM-Android.git
synced 2026-04-28 14:30:03 +00:00
v2.9.5.9-3dfx
This commit is contained in:
parent
73c213b757
commit
0b76e11a05
37 changed files with 1511 additions and 1034 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue