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

Commit 86135ecc authored by Hongwei Wang's avatar Hongwei Wang Committed by Automerger Merge Worker
Browse files

Merge "Add IPipAnimationListener#onExpandPip" into tm-dev am: 4b1f6bba

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17339828

Change-Id: I09d567ad62be7857123d73cabae2f6f19870be22
parents 13b7a1a0 4b1f6bba
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -32,4 +32,9 @@ oneway interface IPipAnimationListener {
     * @param cornerRadius the pixel value of the corner radius, zero means it's disabled.
     */
    void onPipCornerRadiusChanged(int cornerRadius);

    /**
     * Notifies the listener that user leaves PiP by tapping on the expand button.
     */
    void onExpandPip();
}
+13 −0
Original line number Diff line number Diff line
@@ -137,6 +137,11 @@ public class PipController implements PipTransitionController.PipTransitionCallb
         * @param cornerRadius the pixel value of the corner radius, zero means it's disabled.
         */
        void onPipCornerRadiusChanged(int cornerRadius);

        /**
         * Notifies the listener that user leaves PiP by tapping on the expand button.
         */
        void onExpandPip();
    }

    /**
@@ -652,6 +657,9 @@ public class PipController implements PipTransitionController.PipTransitionCallb
        mTouchHandler.setTouchEnabled(false);
        if (mPinnedStackAnimationRecentsCallback != null) {
            mPinnedStackAnimationRecentsCallback.onPipAnimationStarted();
            if (direction == TRANSITION_DIRECTION_LEAVE_PIP) {
                mPinnedStackAnimationRecentsCallback.onExpandPip();
            }
        }
    }

@@ -911,6 +919,11 @@ public class PipController implements PipTransitionController.PipTransitionCallb
            public void onPipCornerRadiusChanged(int cornerRadius) {
                mListener.call(l -> l.onPipCornerRadiusChanged(cornerRadius));
            }

            @Override
            public void onExpandPip() {
                mListener.call(l -> l.onExpandPip());
            }
        };

        IPipImpl(PipController controller) {