Loading services/core/java/com/android/server/input/InputManagerService.java +2 −2 Original line number Diff line number Diff line Loading @@ -1260,8 +1260,8 @@ public class InputManagerService extends IInputManager.Stub * @return true if drag and drop was successfully started, false otherwise. */ public boolean startDragAndDrop(@NonNull IBinder fromChannelToken, @NonNull InputChannel dragAndDropChannel) { return mNative.transferTouchGesture(fromChannelToken, dragAndDropChannel.getToken(), @NonNull IBinder dragAndDropChannelToken) { return mNative.transferTouchGesture(fromChannelToken, dragAndDropChannelToken, true /* isDragDrop */); } Loading services/core/java/com/android/server/wm/DragState.java +0 −4 Original line number Diff line number Diff line Loading @@ -456,10 +456,6 @@ class DragState { } } InputChannel getInputChannel() { return mInputInterceptor == null ? null : mInputInterceptor.mClientChannel; } InputWindowHandle getInputWindowHandle() { return mInputInterceptor == null ? null : mInputInterceptor.mDragWindowHandle; } Loading services/core/java/com/android/server/wm/WindowManagerInternal.java +1 −1 Original line number Diff line number Diff line Loading @@ -380,7 +380,7 @@ public abstract class WindowManagerInternal { InputChannel source) { return state.register(display) .thenApply(unused -> service.startDragAndDrop(source.getToken(), state.getInputChannel())); service.startDragAndDrop(source.getToken(), state.getInputToken())); } /** Loading services/tests/wmtests/src/com/android/server/wm/DragDropControllerTests.java +2 −2 Original line number Diff line number Diff line Loading @@ -179,7 +179,7 @@ public class DragDropControllerTests extends WindowTestsBase { mWindow = createDropTargetWindow("Drag test window", 0); doReturn(mWindow).when(mDisplayContent).getTouchableWinAtPointLocked(0, 0); when(mWm.mInputManager.startDragAndDrop(any(IBinder.class), any(InputChannel.class))).thenReturn(true); any(IBinder.class))).thenReturn(true); mWm.mWindowMap.put(mWindow.mClient.asBinder(), mWindow); } Loading Loading @@ -707,7 +707,7 @@ public class DragDropControllerTests extends WindowTestsBase { .setFormat(PixelFormat.TRANSLUCENT) .build(); assertTrue(mWm.mInputManager.startDragAndDrop(new Binder(), new InputChannel())); assertTrue(mWm.mInputManager.startDragAndDrop(new Binder(), new Binder())); mToken = mTarget.performDrag(TEST_PID, 0, mWindow.mClient, flag, surface, 0, 0, 0, 0, 0, 0, 0, data); assertNotNull(mToken); Loading Loading
services/core/java/com/android/server/input/InputManagerService.java +2 −2 Original line number Diff line number Diff line Loading @@ -1260,8 +1260,8 @@ public class InputManagerService extends IInputManager.Stub * @return true if drag and drop was successfully started, false otherwise. */ public boolean startDragAndDrop(@NonNull IBinder fromChannelToken, @NonNull InputChannel dragAndDropChannel) { return mNative.transferTouchGesture(fromChannelToken, dragAndDropChannel.getToken(), @NonNull IBinder dragAndDropChannelToken) { return mNative.transferTouchGesture(fromChannelToken, dragAndDropChannelToken, true /* isDragDrop */); } Loading
services/core/java/com/android/server/wm/DragState.java +0 −4 Original line number Diff line number Diff line Loading @@ -456,10 +456,6 @@ class DragState { } } InputChannel getInputChannel() { return mInputInterceptor == null ? null : mInputInterceptor.mClientChannel; } InputWindowHandle getInputWindowHandle() { return mInputInterceptor == null ? null : mInputInterceptor.mDragWindowHandle; } Loading
services/core/java/com/android/server/wm/WindowManagerInternal.java +1 −1 Original line number Diff line number Diff line Loading @@ -380,7 +380,7 @@ public abstract class WindowManagerInternal { InputChannel source) { return state.register(display) .thenApply(unused -> service.startDragAndDrop(source.getToken(), state.getInputChannel())); service.startDragAndDrop(source.getToken(), state.getInputToken())); } /** Loading
services/tests/wmtests/src/com/android/server/wm/DragDropControllerTests.java +2 −2 Original line number Diff line number Diff line Loading @@ -179,7 +179,7 @@ public class DragDropControllerTests extends WindowTestsBase { mWindow = createDropTargetWindow("Drag test window", 0); doReturn(mWindow).when(mDisplayContent).getTouchableWinAtPointLocked(0, 0); when(mWm.mInputManager.startDragAndDrop(any(IBinder.class), any(InputChannel.class))).thenReturn(true); any(IBinder.class))).thenReturn(true); mWm.mWindowMap.put(mWindow.mClient.asBinder(), mWindow); } Loading Loading @@ -707,7 +707,7 @@ public class DragDropControllerTests extends WindowTestsBase { .setFormat(PixelFormat.TRANSLUCENT) .build(); assertTrue(mWm.mInputManager.startDragAndDrop(new Binder(), new InputChannel())); assertTrue(mWm.mInputManager.startDragAndDrop(new Binder(), new Binder())); mToken = mTarget.performDrag(TEST_PID, 0, mWindow.mClient, flag, surface, 0, 0, 0, 0, 0, 0, 0, data); assertNotNull(mToken); Loading