mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-27 03:15:39 +01:00
Refactoring
This commit is contained in:
@@ -447,7 +447,7 @@ public abstract class DB extends RoomDatabase {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
int sqlite_cache = prefs.getInt("sqlite_cache", DEFAULT_CACHE_SIZE);
|
||||
|
||||
ActivityManager am = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
|
||||
ActivityManager am = Helper.getSystemService(context, ActivityManager.class);
|
||||
int class_mb = am.getMemoryClass();
|
||||
int cache_size = sqlite_cache * class_mb * 1024 / 100;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user