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

Commit e7cc44d8 authored by Robert Carr's avatar Robert Carr
Browse files

Amend "Fix various flashes when..." CL

Missing cosmetic changes from last patch set due to
a rebase error on my part.

Test: Cosmetic
Change-Id: I3a8a68e8cecd1947cd9e54d5fcfe8bb4a792265b
parent 2a820bdf
Loading
Loading
Loading
Loading
+7 −22
Original line number Diff line number Diff line
@@ -2295,17 +2295,8 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D
        mResizingTasksDuringAnimation.clear();
    }

    private class MoveTaskToFullscreenArgs {
        public int fromStackId;
        public boolean onTop;
    };
    // Used only to closure over the arguments to moveTasksToFullscreenStack without
    // allocation
    private MoveTaskToFullscreenArgs mMoveToFullscreenArgs = new MoveTaskToFullscreenArgs();

    private void moveTasksToFullscreenStackInnerLocked() {
        int fromStackId = mMoveToFullscreenArgs.fromStackId;
        boolean onTop = mMoveToFullscreenArgs.onTop;
    private void moveTasksToFullscreenStackInSurfaceTransaction(int fromStackId,
            boolean onTop) {

        final ActivityStack stack = getStack(fromStackId);
        if (stack == null) {
@@ -2379,10 +2370,8 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D
    }

    void moveTasksToFullscreenStackLocked(int fromStackId, boolean onTop) {
        mMoveToFullscreenArgs.fromStackId = fromStackId;
        mMoveToFullscreenArgs.onTop = onTop;

        mWindowManager.inSurfaceTransaction(this::moveTasksToFullscreenStackInnerLocked);
        mWindowManager.inSurfaceTransaction(
                () -> moveTasksToFullscreenStackInSurfaceTransaction(fromStackId, onTop));
    }

    void resizeDockedStackLocked(Rect dockedBounds, Rect tempDockedTaskBounds,
@@ -2498,11 +2487,7 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D
    }


    // Used only to closure over the argument to removeStack without allocation.
    private int mRemoveStackStackId;
    void removeStackInnerLocked() {
        int stackId = mRemoveStackStackId;

    void removeStackInSurfaceTransaction(int stackId) {
        final ActivityStack stack = getStack(stackId);
        if (stack == null) {
            return;
@@ -2546,8 +2531,8 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D
     * instead moved back onto the fullscreen stack.
     */
    void removeStackLocked(int stackId) {
        mRemoveStackStackId = stackId;
        mWindowManager.inSurfaceTransaction(this::removeStackInnerLocked);
        mWindowManager.inSurfaceTransaction(
                () -> removeStackInSurfaceTransaction(stackId));
    }

    /**
+4 −0
Original line number Diff line number Diff line
@@ -368,6 +368,10 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree
                mEnteringAnimation = true;
                mService.mActivityManagerAppTransitionNotifier.onAppTransitionFinishedLocked(token);
            }
            // If we are hidden but there is no delay needed we immediately
            // apply the Surface transaction so that the ActivityManager
            // can have some guarantee on the Surface state
            // following setting the visibility.
            if (hidden && !delayed) {
                SurfaceControl.openTransaction();
                for (int i = mChildren.size() - 1; i >= 0; i--) {
+0 −2
Original line number Diff line number Diff line
@@ -7316,7 +7316,6 @@ public class WindowManagerService extends IWindowManager.Stub
     * WARNING: This method contains locks known to the State of California
     * to cause Deadlocks and other conditions.
     *
     *
     * Begins a surface transaction with which the AM can batch operations.
     * All Surface updates performed by the WindowManager following this
     * will not appear on screen until after the call to
@@ -7329,7 +7328,6 @@ public class WindowManagerService extends IWindowManager.Stub
     * from the new parent are inherited, otherwise it could be revealed
     * mistakenly.
     *
     *
     * TODO(b/36393204): We can investigate totally replacing #deferSurfaceLayout
     * with something like this but it seems that some existing cases of
     * deferSurfaceLayout may be a little too broad, in particular the total