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

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

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

parents 71d03d43 ea3d3fde
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);