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

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

Merge "Only layout surfaces if applicable when app is going away"

parents 53dc18ba d0752818
Loading
Loading
Loading
Loading
+13 −11
Original line number Diff line number Diff line
@@ -6270,21 +6270,23 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
                    finishInstrumentationCallback.run();
                }

                if (!restarting && hasVisibleActivities) {
                    mWindowManager.deferSurfaceLayout();
                    try {
                    if (!restarting && hasVisibleActivities
                            && !mRootActivityContainer.resumeFocusedStacksTopActivities()) {
                        // If there was nothing to resume, and we are not already restarting this
                        // process, but there is a visible activity that is hosted by the process...
                        // then make sure all visible activities are running, taking care of
                        // restarting this process.
                        mRootActivityContainer.ensureActivitiesVisible(null, 0, !PRESERVE_WINDOWS);
                        if (!mRootActivityContainer.resumeFocusedStacksTopActivities()) {
                            // If there was nothing to resume, and we are not already restarting
                            // this process, but there is a visible activity that is hosted by the
                            // process...then make sure all visible activities are running, taking
                            // care of restarting this process.
                            mRootActivityContainer.ensureActivitiesVisible(null, 0,
                                    !PRESERVE_WINDOWS);
                        }
                    } finally {
                        mWindowManager.continueSurfaceLayout();
                    }
                }
            }
        }

        @Override
        public void closeSystemDialogs(String reason) {