Has small memory class

This commit is contained in:
M66B
2024-07-12 09:56:58 +02:00
parent 3cb91d92cd
commit a2b163cef4
2 changed files with 14 additions and 3 deletions

View File

@@ -924,6 +924,16 @@ public class Helper {
}
}
static boolean hasSmallMemoryClass(Context context) {
try {
ActivityManager am = Helper.getSystemService(context, ActivityManager.class);
return (am.getMemoryClass() < 256);
} catch (Throwable ex) {
Log.e(ex);
return false;
}
}
// View
static int getMaxTextureSize() {