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

Commit 955b2fc7 authored by Filip Gruszczynski's avatar Filip Gruszczynski
Browse files

Disable stack cropping for docked animating windows only.

Non docked windows should be cropped by the stack bounds when they
animate. An example of this is having both a docked activity and a full
screen activity resuming together. The full screen activity should be
cropped.

Bug: 24913915

Change-Id: I35ed71e7625f2fcdb5c51649be9f33d5773c162c
parent 3128c842
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -326,6 +326,10 @@ class Task implements DimLayer.DimLayerUser {
        return mStack != null && mStack.mStackId == FREEFORM_WORKSPACE_STACK_ID;
    }

    boolean inDockedWorkspace() {
        return mStack != null && mStack.mStackId == DOCKED_STACK_ID;
    }

    WindowState getTopAppMainWindow() {
        final int tokensCount = mAppTokens.size();
        return tokensCount > 0 ? mAppTokens.get(tokensCount - 1).findMainWindow() : null;
+4 −0
Original line number Diff line number Diff line
@@ -1326,6 +1326,10 @@ final class WindowState implements WindowManagerPolicy.WindowState {
        }
    }

    boolean inDockedWorkspace() {
        return mAppToken != null && mAppToken.mTask != null && mAppToken.mTask.inDockedWorkspace();
    }

    private class DeathRecipient implements IBinder.DeathRecipient {
        @Override
        public void binderDied() {
+2 −3
Original line number Diff line number Diff line
@@ -1401,9 +1401,8 @@ class WindowStateAnimator {
        clipRect.offset(attrs.surfaceInsets.left, attrs.surfaceInsets.top);

        // We don't want to clip to stack bounds windows that are currently doing entrance
        // animation. This is necessary for docking operation, otherwise the window will be
        // suddenly cut off.
        if (!mAnimator.mAnimating) {
        // animation for docked window, otherwise the animating window will be suddenly cut off.
        if (!(mAnimator.mAnimating && w.inDockedWorkspace())) {
            adjustCropToStackBounds(w, clipRect);
        }