Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 069e86f5 authored by Michael Wright's avatar Michael Wright
Browse files

Make ActivityManager a local variable.

It's never accessed outside of windowManagerAndInputReady, so we don't
need it to be a field.

Bug: 342006701
Test: compile
Change-Id: I30a472ef509ae08e76d9670d1874d86a1222acfc
parent d582f554
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -274,7 +274,6 @@ public final class DisplayManagerService extends SystemService {
    private WindowManagerInternal mWindowManagerInternal;
    private InputManagerInternal mInputManagerInternal;
    private ActivityManagerInternal mActivityManagerInternal;
    private ActivityManager mActivityManager;
    private UidImportanceListener mUidImportanceListener = new UidImportanceListener();
    @Nullable
    private IMediaProjectionManager mProjectionService;
@@ -763,8 +762,8 @@ public final class DisplayManagerService extends SystemService {
            mWindowManagerInternal = LocalServices.getService(WindowManagerInternal.class);
            mInputManagerInternal = LocalServices.getService(InputManagerInternal.class);
            mActivityManagerInternal = LocalServices.getService(ActivityManagerInternal.class);
            mActivityManager = mContext.getSystemService(ActivityManager.class);
            mActivityManager.addOnUidImportanceListener(mUidImportanceListener, IMPORTANCE_CACHED);
            ActivityManager activityManager = mContext.getSystemService(ActivityManager.class);
            activityManager.addOnUidImportanceListener(mUidImportanceListener, IMPORTANCE_CACHED);

            mDeviceStateManager = LocalServices.getService(DeviceStateManagerInternal.class);
            mContext.getSystemService(DeviceStateManager.class).registerCallback(