diff options
| author | Christopher Tate <ctate@google.com> | 2015-06-29 18:54:56 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-06-29 18:54:58 +0000 |
| commit | 795d95ecd7ad27fdd10f66113033ad98c4f5baf7 (patch) | |
| tree | f33c0759dabf0b76ab2297a5f0f673e6baf96d4f | |
| parent | 810d5ed23b89265946d7f0fd8b2e6002038f1f2c (diff) | |
| parent | ffd5864202a7c85620b7eb5032dc0120481705e5 (diff) | |
| download | frameworks_base-795d95ecd7ad27fdd10f66113033ad98c4f5baf7.zip frameworks_base-795d95ecd7ad27fdd10f66113033ad98c4f5baf7.tar.gz frameworks_base-795d95ecd7ad27fdd10f66113033ad98c4f5baf7.tar.bz2 | |
Merge "Throw DeadObjectException on failed transaction, not RuntimeException" into mnc-dev
| -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 e2cfa44..c139cd7 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"); } |
