summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2020-07-08 17:12:20 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2020-07-08 17:12:20 +0000
commitce2ff0a9a2b5596e6c5b64c5fb241b8f8dc480c0 (patch)
tree4c6ebaa653b718c69538bf7441150610ac175adf
parent59aa529a5365c0c054444b8b36c2567cb23a7a48 (diff)
parentd15e50b3a540384c9a148edd495d51f5ce17a41d (diff)
Merge "libbinder_ndk: dead binder when associating dead binder" am: b46521f500 am: 54fffc5b65 am: d15e50b3a5
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1357665 Change-Id: I4fb29da4711c1bdd5d3eb293593e3986dd6c36ce
-rw-r--r--libs/binder/ndk/ibinder.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/libs/binder/ndk/ibinder.cpp b/libs/binder/ndk/ibinder.cpp
index 649faa1c76..743ef893fc 100644
--- a/libs/binder/ndk/ibinder.cpp
+++ b/libs/binder/ndk/ibinder.cpp
@@ -99,8 +99,14 @@ bool AIBinder::associateClass(const AIBinder_Class* clazz) {
String8 descriptor(getBinder()->getInterfaceDescriptor());
if (descriptor != newDescriptor) {
- LOG(ERROR) << __func__ << ": Expecting binder to have class '" << newDescriptor.c_str()
- << "' but descriptor is actually '" << descriptor.c_str() << "'.";
+ if (getBinder()->isBinderAlive()) {
+ LOG(ERROR) << __func__ << ": Expecting binder to have class '" << newDescriptor.c_str()
+ << "' but descriptor is actually '" << descriptor.c_str() << "'.";
+ } else {
+ // b/155793159
+ LOG(ERROR) << __func__ << ": Cannot associate class '" << newDescriptor.c_str()
+ << "' to dead binder.";
+ }
return false;
}