Loading core/java/android/view/InputChannel.java +0 −5 Original line number Diff line number Diff line Loading @@ -61,7 +61,6 @@ public final class InputChannel implements Parcelable { private native void nativeWriteToParcel(Parcel parcel); private native void nativeDup(InputChannel target); private native IBinder nativeGetToken(); private native void nativeSetToken(IBinder token); private native String nativeGetName(); Loading Loading @@ -185,8 +184,4 @@ public final class InputChannel implements Parcelable { public IBinder getToken() { return nativeGetToken(); } public void setToken(IBinder token) { nativeSetToken(token); } } core/jni/android_view_InputChannel.cpp +2 −12 Original line number Diff line number Diff line Loading @@ -276,20 +276,12 @@ static jobject android_view_InputChannel_nativeGetToken(JNIEnv* env, jobject obj NativeInputChannel* nativeInputChannel = android_view_InputChannel_getNativeInputChannel(env, obj); if (nativeInputChannel) { return javaObjectForIBinder(env, nativeInputChannel->getInputChannel()->getToken()); return javaObjectForIBinder(env, nativeInputChannel->getInputChannel()->getConnectionToken()); } return 0; } static void android_view_InputChannel_nativeSetToken(JNIEnv* env, jobject obj, jobject tokenObj) { NativeInputChannel* nativeInputChannel = android_view_InputChannel_getNativeInputChannel(env, obj); sp<IBinder> token = ibinderForJavaObject(env, tokenObj); if (nativeInputChannel != nullptr) { nativeInputChannel->getInputChannel()->setToken(token); } } // ---------------------------------------------------------------------------- static const JNINativeMethod gInputChannelMethods[] = { Loading @@ -312,8 +304,6 @@ static const JNINativeMethod gInputChannelMethods[] = { (void*)android_view_InputChannel_nativeDup }, { "nativeGetToken", "()Landroid/os/IBinder;", (void*)android_view_InputChannel_nativeGetToken }, { "nativeSetToken", "(Landroid/os/IBinder;)V", (void*)android_view_InputChannel_nativeSetToken } }; int register_android_view_InputChannel(JNIEnv* env) { Loading services/core/java/com/android/server/input/InputManagerService.java +1 −5 Original line number Diff line number Diff line Loading @@ -496,8 +496,6 @@ public class InputManagerService extends IInputManager.Stub } InputChannel[] inputChannels = InputChannel.openInputChannelPair(inputChannelName); // Give the output channel a token just for identity purposes. inputChannels[0].setToken(new Binder()); nativeRegisterInputMonitor(mPtr, inputChannels[0], displayId, false /*isGestureMonitor*/); inputChannels[0].dispose(); // don't need to retain the Java object reference return inputChannels[1]; Loading Loading @@ -528,7 +526,6 @@ public class InputManagerService extends IInputManager.Stub try { InputChannel[] inputChannels = InputChannel.openInputChannelPair(inputChannelName); InputMonitorHost host = new InputMonitorHost(inputChannels[0]); inputChannels[0].setToken(host.asBinder()); nativeRegisterInputMonitor(mPtr, inputChannels[0], displayId, true /*isGestureMonitor*/); return new InputMonitor(inputChannels[1], host); Loading @@ -547,7 +544,6 @@ public class InputManagerService extends IInputManager.Stub if (inputChannel == null) { throw new IllegalArgumentException("inputChannel must not be null."); } inputChannel.setToken(new Binder()); nativeRegisterInputChannel(mPtr, inputChannel); } Loading Loading @@ -2188,7 +2184,7 @@ public class InputManagerService extends IInputManager.Stub @Override public void pilferPointers() { nativePilferPointers(mPtr, asBinder()); nativePilferPointers(mPtr, mInputChannel.getToken()); } @Override Loading services/core/java/com/android/server/wm/WindowState.java +0 −1 Original line number Diff line number Diff line Loading @@ -2207,7 +2207,6 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP mInputChannel = inputChannels[0]; mClientChannel = inputChannels[1]; mWmService.mInputManager.registerInputChannel(mInputChannel); mClientChannel.setToken(mInputChannel.getToken()); mInputWindowHandle.token = mInputChannel.getToken(); if (outInputChannel != null) { mClientChannel.transferTo(outInputChannel); Loading services/core/jni/com_android_server_input_InputManagerService.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -1596,8 +1596,8 @@ static jboolean nativeTransferTouchFocus(JNIEnv* env, return JNI_FALSE; } if (im->getInputManager()->getDispatcher()-> transferTouchFocus(fromChannel->getToken(), toChannel->getToken())) { if (im->getInputManager()->getDispatcher()->transferTouchFocus( fromChannel->getConnectionToken(), toChannel->getConnectionToken())) { return JNI_TRUE; } else { return JNI_FALSE; Loading Loading
core/java/android/view/InputChannel.java +0 −5 Original line number Diff line number Diff line Loading @@ -61,7 +61,6 @@ public final class InputChannel implements Parcelable { private native void nativeWriteToParcel(Parcel parcel); private native void nativeDup(InputChannel target); private native IBinder nativeGetToken(); private native void nativeSetToken(IBinder token); private native String nativeGetName(); Loading Loading @@ -185,8 +184,4 @@ public final class InputChannel implements Parcelable { public IBinder getToken() { return nativeGetToken(); } public void setToken(IBinder token) { nativeSetToken(token); } }
core/jni/android_view_InputChannel.cpp +2 −12 Original line number Diff line number Diff line Loading @@ -276,20 +276,12 @@ static jobject android_view_InputChannel_nativeGetToken(JNIEnv* env, jobject obj NativeInputChannel* nativeInputChannel = android_view_InputChannel_getNativeInputChannel(env, obj); if (nativeInputChannel) { return javaObjectForIBinder(env, nativeInputChannel->getInputChannel()->getToken()); return javaObjectForIBinder(env, nativeInputChannel->getInputChannel()->getConnectionToken()); } return 0; } static void android_view_InputChannel_nativeSetToken(JNIEnv* env, jobject obj, jobject tokenObj) { NativeInputChannel* nativeInputChannel = android_view_InputChannel_getNativeInputChannel(env, obj); sp<IBinder> token = ibinderForJavaObject(env, tokenObj); if (nativeInputChannel != nullptr) { nativeInputChannel->getInputChannel()->setToken(token); } } // ---------------------------------------------------------------------------- static const JNINativeMethod gInputChannelMethods[] = { Loading @@ -312,8 +304,6 @@ static const JNINativeMethod gInputChannelMethods[] = { (void*)android_view_InputChannel_nativeDup }, { "nativeGetToken", "()Landroid/os/IBinder;", (void*)android_view_InputChannel_nativeGetToken }, { "nativeSetToken", "(Landroid/os/IBinder;)V", (void*)android_view_InputChannel_nativeSetToken } }; int register_android_view_InputChannel(JNIEnv* env) { Loading
services/core/java/com/android/server/input/InputManagerService.java +1 −5 Original line number Diff line number Diff line Loading @@ -496,8 +496,6 @@ public class InputManagerService extends IInputManager.Stub } InputChannel[] inputChannels = InputChannel.openInputChannelPair(inputChannelName); // Give the output channel a token just for identity purposes. inputChannels[0].setToken(new Binder()); nativeRegisterInputMonitor(mPtr, inputChannels[0], displayId, false /*isGestureMonitor*/); inputChannels[0].dispose(); // don't need to retain the Java object reference return inputChannels[1]; Loading Loading @@ -528,7 +526,6 @@ public class InputManagerService extends IInputManager.Stub try { InputChannel[] inputChannels = InputChannel.openInputChannelPair(inputChannelName); InputMonitorHost host = new InputMonitorHost(inputChannels[0]); inputChannels[0].setToken(host.asBinder()); nativeRegisterInputMonitor(mPtr, inputChannels[0], displayId, true /*isGestureMonitor*/); return new InputMonitor(inputChannels[1], host); Loading @@ -547,7 +544,6 @@ public class InputManagerService extends IInputManager.Stub if (inputChannel == null) { throw new IllegalArgumentException("inputChannel must not be null."); } inputChannel.setToken(new Binder()); nativeRegisterInputChannel(mPtr, inputChannel); } Loading Loading @@ -2188,7 +2184,7 @@ public class InputManagerService extends IInputManager.Stub @Override public void pilferPointers() { nativePilferPointers(mPtr, asBinder()); nativePilferPointers(mPtr, mInputChannel.getToken()); } @Override Loading
services/core/java/com/android/server/wm/WindowState.java +0 −1 Original line number Diff line number Diff line Loading @@ -2207,7 +2207,6 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP mInputChannel = inputChannels[0]; mClientChannel = inputChannels[1]; mWmService.mInputManager.registerInputChannel(mInputChannel); mClientChannel.setToken(mInputChannel.getToken()); mInputWindowHandle.token = mInputChannel.getToken(); if (outInputChannel != null) { mClientChannel.transferTo(outInputChannel); Loading
services/core/jni/com_android_server_input_InputManagerService.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -1596,8 +1596,8 @@ static jboolean nativeTransferTouchFocus(JNIEnv* env, return JNI_FALSE; } if (im->getInputManager()->getDispatcher()-> transferTouchFocus(fromChannel->getToken(), toChannel->getToken())) { if (im->getInputManager()->getDispatcher()->transferTouchFocus( fromChannel->getConnectionToken(), toChannel->getConnectionToken())) { return JNI_TRUE; } else { return JNI_FALSE; Loading