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

Commit 5cec9b9e authored by Wale Ogunwale's avatar Wale Ogunwale Committed by android-build-merger
Browse files

Merge "Don't relaunch activity in TaskRecord.size if caller deferResume" into oc-dev

am: 25cedc23

Change-Id: I66994bfd9c39c60f78f2afda6953bef162c74d6f
parents 5a7917f0 25cedc23
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2328,6 +2328,9 @@ final class ActivityRecord extends ConfigurationContainer implements AppWindowCo
            return true;
        }

        // TODO: We should add ActivityRecord.shouldBeVisible() that checks if the activity should
        // be visible based on the stack, task, and lockscreen state and use that here instead. The
        // method should be based on the logic in ActivityStack.ensureActivitiesVisibleLocked().
        // Skip updating configuration for activity is a stack that shouldn't be visible.
        if (stack.shouldBeVisible(null /* starting */) == STACK_INVISIBLE) {
            if (DEBUG_SWITCH || DEBUG_CONFIGURATION) Slog.v(TAG_CONFIGURATION,
+4 −8
Original line number Diff line number Diff line
@@ -550,18 +550,14 @@ final class TaskRecord extends ConfigurationContainer implements TaskWindowConta
        boolean kept = true;
        if (updatedConfig) {
            final ActivityRecord r = topRunningActivityLocked();
            if (r != null) {
            if (r != null && !deferResume) {
                kept = r.ensureActivityConfigurationLocked(0 /* globalChanges */, preserveWindow);

                if (!deferResume) {
                    // All other activities must be made visible with their correct configuration.
                mService.mStackSupervisor.ensureActivitiesVisibleLocked(r, 0, !PRESERVE_WINDOWS);
                if (!kept) {
                    mService.mStackSupervisor.resumeFocusedStackTopActivityLocked();
                }
            }
        }
        }
        mWindowContainerController.resize(mBounds, getOverrideConfiguration(), kept, forced);

        Trace.traceEnd(TRACE_TAG_ACTIVITY_MANAGER);