diff options
3 files changed, 6 insertions, 14 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PhonePipMenuController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PhonePipMenuController.java index 052653e0cc81..140f32f9eb7f 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PhonePipMenuController.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PhonePipMenuController.java @@ -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) { diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipController.java index f80b161be42a..7ac06538efa6 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipController.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipController.java @@ -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, diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java index 7b17fe45a9a3..e21083569c41 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java @@ -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); } |