mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-24 23:12:55 +00:00
Activity manager context
This commit is contained in:
parent
cb8db06dff
commit
cc7363eff5
2 changed files with 3 additions and 3 deletions
|
@ -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…
Reference in a new issue