Loading core/java/android/view/IWindowSession.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -254,6 +254,8 @@ interface IWindowSession { */ boolean startMovingTask(IWindow window, float startX, float startY); void finishMovingTask(IWindow window); void updatePointerIcon(IWindow window); /** Loading core/java/android/view/View.java +15 −0 Original line number Diff line number Diff line Loading @@ -25519,6 +25519,21 @@ public class View implements Drawable.Callback, KeyEvent.Callback, return false; } /** * Finish a window move task. * @hide */ public void finishMovingTask() { if (ViewDebug.DEBUG_POSITIONING) { Log.d(VIEW_LOG_TAG, "finishMovingTask"); } try { mAttachInfo.mSession.finishMovingTask(mAttachInfo.mWindow); } catch (RemoteException e) { Log.e(VIEW_LOG_TAG, "Unable to finish moving", e); } } /** * Handles drag events sent by the system following a call to * {@link android.view.View#startDragAndDrop(ClipData,DragShadowBuilder,Object,int) core/java/com/android/internal/widget/DecorCaptionView.java +8 −1 Original line number Diff line number Diff line Loading @@ -188,7 +188,8 @@ public class DecorCaptionView extends ViewGroup implements View.OnTouchListener, final int y = (int) e.getY(); final boolean fromMouse = e.getToolType(e.getActionIndex()) == MotionEvent.TOOL_TYPE_MOUSE; final boolean primaryButton = (e.getButtonState() & MotionEvent.BUTTON_PRIMARY) != 0; switch (e.getActionMasked()) { final int actionMasked = e.getActionMasked(); switch (actionMasked) { case MotionEvent.ACTION_DOWN: if (!mShow) { // When there is no caption we should not react to anything. Loading Loading @@ -220,6 +221,12 @@ public class DecorCaptionView extends ViewGroup implements View.OnTouchListener, break; } // Abort the ongoing dragging. if (actionMasked == MotionEvent.ACTION_UP) { // If it receives ACTION_UP event, the dragging is already finished and also // the system can not end drag on ACTION_UP event. So request to finish // dragging. finishMovingTask(); } mDragging = false; return !mCheckForDragging; } Loading services/core/java/com/android/server/wm/Session.java +12 −0 Original line number Diff line number Diff line Loading @@ -315,6 +315,18 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient { } } @Override public void finishMovingTask(IWindow window) { if (DEBUG_TASK_POSITIONING) Slog.d(TAG_WM, "finishMovingTask"); long ident = Binder.clearCallingIdentity(); try { mService.mTaskPositioningController.finishTaskPositioning(window); } finally { Binder.restoreCallingIdentity(ident); } } @Override public void reportSystemGestureExclusionChanged(IWindow window, List<Rect> exclusionRects) { long ident = Binder.clearCallingIdentity(); Loading services/core/java/com/android/server/wm/TaskPositioner.java +1 −1 Original line number Diff line number Diff line Loading @@ -119,7 +119,7 @@ class TaskPositioner implements IBinder.DeathRecipient { private int mCtrlType = CTRL_NONE; @VisibleForTesting boolean mDragEnded; private IBinder mClientCallback; IBinder mClientCallback; InputChannel mServerChannel; InputChannel mClientChannel; Loading Loading
core/java/android/view/IWindowSession.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -254,6 +254,8 @@ interface IWindowSession { */ boolean startMovingTask(IWindow window, float startX, float startY); void finishMovingTask(IWindow window); void updatePointerIcon(IWindow window); /** Loading
core/java/android/view/View.java +15 −0 Original line number Diff line number Diff line Loading @@ -25519,6 +25519,21 @@ public class View implements Drawable.Callback, KeyEvent.Callback, return false; } /** * Finish a window move task. * @hide */ public void finishMovingTask() { if (ViewDebug.DEBUG_POSITIONING) { Log.d(VIEW_LOG_TAG, "finishMovingTask"); } try { mAttachInfo.mSession.finishMovingTask(mAttachInfo.mWindow); } catch (RemoteException e) { Log.e(VIEW_LOG_TAG, "Unable to finish moving", e); } } /** * Handles drag events sent by the system following a call to * {@link android.view.View#startDragAndDrop(ClipData,DragShadowBuilder,Object,int)
core/java/com/android/internal/widget/DecorCaptionView.java +8 −1 Original line number Diff line number Diff line Loading @@ -188,7 +188,8 @@ public class DecorCaptionView extends ViewGroup implements View.OnTouchListener, final int y = (int) e.getY(); final boolean fromMouse = e.getToolType(e.getActionIndex()) == MotionEvent.TOOL_TYPE_MOUSE; final boolean primaryButton = (e.getButtonState() & MotionEvent.BUTTON_PRIMARY) != 0; switch (e.getActionMasked()) { final int actionMasked = e.getActionMasked(); switch (actionMasked) { case MotionEvent.ACTION_DOWN: if (!mShow) { // When there is no caption we should not react to anything. Loading Loading @@ -220,6 +221,12 @@ public class DecorCaptionView extends ViewGroup implements View.OnTouchListener, break; } // Abort the ongoing dragging. if (actionMasked == MotionEvent.ACTION_UP) { // If it receives ACTION_UP event, the dragging is already finished and also // the system can not end drag on ACTION_UP event. So request to finish // dragging. finishMovingTask(); } mDragging = false; return !mCheckForDragging; } Loading
services/core/java/com/android/server/wm/Session.java +12 −0 Original line number Diff line number Diff line Loading @@ -315,6 +315,18 @@ class Session extends IWindowSession.Stub implements IBinder.DeathRecipient { } } @Override public void finishMovingTask(IWindow window) { if (DEBUG_TASK_POSITIONING) Slog.d(TAG_WM, "finishMovingTask"); long ident = Binder.clearCallingIdentity(); try { mService.mTaskPositioningController.finishTaskPositioning(window); } finally { Binder.restoreCallingIdentity(ident); } } @Override public void reportSystemGestureExclusionChanged(IWindow window, List<Rect> exclusionRects) { long ident = Binder.clearCallingIdentity(); Loading
services/core/java/com/android/server/wm/TaskPositioner.java +1 −1 Original line number Diff line number Diff line Loading @@ -119,7 +119,7 @@ class TaskPositioner implements IBinder.DeathRecipient { private int mCtrlType = CTRL_NONE; @VisibleForTesting boolean mDragEnded; private IBinder mClientCallback; IBinder mClientCallback; InputChannel mServerChannel; InputChannel mClientChannel; Loading