Loading libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PhonePipMenuController.java +4 −3 Original line number Diff line number Diff line Loading @@ -18,8 +18,6 @@ package com.android.wm.shell.pip.phone; import static android.view.WindowManager.SHELL_ROOT_LAYER_PIP; import static com.android.wm.shell.pip.phone.PipMenuView.ANIM_TYPE_HIDE; import android.annotation.Nullable; import android.app.RemoteAction; import android.content.Context; Loading Loading @@ -399,7 +397,10 @@ public class PhonePipMenuController implements PipMenuController { * Hides the menu view. */ public void hideMenu() { hideMenu(ANIM_TYPE_HIDE, true /* resize */); final boolean isMenuVisible = isMenuVisible(); if (isMenuVisible) { mPipMenuView.hideMenu(); } } /** Loading libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java +7 −1 Original line number Diff line number Diff line Loading @@ -130,6 +130,11 @@ public class PipMenuView extends FrameLayout { private ShellExecutor mMainExecutor; private Handler mMainHandler; /** * Whether the most recent showing of the menu caused a PIP resize, such as when PIP is too * small and it is resized on menu show to fit the actions. */ private boolean mDidLastShowMenuResize; private final Runnable mHideMenuRunnable = this::hideMenu; protected View mViewRoot; Loading Loading @@ -245,6 +250,7 @@ public class PipMenuView extends FrameLayout { void showMenu(int menuState, Rect stackBounds, boolean allowMenuTimeout, boolean resizeMenuOnShow, boolean withDelay, boolean showResizeHandle) { mAllowMenuTimeout = allowMenuTimeout; mDidLastShowMenuResize = resizeMenuOnShow; if (mMenuState != menuState) { // Disallow touches if the menu needs to resize while showing, and we are transitioning // to/from a full menu state. Loading Loading @@ -340,7 +346,7 @@ public class PipMenuView extends FrameLayout { } void hideMenu(Runnable animationEndCallback) { hideMenu(animationEndCallback, true /* notifyMenuVisibility */, true /* resize */, hideMenu(animationEndCallback, true /* notifyMenuVisibility */, mDidLastShowMenuResize, ANIM_TYPE_HIDE); } Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PhonePipMenuController.java +4 −3 Original line number Diff line number Diff line Loading @@ -18,8 +18,6 @@ package com.android.wm.shell.pip.phone; import static android.view.WindowManager.SHELL_ROOT_LAYER_PIP; import static com.android.wm.shell.pip.phone.PipMenuView.ANIM_TYPE_HIDE; import android.annotation.Nullable; import android.app.RemoteAction; import android.content.Context; Loading Loading @@ -399,7 +397,10 @@ public class PhonePipMenuController implements PipMenuController { * Hides the menu view. */ public void hideMenu() { hideMenu(ANIM_TYPE_HIDE, true /* resize */); final boolean isMenuVisible = isMenuVisible(); if (isMenuVisible) { mPipMenuView.hideMenu(); } } /** Loading
libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java +7 −1 Original line number Diff line number Diff line Loading @@ -130,6 +130,11 @@ public class PipMenuView extends FrameLayout { private ShellExecutor mMainExecutor; private Handler mMainHandler; /** * Whether the most recent showing of the menu caused a PIP resize, such as when PIP is too * small and it is resized on menu show to fit the actions. */ private boolean mDidLastShowMenuResize; private final Runnable mHideMenuRunnable = this::hideMenu; protected View mViewRoot; Loading Loading @@ -245,6 +250,7 @@ public class PipMenuView extends FrameLayout { void showMenu(int menuState, Rect stackBounds, boolean allowMenuTimeout, boolean resizeMenuOnShow, boolean withDelay, boolean showResizeHandle) { mAllowMenuTimeout = allowMenuTimeout; mDidLastShowMenuResize = resizeMenuOnShow; if (mMenuState != menuState) { // Disallow touches if the menu needs to resize while showing, and we are transitioning // to/from a full menu state. Loading Loading @@ -340,7 +346,7 @@ public class PipMenuView extends FrameLayout { } void hideMenu(Runnable animationEndCallback) { hideMenu(animationEndCallback, true /* notifyMenuVisibility */, true /* resize */, hideMenu(animationEndCallback, true /* notifyMenuVisibility */, mDidLastShowMenuResize, ANIM_TYPE_HIDE); } Loading