Activity manager context

pull/207/head
M66B 2 years ago
parent cb8db06dff
commit cc7363eff5

@ -1667,7 +1667,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
private void setOptions() {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
ActivityManager am = (ActivityManager) getContext().getSystemService(Context.ACTIVITY_SERVICE);
ActivityManager am = Helper.getSystemService(getContext(), ActivityManager.class);
int class_mb = am.getMemoryClass();
int class_large_mb = am.getLargeMemoryClass();
ActivityManager.MemoryInfo mi = new ActivityManager.MemoryInfo();

@ -1229,7 +1229,7 @@ public class Helper {
static void excludeFromRecents(Context context) {
try {
ActivityManager am = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
ActivityManager am = Helper.getSystemService(context, ActivityManager.class);;
if (am == null)
return;
@ -2667,7 +2667,7 @@ public class Helper {
}
static void clearAll(Context context) {
ActivityManager am = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
ActivityManager am = Helper.getSystemService(context, ActivityManager.class);;
am.clearApplicationUserData();
}
}

Loading…
Cancel
Save