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

Commit 77360b40 authored by Jorim Jaggi's avatar Jorim Jaggi Committed by android-build-merger
Browse files

Merge changes I78305f7f,I6faf0167 into nyc-dev am: 5dea9e79

am: ebe80b5f

* commit 'ebe80b5f':
  Fix disappearing windows after moving divider to side
  Recents transition fixes
parents d6ee9311 ebe80b5f
Loading
Loading
Loading
Loading
+31 −25
Original line number Diff line number Diff line
@@ -17823,11 +17823,13 @@ public final class ActivityManagerService extends ActivityManagerNative
            final long origId = Binder.clearCallingIdentity();
            final ActivityStack stack = mStackSupervisor.getStack(fromStackId);
            if (stack != null) {
                mWindowManager.deferSurfaceLayout();
                try {
                    if (fromStackId == DOCKED_STACK_ID) {
                    // We are moving all tasks from the docked stack to the fullscreen stack, which
                    // is dismissing the docked stack, so resize all other stacks to fullscreen here
                    // already so we don't end up with resize trashing.
                        // We are moving all tasks from the docked stack to the fullscreen stack,
                        // which is dismissing the docked stack, so resize all other stacks to
                        // fullscreen here already so we don't end up with resize trashing.
                        for (int i = FIRST_STATIC_STACK_ID; i <= LAST_STATIC_STACK_ID; i++) {
                            if (StackId.isResizeableByDockedStack(i)) {
                                ActivityStack otherStack = mStackSupervisor.getStack(i);
@@ -17844,7 +17846,7 @@ public final class ActivityManagerService extends ActivityManagerNative
                    if (onTop) {
                        for (int i = 0; i < size; i++) {
                            mStackSupervisor.moveTaskToStackLocked(tasks.get(i).taskId,
                                FULLSCREEN_WORKSPACE_STACK_ID, ON_TOP, !FORCE_FOCUS,
                                    FULLSCREEN_WORKSPACE_STACK_ID, onTop, !FORCE_FOCUS,
                                    "moveTasksToFullscreenStack", ANIMATE);
                        }
                    } else {
@@ -17853,6 +17855,10 @@ public final class ActivityManagerService extends ActivityManagerNative
                                    FULLSCREEN_WORKSPACE_STACK_ID, 0);
                        }
                    }
                } finally {
                    mWindowManager.continueSurfaceLayout();
                }
            }
            Binder.restoreCallingIdentity(origId);
        }
+2 −0
Original line number Diff line number Diff line
@@ -2362,6 +2362,8 @@ public final class ActivityStackSupervisor implements DisplayListener {
        stack.positionTask(task, position);
        // The task might have already been running and its visibility needs to be synchronized with
        // the visibility of the stack / windows.
        stack.ensureActivityConfigurationLocked(task.topRunningActivityLocked(), 0,
                !PRESERVE_WINDOWS);
        stack.ensureActivitiesVisibleLocked(null, 0, !PRESERVE_WINDOWS);
        resumeFocusedStackTopActivityLocked();
    }
+7 −0
Original line number Diff line number Diff line
@@ -153,6 +153,13 @@ public class AppWindowAnimator {
        } else {
            mClearProlongedAnimation = true;
        }

        // Since we are finally starting our animation, we don't need the logic anymore to prevent
        // the app from showing again if we just moved between stacks. See
        // {@link WindowState#notifyMovedInStack}.
        for (int i = mAppToken.allAppWindows.size() - 1; i >= 0; i--) {
            mAppToken.allAppWindows.get(i).resetJustMovedInStack();
        }
    }

    public void setDummyAnimation() {
+19 −3
Original line number Diff line number Diff line
@@ -247,7 +247,15 @@ class Task implements DimLayer.DimLayerUser {
            mStack.removeTask(this);
        }
        stack.positionTask(this, position, showForAllUsers());
        setBounds(bounds, config);
        resizeLocked(bounds, config, false /* force */);

        for (int activityNdx = mAppTokens.size() - 1; activityNdx >= 0; --activityNdx) {
            final ArrayList<WindowState> windows = mAppTokens.get(activityNdx).allAppWindows;
            for (int winNdx = windows.size() - 1; winNdx >= 0; --winNdx) {
                final WindowState win = windows.get(winNdx);
                win.notifyMovedInStack();
            }
        }
    }

    boolean removeAppToken(AppWindowToken wtoken) {
@@ -272,7 +280,7 @@ class Task implements DimLayer.DimLayerUser {
    }

    /** Set the task bounds. Passing in null sets the bounds to fullscreen. */
    int setBounds(Rect bounds, Configuration config) {
    private int setBounds(Rect bounds, Configuration config) {
        if (config == null) {
            config = Configuration.EMPTY;
        }
@@ -598,13 +606,21 @@ class Task implements DimLayer.DimLayerUser {
    void resizeWindows() {
        final ArrayList<WindowState> resizingWindows = mService.mResizingWindows;
        for (int activityNdx = mAppTokens.size() - 1; activityNdx >= 0; --activityNdx) {
            final ArrayList<WindowState> windows = mAppTokens.get(activityNdx).allAppWindows;
            final AppWindowToken atoken = mAppTokens.get(activityNdx);

            // Some windows won't go through the resizing process, if they don't have a surface, so
            // destroy all saved surfaces here.
            atoken.destroySavedSurfaces();
            final ArrayList<WindowState> windows = atoken.allAppWindows;
            for (int winNdx = windows.size() - 1; winNdx >= 0; --winNdx) {
                final WindowState win = windows.get(winNdx);
                if (win.mHasSurface && !resizingWindows.contains(win)) {
                    if (DEBUG_RESIZE) Slog.d(TAG, "resizeWindows: Resizing " + win);
                    resizingWindows.add(win);
                }
                if (win.isGoneForLayoutLw()) {
                    win.mResizedWhileGone = true;
                }
            }
        }
    }
+3 −0
Original line number Diff line number Diff line
@@ -2760,6 +2760,9 @@ public class WindowManagerService extends IWindowManager.Stub
                winAnimator.mReportSurfaceResized = false;
                result |= WindowManagerGlobal.RELAYOUT_RES_SURFACE_RESIZED;
            }
            if (!win.isGoneForLayoutLw()) {
                win.mResizedWhileGone = false;
            }
            outFrame.set(win.mCompatFrame);
            outOverscanInsets.set(win.mOverscanInsets);
            outContentInsets.set(win.mContentInsets);
Loading