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

Commit 8b385935 authored by Chong Zhang's avatar Chong Zhang Committed by android-build-merger
Browse files

Merge "Don\'t wait for visible if there is no running activity left." into nyc-dev

am: 103fdec4

* commit '103fdec4':
  Don't wait for visible if there is no running activity left.

Change-Id: Iea963aa552092cea3d06e929b7a2828caba5bf4b
parents 50165901 103fdec4
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -3459,8 +3459,11 @@ final class ActivityStack {
        // First things first: if this activity is currently visible,
        // and the resumed activity is not yet visible, then hold off on
        // finishing until the resumed one becomes visible.

        final ActivityRecord next = mStackSupervisor.topRunningActivityLocked();

        if (mode == FINISH_AFTER_VISIBLE && (r.visible || r.nowVisible)
                && !mStackSupervisor.allResumedActivitiesVisible()) {
                && next != null && !next.nowVisible) {
            if (!mStackSupervisor.mStoppingActivities.contains(r)) {
                addToStopping(r, false /* immediate */);
            }