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

Commit f45df50b authored by Tim Murray's avatar Tim Murray
Browse files

ActivityTaskManagerService: clear previous if it becomes topApp

The same app shouldn't be top and previous. When topApp changes, if
the same app is previous, clear previous.

Test: atest WmTests:WindowStateTests
Bug: 262213347

Change-Id: Ia0e3fd2adf1c9c16e8d24b89785d6cd33f74d962
parent 8e2fe256
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -4841,6 +4841,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
                // If there is no resumed activity, it will choose the pausing or focused activity.
                : mRootWindowContainer.getTopResumedActivity();
        mTopApp = top != null ? top.app : null;
        if (mTopApp == mPreviousProcess) mPreviousProcess = null;
    }

    /**