diff options
author | Steven Moreland <smoreland@google.com> | 2021-03-12 21:16:07 +0000 |
---|---|---|
committer | Steven Moreland <smoreland@google.com> | 2021-03-12 21:18:30 +0000 |
commit | ffaac1c2d38fde3c8e0503c1c5cc2fc3eedad78a (patch) | |
tree | fc738db2506c467c0eadd97cfc6491b5394b4b3b /core | |
parent | 4d832266632e22a8c5c006cd9616201011ff9729 (diff) |
Binder: disambiguate unlinkToDeath error
BpBinder may return OK, DEAD_OBJECT, or NAME_NOT_FOUND for this
operation, but BBinder returns INVALID_OPERATION, and subclasses may
return other errors. In at least one bug, the resolution of this
ambiguity would help direct debugging.
Bug: 180891878
Test: N/A
Change-Id: I109a09788d3075e7c594445a6f3649ade109b5c2
Diffstat (limited to 'core')
-rw-r--r-- | core/jni/android_util_Binder.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/jni/android_util_Binder.cpp b/core/jni/android_util_Binder.cpp index f71b42c4793f..249950419441 100644 --- a/core/jni/android_util_Binder.cpp +++ b/core/jni/android_util_Binder.cpp @@ -1516,7 +1516,9 @@ static jboolean android_os_BinderProxy_unlinkToDeath(JNIEnv* env, jobject obj, res = JNI_TRUE; } else { jniThrowException(env, "java/util/NoSuchElementException", - "Death link does not exist"); + base::StringPrintf("Death link does not exist (%s)", + statusToString(err).c_str()) + .c_str()); } } |