mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2026-04-20 09:37:07 -04:00
Memory settings changes
- Allow allocate up to 1100mb for 32bit (note: not all devices can get to this, so don’t report crash if set too much!) - Allow allocate more than 4GB for 64bit if free memory is over 4GB.
This commit is contained in:
@@ -48,10 +48,12 @@ public class LauncherPreferenceFragment extends PreferenceFragmentCompat impleme
|
||||
seek6.setMax(300);
|
||||
seek6.setSuffix(" %");
|
||||
|
||||
long freeMem = Runtime.getRuntime().freeMemory() / 1048576;
|
||||
|
||||
CustomSeekBarPreference seek7 = (CustomSeekBarPreference) findPreference("allocation");
|
||||
seek7.setMin(256);
|
||||
if(Tools.CURRENT_ARCHITECTURE.contains("32")) seek7.setMax(800);
|
||||
else seek7.setMax(4096);
|
||||
if(Tools.CURRENT_ARCHITECTURE.contains("32")) seek7.setMax(1100);
|
||||
else seek7.setMax(freeMem > 4096 ? freeMem : 4096);
|
||||
seek7.setValue(LauncherPreferences.PREF_RAM_ALLOCATION);
|
||||
seek7.setSuffix(" MB");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user