From 2ef0cbd8bb070a3268ba5e832c4994415fcfbabf Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Wed, 17 Jan 2018 13:26:35 -0800 Subject: HIDL: Check error value. HwParcel's verifySuccess method doesn't actually check to see if the call succeeded. Change-Id: Iaa99cbfd6f5f211facaa20c09c5e1dae8e2b8a7f Fixes: 71813867 Test: boot walleye, hidl_test_java --- core/jni/android_os_HwParcel.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/jni/android_os_HwParcel.cpp b/core/jni/android_os_HwParcel.cpp index 9494fb8e7eef..061349aee96f 100644 --- a/core/jni/android_os_HwParcel.cpp +++ b/core/jni/android_os_HwParcel.cpp @@ -391,6 +391,10 @@ static void JHwParcel_native_verifySuccess(JNIEnv *env, jobject thiz) { Status status; status_t err = ::android::hardware::readFromParcel(&status, *parcel); signalExceptionForError(env, err); + + if (!status.isOk()) { + signalExceptionForError(env, UNKNOWN_ERROR, true /* canThrowRemoteException */); + } } static void JHwParcel_native_release( -- cgit v1.2.3-59-g8ed1b