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

Commit efdc32ca authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Don't restart processes that host visible activities"

parents 211cae6a d6897898
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -8004,7 +8004,8 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        if (mVisibleRequested) {
            // It may toggle the UI for user to restart the size compatibility mode activity.
            display.handleActivitySizeCompatModeIfNeeded(this);
        } else if (mCompatDisplayInsets != null && !visibleIgnoringKeyguard) {
        } else if (mCompatDisplayInsets != null && !visibleIgnoringKeyguard
                && (app == null || !app.hasVisibleActivities())) {
            // visibleIgnoringKeyguard is checked to avoid clearing mCompatDisplayInsets during
            // displays change. Displays are turned off during the change so mVisibleRequested
            // can be false.
+1 −0
Original line number Diff line number Diff line
@@ -535,6 +535,7 @@ public class SizeCompatTests extends WindowTestsBase {
        mActivity.mVisibleRequested = false;
        mActivity.visibleIgnoringKeyguard = false;
        mActivity.app.setReportedProcState(ActivityManager.PROCESS_STATE_CACHED_ACTIVITY);
        mActivity.app.computeProcessActivityState();

        // Simulate the display changes orientation.
        final Configuration rotatedConfig = rotateDisplay(display, ROTATION_90);