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

Commit 6d296286 authored by Wale Ogunwale's avatar Wale Ogunwale Committed by android-build-merger
Browse files

Merge \"Don\'t re-launch stopped activities while the device is sleeping\" into nyc-dev

am: f159b746

Change-Id: I83edfb392f0f179b4c28aaab3eba0c51fe11d207
parents 24ac2ece f159b746
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -4447,7 +4447,7 @@ final class ActivityStack {
            }
        }
        if (updatedConfig) {
            // Ensure the resumed state of the focus activity if we updated the confiugaration of
            // Ensure the resumed state of the focus activity if we updated the configuration of
            // any activity.
            mStackSupervisor.resumeFocusedStackTopActivityLocked();
        }
@@ -4467,6 +4467,15 @@ final class ActivityStack {
            return true;
        }

        // TODO: We could probably make the condition below just check that the activity state is
        // stopped, but also checking the sleep state for now to reduce change impact late in
        // development cycle.
        if (mService.isSleepingOrShuttingDownLocked() && r.state == ActivityState.STOPPED) {
            if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG_CONFIGURATION,
                    "Skipping config check (stopped while sleeping): " + r);
            return true;
        }

        if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG_CONFIGURATION,
                "Ensuring correct configuration: " + r);