diff options
author | 2015-06-29 19:19:56 +0000 | |
---|---|---|
committer | 2015-06-29 19:19:56 +0000 | |
commit | 0515ad6ac0806d88ac371730c064a0ae5bc5db42 (patch) | |
tree | 2244e0dd53bfaca04f49c16af4bad075361f3364 | |
parent | fd2b579bb79a21e4090ab6b927bdbce8a9db67d9 (diff) | |
parent | 1cd343f28caf2bec6d17ce0857df3bd0d7720c1f (diff) |
am 1cd343f2: am 795d95ec: Merge "Throw DeadObjectException on failed transaction, not RuntimeException" into mnc-dev
* commit '1cd343f28caf2bec6d17ce0857df3bd0d7720c1f':
Throw DeadObjectException on failed transaction, not RuntimeException
-rw-r--r-- | core/jni/android_util_Binder.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/jni/android_util_Binder.cpp b/core/jni/android_util_Binder.cpp index e2cfa440162e..c139cd78b4c0 100644 --- a/core/jni/android_util_Binder.cpp +++ b/core/jni/android_util_Binder.cpp @@ -697,9 +697,11 @@ void signalExceptionForError(JNIEnv* env, jobject obj, status_t err, } else { // Heuristic: a payload smaller than this threshold "shouldn't" be too // big, so it's probably some other, more subtle problem. In practice - // it nearly always means that the remote process died while the binder + // it seems to always mean that the remote process died while the binder // transaction was already in flight. - exceptionToThrow = "java/lang/RuntimeException"; + exceptionToThrow = (canThrowRemoteException) + ? "android/os/DeadObjectException" + : "java/lang/RuntimeException"; snprintf(msg, sizeof(msg)-1, "Transaction failed on small parcel; remote process probably died"); } |