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

Commit bcfd5347 authored by wilsonshih's avatar wilsonshih
Browse files

Fix KeyguardController::mDisplayStates leak

ActivityDisplay#remove doesn't ensure this display be remove directly,
should move KeyguardController::onDisplayRemoved into releaseSelfIfNeeded.

Bug: 118238630
Test: atest ActivityManagerMultiDisplayTests#testNoLeakOnExternalDisplay.

Change-Id: Ia9619c59da8be736f71af1b8fddc14b4798c966e
parent e4ae7ea0
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1035,8 +1035,6 @@ class ActivityDisplay extends ConfigurationContainer<ActivityStack>

        releaseSelfIfNeeded();

        mSupervisor.getKeyguardController().onDisplayRemoved(mDisplayId);

        if (!mAllSleepTokens.isEmpty()) {
            mSupervisor.mSleepTokens.removeAll(mAllSleepTokens);
            mAllSleepTokens.clear();
@@ -1049,6 +1047,7 @@ class ActivityDisplay extends ConfigurationContainer<ActivityStack>
            mWindowContainerController.removeContainer();
            mWindowContainerController = null;
            mSupervisor.removeChild(this);
            mSupervisor.getKeyguardController().onDisplayRemoved(mDisplayId);
        }
    }