Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java +19 −14 Original line number Diff line number Diff line Loading @@ -250,25 +250,30 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel { @Override public boolean onTouch(View v, MotionEvent e) { boolean isDrag = false; final int id = v.getId(); if (id != R.id.caption_handle && id != R.id.desktop_mode_caption) { return false; } if (id == R.id.caption_handle) { isDrag = mDragDetector.onMotionEvent(e); } if (e.getAction() != MotionEvent.ACTION_DOWN) { return isDrag; } switch (e.getAction()) { case MotionEvent.ACTION_DOWN: mDragDetector.onMotionEvent(e); final RunningTaskInfo taskInfo = mTaskOrganizer.getRunningTaskInfo(mTaskId); if (taskInfo.isFocused) { return isDrag; return mDragDetector.isDragEvent(); } final WindowContainerTransaction wct = new WindowContainerTransaction(); wct.reorder(mTaskToken, true /* onTop */); mSyncQueue.queue(wct); return true; return false; case MotionEvent.ACTION_UP: case MotionEvent.ACTION_CANCEL: boolean res = mDragDetector.isDragEvent(); mDragDetector.onMotionEvent(e); return res; default: mDragDetector.onMotionEvent(e); return mDragDetector.isDragEvent(); } } /** Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DragDetector.java +4 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,10 @@ class DragDetector { mTouchSlop = touchSlop; } boolean isDragEvent() { return mIsDragEvent; } private void resetState() { mIsDragEvent = false; mInputDownPoint.set(0, 0); Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java +19 −14 Original line number Diff line number Diff line Loading @@ -250,25 +250,30 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel { @Override public boolean onTouch(View v, MotionEvent e) { boolean isDrag = false; final int id = v.getId(); if (id != R.id.caption_handle && id != R.id.desktop_mode_caption) { return false; } if (id == R.id.caption_handle) { isDrag = mDragDetector.onMotionEvent(e); } if (e.getAction() != MotionEvent.ACTION_DOWN) { return isDrag; } switch (e.getAction()) { case MotionEvent.ACTION_DOWN: mDragDetector.onMotionEvent(e); final RunningTaskInfo taskInfo = mTaskOrganizer.getRunningTaskInfo(mTaskId); if (taskInfo.isFocused) { return isDrag; return mDragDetector.isDragEvent(); } final WindowContainerTransaction wct = new WindowContainerTransaction(); wct.reorder(mTaskToken, true /* onTop */); mSyncQueue.queue(wct); return true; return false; case MotionEvent.ACTION_UP: case MotionEvent.ACTION_CANCEL: boolean res = mDragDetector.isDragEvent(); mDragDetector.onMotionEvent(e); return res; default: mDragDetector.onMotionEvent(e); return mDragDetector.isDragEvent(); } } /** Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DragDetector.java +4 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,10 @@ class DragDetector { mTouchSlop = touchSlop; } boolean isDragEvent() { return mIsDragEvent; } private void resetState() { mIsDragEvent = false; mInputDownPoint.set(0, 0); Loading