Loading core/java/android/window/InputTransferToken.java +2 −1 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ public final class InputTransferToken implements Parcelable { private static native void nativeWriteToParcel(long nativeObject, Parcel out); private static native long nativeReadFromParcel(Parcel in); private static native IBinder nativeGetBinderToken(long nativeObject); private static native long nativeGetBinderTokenRef(long nativeObject); private static native long nativeGetNativeInputTransferTokenFinalizer(); private static native boolean nativeEquals(long nativeObject1, long nativeObject2); Loading Loading @@ -130,7 +131,7 @@ public final class InputTransferToken implements Parcelable { */ @Override public int hashCode() { return Objects.hash(getToken()); return Objects.hash(nativeGetBinderTokenRef(mNativeObject)); } /** Loading core/jni/android_window_InputTransferToken.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -70,6 +70,11 @@ static jobject nativeGetBinderToken(JNIEnv* env, jclass clazz, jlong nativeObj) return javaObjectForIBinder(env, inputTransferToken->mToken); } static jlong nativeGetBinderTokenRef(JNIEnv*, jclass, jlong nativeObj) { sp<InputTransferToken> inputTransferToken = reinterpret_cast<InputTransferToken*>(nativeObj); return reinterpret_cast<jlong>(inputTransferToken->mToken.get()); } InputTransferToken* android_window_InputTransferToken_getNativeInputTransferToken( JNIEnv* env, jobject inputTransferTokenObj) { if (inputTransferTokenObj != nullptr && Loading Loading @@ -114,6 +119,7 @@ static const JNINativeMethod sInputTransferTokenMethods[] = { {"nativeWriteToParcel", "(JLandroid/os/Parcel;)V", (void*)nativeWriteToParcel}, {"nativeReadFromParcel", "(Landroid/os/Parcel;)J", (void*)nativeReadFromParcel}, {"nativeGetBinderToken", "(J)Landroid/os/IBinder;", (void*)nativeGetBinderToken}, {"nativeGetBinderTokenRef", "(J)J", (void*)nativeGetBinderTokenRef}, {"nativeGetNativeInputTransferTokenFinalizer", "()J", (void*)nativeGetNativeInputTransferTokenFinalizer}, {"nativeEquals", "(JJ)Z", (void*) nativeEquals}, // clang-format on Loading Loading
core/java/android/window/InputTransferToken.java +2 −1 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ public final class InputTransferToken implements Parcelable { private static native void nativeWriteToParcel(long nativeObject, Parcel out); private static native long nativeReadFromParcel(Parcel in); private static native IBinder nativeGetBinderToken(long nativeObject); private static native long nativeGetBinderTokenRef(long nativeObject); private static native long nativeGetNativeInputTransferTokenFinalizer(); private static native boolean nativeEquals(long nativeObject1, long nativeObject2); Loading Loading @@ -130,7 +131,7 @@ public final class InputTransferToken implements Parcelable { */ @Override public int hashCode() { return Objects.hash(getToken()); return Objects.hash(nativeGetBinderTokenRef(mNativeObject)); } /** Loading
core/jni/android_window_InputTransferToken.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -70,6 +70,11 @@ static jobject nativeGetBinderToken(JNIEnv* env, jclass clazz, jlong nativeObj) return javaObjectForIBinder(env, inputTransferToken->mToken); } static jlong nativeGetBinderTokenRef(JNIEnv*, jclass, jlong nativeObj) { sp<InputTransferToken> inputTransferToken = reinterpret_cast<InputTransferToken*>(nativeObj); return reinterpret_cast<jlong>(inputTransferToken->mToken.get()); } InputTransferToken* android_window_InputTransferToken_getNativeInputTransferToken( JNIEnv* env, jobject inputTransferTokenObj) { if (inputTransferTokenObj != nullptr && Loading Loading @@ -114,6 +119,7 @@ static const JNINativeMethod sInputTransferTokenMethods[] = { {"nativeWriteToParcel", "(JLandroid/os/Parcel;)V", (void*)nativeWriteToParcel}, {"nativeReadFromParcel", "(Landroid/os/Parcel;)J", (void*)nativeReadFromParcel}, {"nativeGetBinderToken", "(J)Landroid/os/IBinder;", (void*)nativeGetBinderToken}, {"nativeGetBinderTokenRef", "(J)J", (void*)nativeGetBinderTokenRef}, {"nativeGetNativeInputTransferTokenFinalizer", "()J", (void*)nativeGetNativeInputTransferTokenFinalizer}, {"nativeEquals", "(JJ)Z", (void*) nativeEquals}, // clang-format on Loading