Loading services/core/java/com/android/server/input/InputManagerService.java +2 −2 Original line number Diff line number Diff line Loading @@ -665,10 +665,10 @@ public class InputManagerService extends IInputManager.Stub * gesture * @return True if the transfer succeeded, false if there was no active touch gesture happening */ public boolean transferTouch(IBinder destChannelToken) { public boolean transferTouch(IBinder destChannelToken, int displayId) { // TODO(b/162194035): Replace this with a SPY window Objects.requireNonNull(destChannelToken, "destChannelToken must not be null"); return mNative.transferTouch(destChannelToken); return mNative.transferTouch(destChannelToken, displayId); } /** Loading services/core/java/com/android/server/input/NativeInputManagerService.java +6 −2 Original line number Diff line number Diff line Loading @@ -90,7 +90,11 @@ public interface NativeInputManagerService { boolean transferTouchFocus(IBinder fromChannelToken, IBinder toChannelToken, boolean isDragDrop); boolean transferTouch(IBinder destChannelToken); /** * Transfer the current touch gesture to the window identified by 'destChannelToken' positioned * on display with id 'displayId'. */ boolean transferTouch(IBinder destChannelToken, int displayId); void setPointerSpeed(int speed); Loading Loading @@ -263,7 +267,7 @@ public interface NativeInputManagerService { boolean isDragDrop); @Override public native boolean transferTouch(IBinder destChannelToken); public native boolean transferTouch(IBinder destChannelToken, int displayId); @Override public native void setPointerSpeed(int speed); Loading services/core/java/com/android/server/wm/WindowState.java +1 −1 Original line number Diff line number Diff line Loading @@ -2805,7 +2805,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP * Move the touch gesture from the currently touched window on this display to this window. */ public boolean transferTouch() { return mWmService.mInputManager.transferTouch(mInputChannelToken); return mWmService.mInputManager.transferTouch(mInputChannelToken, getDisplayId()); } void disposeInputChannel() { Loading services/core/jni/com_android_server_input_InputManagerService.cpp +5 −4 Original line number Diff line number Diff line Loading @@ -1854,12 +1854,13 @@ static jboolean nativeTransferTouchFocus(JNIEnv* env, jobject nativeImplObj, } } static jboolean nativeTransferTouch(JNIEnv* env, jobject nativeImplObj, jobject destChannelTokenObj) { static jboolean nativeTransferTouch(JNIEnv* env, jobject nativeImplObj, jobject destChannelTokenObj, jint displayId) { sp<IBinder> destChannelToken = ibinderForJavaObject(env, destChannelTokenObj); NativeInputManager* im = getNativeInputManager(env, nativeImplObj); if (im->getInputManager()->getDispatcher().transferTouch(destChannelToken)) { if (im->getInputManager()->getDispatcher().transferTouch(destChannelToken, static_cast<int32_t>(displayId))) { return JNI_TRUE; } else { return JNI_FALSE; Loading Loading @@ -2355,7 +2356,7 @@ static const JNINativeMethod gInputManagerMethods[] = { {"setSystemUiLightsOut", "(Z)V", (void*)nativeSetSystemUiLightsOut}, {"transferTouchFocus", "(Landroid/os/IBinder;Landroid/os/IBinder;Z)Z", (void*)nativeTransferTouchFocus}, {"transferTouch", "(Landroid/os/IBinder;)Z", (void*)nativeTransferTouch}, {"transferTouch", "(Landroid/os/IBinder;I)Z", (void*)nativeTransferTouch}, {"setPointerSpeed", "(I)V", (void*)nativeSetPointerSpeed}, {"setPointerAcceleration", "(F)V", (void*)nativeSetPointerAcceleration}, {"setShowTouches", "(Z)V", (void*)nativeSetShowTouches}, Loading Loading
services/core/java/com/android/server/input/InputManagerService.java +2 −2 Original line number Diff line number Diff line Loading @@ -665,10 +665,10 @@ public class InputManagerService extends IInputManager.Stub * gesture * @return True if the transfer succeeded, false if there was no active touch gesture happening */ public boolean transferTouch(IBinder destChannelToken) { public boolean transferTouch(IBinder destChannelToken, int displayId) { // TODO(b/162194035): Replace this with a SPY window Objects.requireNonNull(destChannelToken, "destChannelToken must not be null"); return mNative.transferTouch(destChannelToken); return mNative.transferTouch(destChannelToken, displayId); } /** Loading
services/core/java/com/android/server/input/NativeInputManagerService.java +6 −2 Original line number Diff line number Diff line Loading @@ -90,7 +90,11 @@ public interface NativeInputManagerService { boolean transferTouchFocus(IBinder fromChannelToken, IBinder toChannelToken, boolean isDragDrop); boolean transferTouch(IBinder destChannelToken); /** * Transfer the current touch gesture to the window identified by 'destChannelToken' positioned * on display with id 'displayId'. */ boolean transferTouch(IBinder destChannelToken, int displayId); void setPointerSpeed(int speed); Loading Loading @@ -263,7 +267,7 @@ public interface NativeInputManagerService { boolean isDragDrop); @Override public native boolean transferTouch(IBinder destChannelToken); public native boolean transferTouch(IBinder destChannelToken, int displayId); @Override public native void setPointerSpeed(int speed); Loading
services/core/java/com/android/server/wm/WindowState.java +1 −1 Original line number Diff line number Diff line Loading @@ -2805,7 +2805,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP * Move the touch gesture from the currently touched window on this display to this window. */ public boolean transferTouch() { return mWmService.mInputManager.transferTouch(mInputChannelToken); return mWmService.mInputManager.transferTouch(mInputChannelToken, getDisplayId()); } void disposeInputChannel() { Loading
services/core/jni/com_android_server_input_InputManagerService.cpp +5 −4 Original line number Diff line number Diff line Loading @@ -1854,12 +1854,13 @@ static jboolean nativeTransferTouchFocus(JNIEnv* env, jobject nativeImplObj, } } static jboolean nativeTransferTouch(JNIEnv* env, jobject nativeImplObj, jobject destChannelTokenObj) { static jboolean nativeTransferTouch(JNIEnv* env, jobject nativeImplObj, jobject destChannelTokenObj, jint displayId) { sp<IBinder> destChannelToken = ibinderForJavaObject(env, destChannelTokenObj); NativeInputManager* im = getNativeInputManager(env, nativeImplObj); if (im->getInputManager()->getDispatcher().transferTouch(destChannelToken)) { if (im->getInputManager()->getDispatcher().transferTouch(destChannelToken, static_cast<int32_t>(displayId))) { return JNI_TRUE; } else { return JNI_FALSE; Loading Loading @@ -2355,7 +2356,7 @@ static const JNINativeMethod gInputManagerMethods[] = { {"setSystemUiLightsOut", "(Z)V", (void*)nativeSetSystemUiLightsOut}, {"transferTouchFocus", "(Landroid/os/IBinder;Landroid/os/IBinder;Z)Z", (void*)nativeTransferTouchFocus}, {"transferTouch", "(Landroid/os/IBinder;)Z", (void*)nativeTransferTouch}, {"transferTouch", "(Landroid/os/IBinder;I)Z", (void*)nativeTransferTouch}, {"setPointerSpeed", "(I)V", (void*)nativeSetPointerSpeed}, {"setPointerAcceleration", "(F)V", (void*)nativeSetPointerAcceleration}, {"setShowTouches", "(Z)V", (void*)nativeSetShowTouches}, Loading