Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java +6 −2 Original line number Diff line number Diff line Loading @@ -312,8 +312,12 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel { } else if (id == R.id.back_button) { mTaskOperations.injectBackKey(); } else if (id == R.id.caption_handle || id == R.id.open_menu_button) { if (!decoration.isHandleMenuActive()) { moveTaskToFront(mTaskOrganizer.getRunningTaskInfo(mTaskId)); decoration.createHandleMenu(); } else { decoration.closeHandleMenu(); } } else if (id == R.id.desktop_button) { mDesktopModeController.ifPresent(c -> c.setDesktopModeActive(true)); mDesktopTasksController.ifPresent(c -> c.moveToDesktop(mTaskId)); Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java +10 −1 Original line number Diff line number Diff line Loading @@ -487,6 +487,14 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin if (mHandleMenuAppInfoPill.mWindowViewHost.getView().getWidth() == 0) return; PointF inputPoint = offsetCaptionLocation(ev); // If this is called before open_menu_button's onClick, we don't want to close // the menu since it will just reopen in onClick. final boolean pointInOpenMenuButton = pointInView( mResult.mRootView.findViewById(R.id.open_menu_button), inputPoint.x, inputPoint.y); final boolean pointInAppInfoPill = pointInView( mHandleMenuAppInfoPill.mWindowViewHost.getView(), inputPoint.x - mHandleMenuAppInfoPillPosition.x - mResult.mDecorContainerOffsetX, Loading @@ -506,7 +514,8 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin - mResult.mDecorContainerOffsetX, inputPoint.y - mHandleMenuMoreActionsPillPosition.y - mResult.mDecorContainerOffsetY); if (!pointInAppInfoPill && !pointInWindowingPill && !pointInMoreActionsPill) { if (!pointInAppInfoPill && !pointInWindowingPill && !pointInMoreActionsPill && !pointInOpenMenuButton) { closeHandleMenu(); } } Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java +6 −2 Original line number Diff line number Diff line Loading @@ -312,8 +312,12 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel { } else if (id == R.id.back_button) { mTaskOperations.injectBackKey(); } else if (id == R.id.caption_handle || id == R.id.open_menu_button) { if (!decoration.isHandleMenuActive()) { moveTaskToFront(mTaskOrganizer.getRunningTaskInfo(mTaskId)); decoration.createHandleMenu(); } else { decoration.closeHandleMenu(); } } else if (id == R.id.desktop_button) { mDesktopModeController.ifPresent(c -> c.setDesktopModeActive(true)); mDesktopTasksController.ifPresent(c -> c.moveToDesktop(mTaskId)); Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java +10 −1 Original line number Diff line number Diff line Loading @@ -487,6 +487,14 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin if (mHandleMenuAppInfoPill.mWindowViewHost.getView().getWidth() == 0) return; PointF inputPoint = offsetCaptionLocation(ev); // If this is called before open_menu_button's onClick, we don't want to close // the menu since it will just reopen in onClick. final boolean pointInOpenMenuButton = pointInView( mResult.mRootView.findViewById(R.id.open_menu_button), inputPoint.x, inputPoint.y); final boolean pointInAppInfoPill = pointInView( mHandleMenuAppInfoPill.mWindowViewHost.getView(), inputPoint.x - mHandleMenuAppInfoPillPosition.x - mResult.mDecorContainerOffsetX, Loading @@ -506,7 +514,8 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin - mResult.mDecorContainerOffsetX, inputPoint.y - mHandleMenuMoreActionsPillPosition.y - mResult.mDecorContainerOffsetY); if (!pointInAppInfoPill && !pointInWindowingPill && !pointInMoreActionsPill) { if (!pointInAppInfoPill && !pointInWindowingPill && !pointInMoreActionsPill && !pointInOpenMenuButton) { closeHandleMenu(); } } Loading