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

Commit d06662a6 authored by Ben Lin's avatar Ben Lin Committed by Automerger Merge Worker
Browse files

Merge "PiP: Move resetting mAllowTouches into scope of MenuView" into sc-dev...

Merge "PiP: Move resetting mAllowTouches into scope of MenuView" into sc-dev am: debdf699 am: 2806e2dc

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

Change-Id: I3fa37afe661598d1b2fb9910656ce2b2580f75ee
parents 31f67ee1 2806e2dc
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -173,13 +173,6 @@ public class PhonePipMenuController implements PipMenuController {
        detachPipMenuView();
    }


    void onPinnedStackAnimationEnded() {
        if (isMenuVisible()) {
            mPipMenuView.onPipAnimationEnded();
        }
    }

    private void attachPipMenuView() {
        // In case detach was not called (e.g. PIP unexpectedly closed)
        if (mPipMenuView != null) {
+0 −2
Original line number Diff line number Diff line
@@ -36,7 +36,6 @@ import android.content.res.Configuration;
import android.graphics.Rect;
import android.os.IBinder;
import android.os.RemoteException;
import android.os.SystemProperties;
import android.os.UserHandle;
import android.os.UserManager;
import android.util.Log;
@@ -606,7 +605,6 @@ public class PipController implements PipTransitionController.PipTransitionCallb
        // Re-enable touches after the animation completes
        mTouchHandler.setTouchEnabled(true);
        mTouchHandler.onPinnedStackAnimationEnded(direction);
        mMenuController.onPinnedStackAnimationEnded();
    }

    private void updateMovementBounds(@Nullable Rect toBounds, boolean fromRotation,
+6 −5
Original line number Diff line number Diff line
@@ -40,7 +40,6 @@ import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.graphics.Rect;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Bundle;
@@ -279,11 +278,17 @@ public class PipMenuView extends FrameLayout {
            mMenuContainerAnimator.addListener(new AnimatorListenerAdapter() {
                @Override
                public void onAnimationEnd(Animator animation) {
                    mAllowTouches = true;
                    notifyMenuStateChangeFinish(menuState);
                    if (allowMenuTimeout) {
                        repostDelayedHide(INITIAL_DISMISS_DELAY);
                    }
                }

                @Override
                public void onAnimationCancel(Animator animation) {
                    mAllowTouches = true;
                }
            });
            if (withDelay) {
                // starts the menu container animation after window expansion is completed
@@ -326,10 +331,6 @@ public class PipMenuView extends FrameLayout {
        cancelDelayedHide();
    }

    void onPipAnimationEnded() {
        mAllowTouches = true;
    }

    void updateMenuLayout(Rect bounds) {
        mPipMenuIconsAlgorithm.onBoundsChanged(bounds);
    }