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

Commit 318e5288 authored by Jorim Jaggi's avatar Jorim Jaggi Committed by Android (Google) Code Review
Browse files

Merge "Defer stop for all activities becoming invisible" into pi-dev

parents 205a5581 b824f87c
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1653,6 +1653,13 @@ class ActivityStack<T extends StackWindowController> extends ConfigurationContai
    void addToStopping(ActivityRecord r, boolean scheduleIdle, boolean idleDelayed) {
        if (!mStackSupervisor.mStoppingActivities.contains(r)) {
            mStackSupervisor.mStoppingActivities.add(r);

            // Some activity is waiting for another activity to become visible before it's being
            // stopped, which means that we also want to wait with stopping this one to avoid
            // flickers.
            if (!mStackSupervisor.mActivitiesWaitingForVisibleActivity.isEmpty()) {
                mStackSupervisor.mActivitiesWaitingForVisibleActivity.add(r);
            }
        }

        // If we already have a few activities waiting to stop, then give up