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

Commit 5c791ab4 authored by Rob Carr's avatar Rob Carr Committed by Android (Google) Code Review
Browse files

Merge "Transform app animator crop to child window space." into nyc-dev

parents 52574880 f3b72c7b
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -656,8 +656,7 @@ final class WindowState implements WindowManagerPolicy.WindowState {
        }

        if (mInsetFrame.isEmpty()  && (fullscreenTask
                || (isChildWindow() && (mAttrs.privateFlags
                        & PRIVATE_FLAG_LAYOUT_CHILD_WINDOW_IN_PARENT_FRAME) != 0))) {
                || layoutInParentFrame())) {
            // We use the parent frame as the containing frame for fullscreen and child windows
            mContainingFrame.set(pf);
            mDisplayFrame.set(df);
@@ -2603,6 +2602,10 @@ final class WindowState implements WindowManagerPolicy.WindowState {
        return mAttachedWindow != null;
    }

    boolean layoutInParentFrame() {
        return isChildWindow() && (mAttrs.privateFlags & PRIVATE_FLAG_LAYOUT_CHILD_WINDOW_IN_PARENT_FRAME) != 0;
    }

    void setReplacing(boolean animate) {
        if ((mAttrs.privateFlags & PRIVATE_FLAG_WILL_NOT_REPLACE_ON_RELAUNCH) != 0
                || mAttrs.type == TYPE_APPLICATION_STARTING) {
+11 −0
Original line number Diff line number Diff line
@@ -994,6 +994,17 @@ class WindowStateAnimator {
                    if (appTransformation.hasClipRect()) {
                        mClipRect.set(appTransformation.getClipRect());
                        mHasClipRect = true;
                        // The app transformation clip will be in the coordinate space of the main
                        // activity window, which the animation correctly assumes will be placed at
                        // (0,0)+(insets) relative to the containing frame. This isn't necessarily
                        // true for child windows though which can have an arbitrary frame position
                        // relative to their containing frame. We need to offset the difference
                        // between the containing frame as used to calculate the crop and our
                        // bounds to compensate for this.
                        if (mWin.isChildWindow() && mWin.layoutInParentFrame()) {
                            mClipRect.offset( (mWin.mContainingFrame.left - mWin.mFrame.left),
                                    mWin.mContainingFrame.top - mWin.mFrame.top );
                        }
                    }
                }
                if (screenAnimation) {