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

Commit 35cdd6dd authored by Wale Ogunwale's avatar Wale Ogunwale
Browse files

Fixed bug with activity moved to pinned stack left in resumed state.

When we move an activities task to the pinned stack, we were checking
if the previous activity stack is the currently focused stack to see
if the activity was resumed. It is possible we changed the focused
stack which will cause this check to fail and we will fail to detect
that the activity was in the resumed state there by failing to transition
it to the paused state. We now only check that the activity is the
resumed activity in the previous stack which is sufficient.

Bug: 28023315
Change-Id: I0782f385b7ee53307ed9c95e3048bcb4353463f7
parent 03f1e026
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2270,7 +2270,7 @@ public final class ActivityStackSupervisor implements DisplayListener {
        final ActivityRecord r = task.getTopActivity();
        final ActivityStack prevStack = task.stack;
        final boolean wasFocused = isFocusedStack(prevStack) && (topRunningActivityLocked() == r);
        final boolean wasResumed = wasFocused && (prevStack.mResumedActivity == r);
        final boolean wasResumed = prevStack.mResumedActivity == r;
        // In some cases the focused stack isn't the front stack. E.g. pinned stack.
        // Whenever we are moving the top activity from the front stack we want to make sure to move
        // the stack to the front.