Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecorViewModel.java +7 −7 Original line number Diff line number Diff line Loading @@ -174,7 +174,7 @@ public class CaptionWindowDecorViewModel implements WindowDecorViewModel { final CaptionTouchEventListener touchEventListener = new CaptionTouchEventListener(taskInfo, taskPositioner); windowDecoration.setCaptionListeners(touchEventListener, touchEventListener); windowDecoration.setDragResizeCallback(taskPositioner); windowDecoration.setDragPositioningCallback(taskPositioner); windowDecoration.setDragDetector(touchEventListener.mDragDetector); windowDecoration.relayout(taskInfo, startT, finishT); setupCaptionColor(taskInfo, windowDecoration); Loading @@ -185,17 +185,17 @@ public class CaptionWindowDecorViewModel implements WindowDecorViewModel { private final int mTaskId; private final WindowContainerToken mTaskToken; private final DragResizeCallback mDragResizeCallback; private final DragPositioningCallback mDragPositioningCallback; private final DragDetector mDragDetector; private int mDragPointerId = -1; private CaptionTouchEventListener( RunningTaskInfo taskInfo, DragResizeCallback dragResizeCallback) { DragPositioningCallback dragPositioningCallback) { mTaskId = taskInfo.taskId; mTaskToken = taskInfo.token; mDragResizeCallback = dragResizeCallback; mDragPositioningCallback = dragPositioningCallback; mDragDetector = new DragDetector(this); } Loading Loading @@ -247,20 +247,20 @@ public class CaptionWindowDecorViewModel implements WindowDecorViewModel { switch (e.getActionMasked()) { case MotionEvent.ACTION_DOWN: { mDragPointerId = e.getPointerId(0); mDragResizeCallback.onDragResizeStart( mDragPositioningCallback.onDragPositioningStart( 0 /* ctrlType */, e.getRawX(0), e.getRawY(0)); break; } case MotionEvent.ACTION_MOVE: { int dragPointerIdx = e.findPointerIndex(mDragPointerId); mDragResizeCallback.onDragResizeMove( mDragPositioningCallback.onDragPositioningMove( e.getRawX(dragPointerIdx), e.getRawY(dragPointerIdx)); break; } case MotionEvent.ACTION_UP: case MotionEvent.ACTION_CANCEL: { int dragPointerIdx = e.findPointerIndex(mDragPointerId); mDragResizeCallback.onDragResizeEnd( mDragPositioningCallback.onDragPositioningEnd( e.getRawX(dragPointerIdx), e.getRawY(dragPointerIdx)); break; } Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecoration.java +4 −4 Original line number Diff line number Diff line Loading @@ -47,7 +47,7 @@ public class CaptionWindowDecoration extends WindowDecoration<WindowDecorLinearL private View.OnClickListener mOnCaptionButtonClickListener; private View.OnTouchListener mOnCaptionTouchListener; private DragResizeCallback mDragResizeCallback; private DragPositioningCallback mDragPositioningCallback; private DragResizeInputListener mDragResizeListener; private DragDetector mDragDetector; Loading Loading @@ -78,8 +78,8 @@ public class CaptionWindowDecoration extends WindowDecoration<WindowDecorLinearL mOnCaptionTouchListener = onCaptionTouchListener; } void setDragResizeCallback(DragResizeCallback dragResizeCallback) { mDragResizeCallback = dragResizeCallback; void setDragPositioningCallback(DragPositioningCallback dragPositioningCallback) { mDragPositioningCallback = dragPositioningCallback; } void setDragDetector(DragDetector dragDetector) { Loading Loading @@ -151,7 +151,7 @@ public class CaptionWindowDecoration extends WindowDecoration<WindowDecorLinearL mChoreographer, mDisplay.getDisplayId(), mDecorationContainerSurface, mDragResizeCallback); mDragPositioningCallback); } final int touchSlop = ViewConfiguration.get(mResult.mRootView.getContext()) Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java +7 −7 Original line number Diff line number Diff line Loading @@ -209,17 +209,17 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel { private final int mTaskId; private final WindowContainerToken mTaskToken; private final DragResizeCallback mDragResizeCallback; private final DragPositioningCallback mDragPositioningCallback; private final DragDetector mDragDetector; private int mDragPointerId = -1; private DesktopModeTouchEventListener( RunningTaskInfo taskInfo, DragResizeCallback dragResizeCallback) { DragPositioningCallback dragPositioningCallback) { mTaskId = taskInfo.taskId; mTaskToken = taskInfo.token; mDragResizeCallback = dragResizeCallback; mDragPositioningCallback = dragPositioningCallback; mDragDetector = new DragDetector(this); } Loading Loading @@ -283,13 +283,13 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel { switch (e.getActionMasked()) { case MotionEvent.ACTION_DOWN: { mDragPointerId = e.getPointerId(0); mDragResizeCallback.onDragResizeStart( mDragPositioningCallback.onDragPositioningStart( 0 /* ctrlType */, e.getRawX(0), e.getRawY(0)); break; } case MotionEvent.ACTION_MOVE: { final int dragPointerIdx = e.findPointerIndex(mDragPointerId); mDragResizeCallback.onDragResizeMove( mDragPositioningCallback.onDragPositioningMove( e.getRawX(dragPointerIdx), e.getRawY(dragPointerIdx)); break; } Loading @@ -298,7 +298,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel { final int dragPointerIdx = e.findPointerIndex(mDragPointerId); final int statusBarHeight = mDisplayController .getDisplayLayout(taskInfo.displayId).stableInsets().top; mDragResizeCallback.onDragResizeEnd( mDragPositioningCallback.onDragPositioningEnd( e.getRawX(dragPointerIdx), e.getRawY(dragPointerIdx)); if (e.getRawY(dragPointerIdx) <= statusBarHeight) { if (DesktopModeStatus.isProto2Enabled()) { Loading Loading @@ -557,7 +557,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel { final DesktopModeTouchEventListener touchEventListener = new DesktopModeTouchEventListener(taskInfo, taskPositioner); windowDecoration.setCaptionListeners(touchEventListener, touchEventListener); windowDecoration.setDragResizeCallback(taskPositioner); windowDecoration.setDragPositioningCallback(taskPositioner); windowDecoration.setDragDetector(touchEventListener.mDragDetector); windowDecoration.relayout(taskInfo, startT, finishT); incrementEventReceiverTasks(taskInfo.displayId); Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java +4 −4 Original line number Diff line number Diff line Loading @@ -54,7 +54,7 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin private View.OnClickListener mOnCaptionButtonClickListener; private View.OnTouchListener mOnCaptionTouchListener; private DragResizeCallback mDragResizeCallback; private DragPositioningCallback mDragPositioningCallback; private DragResizeInputListener mDragResizeListener; private DragDetector mDragDetector; Loading Loading @@ -90,8 +90,8 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin mOnCaptionTouchListener = onCaptionTouchListener; } void setDragResizeCallback(DragResizeCallback dragResizeCallback) { mDragResizeCallback = dragResizeCallback; void setDragPositioningCallback(DragPositioningCallback dragPositioningCallback) { mDragPositioningCallback = dragPositioningCallback; } void setDragDetector(DragDetector dragDetector) { Loading Loading @@ -179,7 +179,7 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin mChoreographer, mDisplay.getDisplayId(), mDecorationContainerSurface, mDragResizeCallback); mDragPositioningCallback); } final int touchSlop = ViewConfiguration.get(mResult.mRootView.getContext()) Loading libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DragResizeCallback.java→libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DragPositioningCallback.java +9 −9 Original line number Diff line number Diff line Loading @@ -19,28 +19,28 @@ package com.android.wm.shell.windowdecor; /** * Callback called when receiving drag-resize or drag-move related input events. */ public interface DragResizeCallback { public interface DragPositioningCallback { /** * Called when a drag resize starts. * Called when a drag-resize or drag-move starts. * * @param ctrlType {@link TaskPositioner.CtrlType} indicating the direction of resizing, use * {@code 0} to indicate it's a move * @param x x coordinate in window decoration coordinate system where the drag resize starts * @param y y coordinate in window decoration coordinate system where the drag resize starts * @param x x coordinate in window decoration coordinate system where the drag starts * @param y y coordinate in window decoration coordinate system where the drag starts */ void onDragResizeStart(@TaskPositioner.CtrlType int ctrlType, float x, float y); void onDragPositioningStart(@TaskPositioner.CtrlType int ctrlType, float x, float y); /** * Called when the pointer moves during a drag resize. * Called when the pointer moves during a drag-resize or drag-move. * @param x x coordinate in window decoration coordinate system of the new pointer location * @param y y coordinate in window decoration coordinate system of the new pointer location */ void onDragResizeMove(float x, float y); void onDragPositioningMove(float x, float y); /** * Called when a drag resize stops. * Called when a drag-resize or drag-move stops. * @param x x coordinate in window decoration coordinate system where the drag resize stops * @param y y coordinate in window decoration coordinate system where the drag resize stops */ void onDragResizeEnd(float x, float y); void onDragPositioningEnd(float x, float y); } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecorViewModel.java +7 −7 Original line number Diff line number Diff line Loading @@ -174,7 +174,7 @@ public class CaptionWindowDecorViewModel implements WindowDecorViewModel { final CaptionTouchEventListener touchEventListener = new CaptionTouchEventListener(taskInfo, taskPositioner); windowDecoration.setCaptionListeners(touchEventListener, touchEventListener); windowDecoration.setDragResizeCallback(taskPositioner); windowDecoration.setDragPositioningCallback(taskPositioner); windowDecoration.setDragDetector(touchEventListener.mDragDetector); windowDecoration.relayout(taskInfo, startT, finishT); setupCaptionColor(taskInfo, windowDecoration); Loading @@ -185,17 +185,17 @@ public class CaptionWindowDecorViewModel implements WindowDecorViewModel { private final int mTaskId; private final WindowContainerToken mTaskToken; private final DragResizeCallback mDragResizeCallback; private final DragPositioningCallback mDragPositioningCallback; private final DragDetector mDragDetector; private int mDragPointerId = -1; private CaptionTouchEventListener( RunningTaskInfo taskInfo, DragResizeCallback dragResizeCallback) { DragPositioningCallback dragPositioningCallback) { mTaskId = taskInfo.taskId; mTaskToken = taskInfo.token; mDragResizeCallback = dragResizeCallback; mDragPositioningCallback = dragPositioningCallback; mDragDetector = new DragDetector(this); } Loading Loading @@ -247,20 +247,20 @@ public class CaptionWindowDecorViewModel implements WindowDecorViewModel { switch (e.getActionMasked()) { case MotionEvent.ACTION_DOWN: { mDragPointerId = e.getPointerId(0); mDragResizeCallback.onDragResizeStart( mDragPositioningCallback.onDragPositioningStart( 0 /* ctrlType */, e.getRawX(0), e.getRawY(0)); break; } case MotionEvent.ACTION_MOVE: { int dragPointerIdx = e.findPointerIndex(mDragPointerId); mDragResizeCallback.onDragResizeMove( mDragPositioningCallback.onDragPositioningMove( e.getRawX(dragPointerIdx), e.getRawY(dragPointerIdx)); break; } case MotionEvent.ACTION_UP: case MotionEvent.ACTION_CANCEL: { int dragPointerIdx = e.findPointerIndex(mDragPointerId); mDragResizeCallback.onDragResizeEnd( mDragPositioningCallback.onDragPositioningEnd( e.getRawX(dragPointerIdx), e.getRawY(dragPointerIdx)); break; } Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/CaptionWindowDecoration.java +4 −4 Original line number Diff line number Diff line Loading @@ -47,7 +47,7 @@ public class CaptionWindowDecoration extends WindowDecoration<WindowDecorLinearL private View.OnClickListener mOnCaptionButtonClickListener; private View.OnTouchListener mOnCaptionTouchListener; private DragResizeCallback mDragResizeCallback; private DragPositioningCallback mDragPositioningCallback; private DragResizeInputListener mDragResizeListener; private DragDetector mDragDetector; Loading Loading @@ -78,8 +78,8 @@ public class CaptionWindowDecoration extends WindowDecoration<WindowDecorLinearL mOnCaptionTouchListener = onCaptionTouchListener; } void setDragResizeCallback(DragResizeCallback dragResizeCallback) { mDragResizeCallback = dragResizeCallback; void setDragPositioningCallback(DragPositioningCallback dragPositioningCallback) { mDragPositioningCallback = dragPositioningCallback; } void setDragDetector(DragDetector dragDetector) { Loading Loading @@ -151,7 +151,7 @@ public class CaptionWindowDecoration extends WindowDecoration<WindowDecorLinearL mChoreographer, mDisplay.getDisplayId(), mDecorationContainerSurface, mDragResizeCallback); mDragPositioningCallback); } final int touchSlop = ViewConfiguration.get(mResult.mRootView.getContext()) Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecorViewModel.java +7 −7 Original line number Diff line number Diff line Loading @@ -209,17 +209,17 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel { private final int mTaskId; private final WindowContainerToken mTaskToken; private final DragResizeCallback mDragResizeCallback; private final DragPositioningCallback mDragPositioningCallback; private final DragDetector mDragDetector; private int mDragPointerId = -1; private DesktopModeTouchEventListener( RunningTaskInfo taskInfo, DragResizeCallback dragResizeCallback) { DragPositioningCallback dragPositioningCallback) { mTaskId = taskInfo.taskId; mTaskToken = taskInfo.token; mDragResizeCallback = dragResizeCallback; mDragPositioningCallback = dragPositioningCallback; mDragDetector = new DragDetector(this); } Loading Loading @@ -283,13 +283,13 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel { switch (e.getActionMasked()) { case MotionEvent.ACTION_DOWN: { mDragPointerId = e.getPointerId(0); mDragResizeCallback.onDragResizeStart( mDragPositioningCallback.onDragPositioningStart( 0 /* ctrlType */, e.getRawX(0), e.getRawY(0)); break; } case MotionEvent.ACTION_MOVE: { final int dragPointerIdx = e.findPointerIndex(mDragPointerId); mDragResizeCallback.onDragResizeMove( mDragPositioningCallback.onDragPositioningMove( e.getRawX(dragPointerIdx), e.getRawY(dragPointerIdx)); break; } Loading @@ -298,7 +298,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel { final int dragPointerIdx = e.findPointerIndex(mDragPointerId); final int statusBarHeight = mDisplayController .getDisplayLayout(taskInfo.displayId).stableInsets().top; mDragResizeCallback.onDragResizeEnd( mDragPositioningCallback.onDragPositioningEnd( e.getRawX(dragPointerIdx), e.getRawY(dragPointerIdx)); if (e.getRawY(dragPointerIdx) <= statusBarHeight) { if (DesktopModeStatus.isProto2Enabled()) { Loading Loading @@ -557,7 +557,7 @@ public class DesktopModeWindowDecorViewModel implements WindowDecorViewModel { final DesktopModeTouchEventListener touchEventListener = new DesktopModeTouchEventListener(taskInfo, taskPositioner); windowDecoration.setCaptionListeners(touchEventListener, touchEventListener); windowDecoration.setDragResizeCallback(taskPositioner); windowDecoration.setDragPositioningCallback(taskPositioner); windowDecoration.setDragDetector(touchEventListener.mDragDetector); windowDecoration.relayout(taskInfo, startT, finishT); incrementEventReceiverTasks(taskInfo.displayId); Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java +4 −4 Original line number Diff line number Diff line Loading @@ -54,7 +54,7 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin private View.OnClickListener mOnCaptionButtonClickListener; private View.OnTouchListener mOnCaptionTouchListener; private DragResizeCallback mDragResizeCallback; private DragPositioningCallback mDragPositioningCallback; private DragResizeInputListener mDragResizeListener; private DragDetector mDragDetector; Loading Loading @@ -90,8 +90,8 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin mOnCaptionTouchListener = onCaptionTouchListener; } void setDragResizeCallback(DragResizeCallback dragResizeCallback) { mDragResizeCallback = dragResizeCallback; void setDragPositioningCallback(DragPositioningCallback dragPositioningCallback) { mDragPositioningCallback = dragPositioningCallback; } void setDragDetector(DragDetector dragDetector) { Loading Loading @@ -179,7 +179,7 @@ public class DesktopModeWindowDecoration extends WindowDecoration<WindowDecorLin mChoreographer, mDisplay.getDisplayId(), mDecorationContainerSurface, mDragResizeCallback); mDragPositioningCallback); } final int touchSlop = ViewConfiguration.get(mResult.mRootView.getContext()) Loading
libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DragResizeCallback.java→libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DragPositioningCallback.java +9 −9 Original line number Diff line number Diff line Loading @@ -19,28 +19,28 @@ package com.android.wm.shell.windowdecor; /** * Callback called when receiving drag-resize or drag-move related input events. */ public interface DragResizeCallback { public interface DragPositioningCallback { /** * Called when a drag resize starts. * Called when a drag-resize or drag-move starts. * * @param ctrlType {@link TaskPositioner.CtrlType} indicating the direction of resizing, use * {@code 0} to indicate it's a move * @param x x coordinate in window decoration coordinate system where the drag resize starts * @param y y coordinate in window decoration coordinate system where the drag resize starts * @param x x coordinate in window decoration coordinate system where the drag starts * @param y y coordinate in window decoration coordinate system where the drag starts */ void onDragResizeStart(@TaskPositioner.CtrlType int ctrlType, float x, float y); void onDragPositioningStart(@TaskPositioner.CtrlType int ctrlType, float x, float y); /** * Called when the pointer moves during a drag resize. * Called when the pointer moves during a drag-resize or drag-move. * @param x x coordinate in window decoration coordinate system of the new pointer location * @param y y coordinate in window decoration coordinate system of the new pointer location */ void onDragResizeMove(float x, float y); void onDragPositioningMove(float x, float y); /** * Called when a drag resize stops. * Called when a drag-resize or drag-move stops. * @param x x coordinate in window decoration coordinate system where the drag resize stops * @param y y coordinate in window decoration coordinate system where the drag resize stops */ void onDragResizeEnd(float x, float y); void onDragPositioningEnd(float x, float y); }