Refactoring

This commit is contained in:
M66B
2022-04-13 22:27:33 +02:00
parent 481ca4d2d0
commit ff3f9df450
49 changed files with 129 additions and 152 deletions

View File

@@ -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;