Loading core/java/android/os/HwParcel.java +1 −1 Original line number Diff line number Diff line Loading @@ -212,7 +212,7 @@ public class HwParcel { public native final HwBlob readBuffer(); public native final HwBlob readEmbeddedBuffer( long parentHandle, long offset); long parentHandle, long offset, boolean nullable); public native final void writeBuffer(HwBlob blob); Loading core/jni/android_os_HwParcel.cpp +8 −3 Original line number Diff line number Diff line Loading @@ -822,7 +822,8 @@ static jobject JHwParcel_native_readBuffer(JNIEnv *env, jobject thiz) { } static jobject JHwParcel_native_readEmbeddedBuffer( JNIEnv *env, jobject thiz, jlong parentHandle, jlong offset) { JNIEnv *env, jobject thiz, jlong parentHandle, jlong offset, jboolean nullable) { hardware::Parcel *parcel = JHwParcel::GetNativeContext(env, thiz)->getParcel(); Loading @@ -830,11 +831,15 @@ static jobject JHwParcel_native_readEmbeddedBuffer( const void *ptr; status_t status = parcel->readEmbeddedBuffer(&childHandle, parentHandle, offset, &ptr); parcel->readNullableEmbeddedBuffer(&childHandle, parentHandle, offset, &ptr); if (status != OK) { jniThrowException(env, "java/util/NoSuchElementException", NULL); return 0; } else if (status == OK && !nullable && ptr == nullptr) { jniThrowException(env, "java/lang/NullPointerException", NULL); return 0; } return JHwBlob::NewObject(env, ptr, childHandle); Loading Loading @@ -945,7 +950,7 @@ static JNINativeMethod gMethods[] = { { "readBuffer", "()L" PACKAGE_PATH "/HwBlob;", (void *)JHwParcel_native_readBuffer }, { "readEmbeddedBuffer", "(JJ)L" PACKAGE_PATH "/HwBlob;", { "readEmbeddedBuffer", "(JJZ)L" PACKAGE_PATH "/HwBlob;", (void *)JHwParcel_native_readEmbeddedBuffer }, { "writeBuffer", "(L" PACKAGE_PATH "/HwBlob;)V", Loading Loading
core/java/android/os/HwParcel.java +1 −1 Original line number Diff line number Diff line Loading @@ -212,7 +212,7 @@ public class HwParcel { public native final HwBlob readBuffer(); public native final HwBlob readEmbeddedBuffer( long parentHandle, long offset); long parentHandle, long offset, boolean nullable); public native final void writeBuffer(HwBlob blob); Loading
core/jni/android_os_HwParcel.cpp +8 −3 Original line number Diff line number Diff line Loading @@ -822,7 +822,8 @@ static jobject JHwParcel_native_readBuffer(JNIEnv *env, jobject thiz) { } static jobject JHwParcel_native_readEmbeddedBuffer( JNIEnv *env, jobject thiz, jlong parentHandle, jlong offset) { JNIEnv *env, jobject thiz, jlong parentHandle, jlong offset, jboolean nullable) { hardware::Parcel *parcel = JHwParcel::GetNativeContext(env, thiz)->getParcel(); Loading @@ -830,11 +831,15 @@ static jobject JHwParcel_native_readEmbeddedBuffer( const void *ptr; status_t status = parcel->readEmbeddedBuffer(&childHandle, parentHandle, offset, &ptr); parcel->readNullableEmbeddedBuffer(&childHandle, parentHandle, offset, &ptr); if (status != OK) { jniThrowException(env, "java/util/NoSuchElementException", NULL); return 0; } else if (status == OK && !nullable && ptr == nullptr) { jniThrowException(env, "java/lang/NullPointerException", NULL); return 0; } return JHwBlob::NewObject(env, ptr, childHandle); Loading Loading @@ -945,7 +950,7 @@ static JNINativeMethod gMethods[] = { { "readBuffer", "()L" PACKAGE_PATH "/HwBlob;", (void *)JHwParcel_native_readBuffer }, { "readEmbeddedBuffer", "(JJ)L" PACKAGE_PATH "/HwBlob;", { "readEmbeddedBuffer", "(JJZ)L" PACKAGE_PATH "/HwBlob;", (void *)JHwParcel_native_readEmbeddedBuffer }, { "writeBuffer", "(L" PACKAGE_PATH "/HwBlob;)V", Loading