Loading libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PhonePipMenuController.java +1 −2 Original line number Diff line number Diff line Loading @@ -60,8 +60,7 @@ public class PhonePipMenuController implements PipMenuController { private static final boolean DEBUG = false; public static final int MENU_STATE_NONE = 0; public static final int MENU_STATE_CLOSE = 1; public static final int MENU_STATE_FULL = 2; public static final int MENU_STATE_FULL = 1; /** * A listener interface to receive notification on changes in PIP. Loading libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java +4 −6 Original line number Diff line number Diff line Loading @@ -23,7 +23,6 @@ import static android.view.accessibility.AccessibilityManager.FLAG_CONTENT_CONTR import static android.view.accessibility.AccessibilityManager.FLAG_CONTENT_ICONS; import static android.view.accessibility.AccessibilityNodeInfo.ACTION_CLICK; import static com.android.wm.shell.pip.phone.PhonePipMenuController.MENU_STATE_CLOSE; import static com.android.wm.shell.pip.phone.PhonePipMenuController.MENU_STATE_FULL; import static com.android.wm.shell.pip.phone.PhonePipMenuController.MENU_STATE_NONE; Loading Loading @@ -203,7 +202,7 @@ public class PipMenuView extends FrameLayout { @Override public boolean performAccessibilityAction(View host, int action, Bundle args) { if (action == ACTION_CLICK && mMenuState == MENU_STATE_CLOSE) { if (action == ACTION_CLICK && mMenuState != MENU_STATE_FULL) { mController.showMenu(); } return super.performAccessibilityAction(host, action, args); Loading Loading @@ -271,13 +270,12 @@ public class PipMenuView extends FrameLayout { mDismissButton.getAlpha(), 1f); ObjectAnimator resizeAnim = ObjectAnimator.ofFloat(mResizeHandle, View.ALPHA, mResizeHandle.getAlpha(), ENABLE_RESIZE_HANDLE && menuState == MENU_STATE_CLOSE && showResizeHandle ? 1f : 0f); ENABLE_RESIZE_HANDLE && showResizeHandle ? 1f : 0f); if (menuState == MENU_STATE_FULL) { mMenuContainerAnimator.playTogether(menuAnim, settingsAnim, dismissAnim, resizeAnim); } else { mMenuContainerAnimator.playTogether(dismissAnim, resizeAnim); mMenuContainerAnimator.playTogether(resizeAnim); } mMenuContainerAnimator.setInterpolator(Interpolators.ALPHA_IN); mMenuContainerAnimator.setDuration(ANIMATION_HIDE_DURATION_MS); Loading Loading @@ -429,7 +427,7 @@ public class PipMenuView extends FrameLayout { FrameLayout.LayoutParams expandedLp = (FrameLayout.LayoutParams) expandContainer.getLayoutParams(); if (mActions.isEmpty() || menuState == MENU_STATE_CLOSE || menuState == MENU_STATE_NONE) { if (mActions.isEmpty() || menuState == MENU_STATE_NONE) { actionsContainer.setVisibility(View.INVISIBLE); // Update the expand container margin to adjust the center of the expand button to Loading libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipTouchHandler.java +0 −10 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ import static com.android.wm.shell.pip.PipAnimationController.TRANSITION_DIRECTI import static com.android.wm.shell.pip.PipBoundsState.STASH_TYPE_LEFT; import static com.android.wm.shell.pip.PipBoundsState.STASH_TYPE_NONE; import static com.android.wm.shell.pip.PipBoundsState.STASH_TYPE_RIGHT; import static com.android.wm.shell.pip.phone.PhonePipMenuController.MENU_STATE_CLOSE; import static com.android.wm.shell.pip.phone.PhonePipMenuController.MENU_STATE_FULL; import static com.android.wm.shell.pip.phone.PhonePipMenuController.MENU_STATE_NONE; import static com.android.wm.shell.pip.phone.PipMenuView.ANIM_TYPE_NONE; Loading Loading @@ -81,7 +80,6 @@ public class PipTouchHandler { private final PhonePipMenuController mMenuController; private final AccessibilityManager mAccessibilityManager; private boolean mShowPipMenuOnAnimationEnd = false; /** * Whether PIP stash is enabled or not. When enabled, if the user flings toward the edge of the Loading Loading @@ -280,7 +278,6 @@ public class PipTouchHandler { public void onActivityPinned() { mPipDismissTargetHandler.createOrUpdateDismissTarget(); mShowPipMenuOnAnimationEnd = true; mPipResizeGestureHandler.onActivityPinned(); mFloatingContentCoordinator.onContentAdded(mMotionHelper); } Loading @@ -304,13 +301,6 @@ public class PipTouchHandler { // Set the initial bounds as the user resize bounds. mPipResizeGestureHandler.setUserResizeBounds(mPipBoundsState.getBounds()); } if (mShowPipMenuOnAnimationEnd) { mMenuController.showMenu(MENU_STATE_CLOSE, mPipBoundsState.getBounds(), true /* allowMenuTimeout */, false /* willResizeMenu */, shouldShowResizeHandle()); mShowPipMenuOnAnimationEnd = false; } } public void onConfigurationChanged() { Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PhonePipMenuController.java +1 −2 Original line number Diff line number Diff line Loading @@ -60,8 +60,7 @@ public class PhonePipMenuController implements PipMenuController { private static final boolean DEBUG = false; public static final int MENU_STATE_NONE = 0; public static final int MENU_STATE_CLOSE = 1; public static final int MENU_STATE_FULL = 2; public static final int MENU_STATE_FULL = 1; /** * A listener interface to receive notification on changes in PIP. Loading
libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java +4 −6 Original line number Diff line number Diff line Loading @@ -23,7 +23,6 @@ import static android.view.accessibility.AccessibilityManager.FLAG_CONTENT_CONTR import static android.view.accessibility.AccessibilityManager.FLAG_CONTENT_ICONS; import static android.view.accessibility.AccessibilityNodeInfo.ACTION_CLICK; import static com.android.wm.shell.pip.phone.PhonePipMenuController.MENU_STATE_CLOSE; import static com.android.wm.shell.pip.phone.PhonePipMenuController.MENU_STATE_FULL; import static com.android.wm.shell.pip.phone.PhonePipMenuController.MENU_STATE_NONE; Loading Loading @@ -203,7 +202,7 @@ public class PipMenuView extends FrameLayout { @Override public boolean performAccessibilityAction(View host, int action, Bundle args) { if (action == ACTION_CLICK && mMenuState == MENU_STATE_CLOSE) { if (action == ACTION_CLICK && mMenuState != MENU_STATE_FULL) { mController.showMenu(); } return super.performAccessibilityAction(host, action, args); Loading Loading @@ -271,13 +270,12 @@ public class PipMenuView extends FrameLayout { mDismissButton.getAlpha(), 1f); ObjectAnimator resizeAnim = ObjectAnimator.ofFloat(mResizeHandle, View.ALPHA, mResizeHandle.getAlpha(), ENABLE_RESIZE_HANDLE && menuState == MENU_STATE_CLOSE && showResizeHandle ? 1f : 0f); ENABLE_RESIZE_HANDLE && showResizeHandle ? 1f : 0f); if (menuState == MENU_STATE_FULL) { mMenuContainerAnimator.playTogether(menuAnim, settingsAnim, dismissAnim, resizeAnim); } else { mMenuContainerAnimator.playTogether(dismissAnim, resizeAnim); mMenuContainerAnimator.playTogether(resizeAnim); } mMenuContainerAnimator.setInterpolator(Interpolators.ALPHA_IN); mMenuContainerAnimator.setDuration(ANIMATION_HIDE_DURATION_MS); Loading Loading @@ -429,7 +427,7 @@ public class PipMenuView extends FrameLayout { FrameLayout.LayoutParams expandedLp = (FrameLayout.LayoutParams) expandContainer.getLayoutParams(); if (mActions.isEmpty() || menuState == MENU_STATE_CLOSE || menuState == MENU_STATE_NONE) { if (mActions.isEmpty() || menuState == MENU_STATE_NONE) { actionsContainer.setVisibility(View.INVISIBLE); // Update the expand container margin to adjust the center of the expand button to Loading
libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipTouchHandler.java +0 −10 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ import static com.android.wm.shell.pip.PipAnimationController.TRANSITION_DIRECTI import static com.android.wm.shell.pip.PipBoundsState.STASH_TYPE_LEFT; import static com.android.wm.shell.pip.PipBoundsState.STASH_TYPE_NONE; import static com.android.wm.shell.pip.PipBoundsState.STASH_TYPE_RIGHT; import static com.android.wm.shell.pip.phone.PhonePipMenuController.MENU_STATE_CLOSE; import static com.android.wm.shell.pip.phone.PhonePipMenuController.MENU_STATE_FULL; import static com.android.wm.shell.pip.phone.PhonePipMenuController.MENU_STATE_NONE; import static com.android.wm.shell.pip.phone.PipMenuView.ANIM_TYPE_NONE; Loading Loading @@ -81,7 +80,6 @@ public class PipTouchHandler { private final PhonePipMenuController mMenuController; private final AccessibilityManager mAccessibilityManager; private boolean mShowPipMenuOnAnimationEnd = false; /** * Whether PIP stash is enabled or not. When enabled, if the user flings toward the edge of the Loading Loading @@ -280,7 +278,6 @@ public class PipTouchHandler { public void onActivityPinned() { mPipDismissTargetHandler.createOrUpdateDismissTarget(); mShowPipMenuOnAnimationEnd = true; mPipResizeGestureHandler.onActivityPinned(); mFloatingContentCoordinator.onContentAdded(mMotionHelper); } Loading @@ -304,13 +301,6 @@ public class PipTouchHandler { // Set the initial bounds as the user resize bounds. mPipResizeGestureHandler.setUserResizeBounds(mPipBoundsState.getBounds()); } if (mShowPipMenuOnAnimationEnd) { mMenuController.showMenu(MENU_STATE_CLOSE, mPipBoundsState.getBounds(), true /* allowMenuTimeout */, false /* willResizeMenu */, shouldShowResizeHandle()); mShowPipMenuOnAnimationEnd = false; } } public void onConfigurationChanged() { Loading