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

Commit eb630065 authored by Louis Chang's avatar Louis Chang Committed by Android (Google) Code Review
Browse files

Merge "Merge TaskStack and ActivityStack into one class (68/n)"

parents fe150ea2 dc077271
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -1159,7 +1159,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        this.task = task;
    }

    TaskStack getStack() {
    ActivityStack getStack() {
        return task != null ? task.getTaskStack() : null;
    }

@@ -1201,7 +1201,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        } else if (mLastParent != null && mLastParent.getTaskStack() != null) {
            task.getTaskStack().mExitingActivities.remove(this);
        }
        final TaskStack stack = getStack();
        final ActivityStack stack = getStack();

        // If we reparent, make sure to remove ourselves from the old animation registry.
        if (mAnimatingActivityRegistry != null) {
@@ -1265,7 +1265,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A

        if (prevDc.mFocusedApp == this) {
            prevDc.setFocusedApp(null);
            final TaskStack stack = dc.getTopStack();
            final ActivityStack stack = dc.getTopStack();
            if (stack != null) {
                final Task task = stack.getTopChild();
                if (task != null && task.getTopChild() == this) {
@@ -3021,7 +3021,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
            getDisplayContent().mNoAnimationNotifyOnTransitionFinished.add(token);
        }

        final TaskStack stack = getStack();
        final ActivityStack stack = getStack();
        if (delayed && !isEmpty()) {
            // set the token aside because it has an active animation to be finished
            ProtoLog.v(WM_DEBUG_ADD_REMOVE,
@@ -3751,7 +3751,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A

                // Notify the pinned stack upon all windows drawn. If there was an animation in
                // progress then this signal will resume that animation.
                final TaskStack pinnedStack = mDisplayContent.getPinnedStack();
                final ActivityStack pinnedStack = mDisplayContent.getPinnedStack();
                if (pinnedStack != null) {
                    pinnedStack.onAllWindowsDrawn();
                }
@@ -5781,7 +5781,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
                    getTransit(), task)) {
                task.getBounds(mTmpRect);
            } else {
                final TaskStack stack = getStack();
                final ActivityStack stack = getStack();
                if (stack == null) {
                    return;
                }
@@ -6541,7 +6541,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
    void savePinnedStackBounds() {
        // Leaving PiP to fullscreen, save the snap fraction based on the pre-animation bounds
        // for the next re-entry into PiP (assuming the activity is not hidden or destroyed)
        final TaskStack pinnedStack = mDisplayContent.getPinnedStack();
        final ActivityStack pinnedStack = mDisplayContent.getPinnedStack();
        if (pinnedStack == null) return;
        final Rect stackBounds;
        if (pinnedStack.lastAnimatingBoundsWasToFullscreen()) {
+1843 −121

File changed.

Preview size limit exceeded, changes collapsed.

+0 −9
Original line number Diff line number Diff line
@@ -1709,15 +1709,6 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks {
            return;
        }

        // It is possible for the bounds animation from the WM to call this but be delayed by
        // another AM call that is holding the AMS lock. In such a case, the pinnedBounds may be
        // incorrect if AMS.resizeStackWithBoundsFromWindowManager() is already called while waiting
        // for the AMS lock to be freed. So check and make sure these bounds are still good.
        // TODO(stack-merge): Is this still relevant?
        if (stack.pinnedStackResizeDisallowed()) {
            return;
        }

        Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "resizePinnedStack");
        mService.deferWindowLayout();
        try {
+56 −57

File changed.

Preview size limit exceeded, changes collapsed.

+16 −15

File changed.

Preview size limit exceeded, changes collapsed.

Loading