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
This commit is contained in:
Steven Moreland
2021-03-12 21:16:07 +00:00
parent 4d83226663
commit ffaac1c2d3

View File

@@ -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());
}
}