Loading libs/binder/ndk/ibinder.cpp +16 −7 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ using ::android::IResultReceiver; using ::android::Parcel; using ::android::sp; using ::android::status_t; using ::android::statusToString; using ::android::String16; using ::android::String8; using ::android::wp; Loading Loading @@ -133,7 +134,8 @@ bool AIBinder::associateClass(const AIBinder_Class* clazz) { } else { // b/155793159 LOG(ERROR) << __func__ << ": Cannot associate class '" << newDescriptor << "' to dead binder."; << "' to dead binder with cached descriptor '" << SanitizeString(descriptor) << "'."; } return false; } Loading Loading @@ -458,7 +460,8 @@ binder_status_t AIBinder_DeathRecipient::unlinkToDeath(const sp<IBinder>& binder status_t status = binder->unlinkToDeath(recipient, cookie, 0 /*flags*/); if (status != ::android::OK) { LOG(ERROR) << __func__ << ": removed reference to death recipient but unlink failed."; << ": removed reference to death recipient but unlink failed: " << statusToString(status); } return PruneStatusT(status); } Loading Loading @@ -539,7 +542,8 @@ binder_status_t AIBinder_dump(AIBinder* binder, int fd, const char** args, uint3 binder_status_t AIBinder_linkToDeath(AIBinder* binder, AIBinder_DeathRecipient* recipient, void* cookie) { if (binder == nullptr || recipient == nullptr) { LOG(ERROR) << __func__ << ": Must provide binder and recipient."; LOG(ERROR) << __func__ << ": Must provide binder (" << binder << ") and recipient (" << recipient << ")"; return STATUS_UNEXPECTED_NULL; } Loading @@ -550,7 +554,8 @@ binder_status_t AIBinder_linkToDeath(AIBinder* binder, AIBinder_DeathRecipient* binder_status_t AIBinder_unlinkToDeath(AIBinder* binder, AIBinder_DeathRecipient* recipient, void* cookie) { if (binder == nullptr || recipient == nullptr) { LOG(ERROR) << __func__ << ": Must provide binder and recipient."; LOG(ERROR) << __func__ << ": Must provide binder (" << binder << ") and recipient (" << recipient << ")"; return STATUS_UNEXPECTED_NULL; } Loading Loading @@ -625,7 +630,8 @@ void* AIBinder_getUserData(AIBinder* binder) { binder_status_t AIBinder_prepareTransaction(AIBinder* binder, AParcel** in) { if (binder == nullptr || in == nullptr) { LOG(ERROR) << __func__ << ": requires non-null parameters."; LOG(ERROR) << __func__ << ": requires non-null parameters binder (" << binder << ") and in (" << in << ")."; return STATUS_UNEXPECTED_NULL; } const AIBinder_Class* clazz = binder->getClass(); Loading Loading @@ -671,7 +677,9 @@ binder_status_t AIBinder_transact(AIBinder* binder, transaction_code_t code, APa AutoParcelDestroyer forIn(in, DestroyParcel); if (!isUserCommand(code)) { LOG(ERROR) << __func__ << ": Only user-defined transactions can be made from the NDK."; LOG(ERROR) << __func__ << ": Only user-defined transactions can be made from the NDK, but requested: " << code; return STATUS_UNKNOWN_TRANSACTION; } Loading @@ -682,7 +690,8 @@ binder_status_t AIBinder_transact(AIBinder* binder, transaction_code_t code, APa } if (binder == nullptr || *in == nullptr || out == nullptr) { LOG(ERROR) << __func__ << ": requires non-null parameters."; LOG(ERROR) << __func__ << ": requires non-null parameters binder (" << binder << "), in (" << in << "), and out (" << out << ")."; return STATUS_UNEXPECTED_NULL; } Loading Loading
libs/binder/ndk/ibinder.cpp +16 −7 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ using ::android::IResultReceiver; using ::android::Parcel; using ::android::sp; using ::android::status_t; using ::android::statusToString; using ::android::String16; using ::android::String8; using ::android::wp; Loading Loading @@ -133,7 +134,8 @@ bool AIBinder::associateClass(const AIBinder_Class* clazz) { } else { // b/155793159 LOG(ERROR) << __func__ << ": Cannot associate class '" << newDescriptor << "' to dead binder."; << "' to dead binder with cached descriptor '" << SanitizeString(descriptor) << "'."; } return false; } Loading Loading @@ -458,7 +460,8 @@ binder_status_t AIBinder_DeathRecipient::unlinkToDeath(const sp<IBinder>& binder status_t status = binder->unlinkToDeath(recipient, cookie, 0 /*flags*/); if (status != ::android::OK) { LOG(ERROR) << __func__ << ": removed reference to death recipient but unlink failed."; << ": removed reference to death recipient but unlink failed: " << statusToString(status); } return PruneStatusT(status); } Loading Loading @@ -539,7 +542,8 @@ binder_status_t AIBinder_dump(AIBinder* binder, int fd, const char** args, uint3 binder_status_t AIBinder_linkToDeath(AIBinder* binder, AIBinder_DeathRecipient* recipient, void* cookie) { if (binder == nullptr || recipient == nullptr) { LOG(ERROR) << __func__ << ": Must provide binder and recipient."; LOG(ERROR) << __func__ << ": Must provide binder (" << binder << ") and recipient (" << recipient << ")"; return STATUS_UNEXPECTED_NULL; } Loading @@ -550,7 +554,8 @@ binder_status_t AIBinder_linkToDeath(AIBinder* binder, AIBinder_DeathRecipient* binder_status_t AIBinder_unlinkToDeath(AIBinder* binder, AIBinder_DeathRecipient* recipient, void* cookie) { if (binder == nullptr || recipient == nullptr) { LOG(ERROR) << __func__ << ": Must provide binder and recipient."; LOG(ERROR) << __func__ << ": Must provide binder (" << binder << ") and recipient (" << recipient << ")"; return STATUS_UNEXPECTED_NULL; } Loading Loading @@ -625,7 +630,8 @@ void* AIBinder_getUserData(AIBinder* binder) { binder_status_t AIBinder_prepareTransaction(AIBinder* binder, AParcel** in) { if (binder == nullptr || in == nullptr) { LOG(ERROR) << __func__ << ": requires non-null parameters."; LOG(ERROR) << __func__ << ": requires non-null parameters binder (" << binder << ") and in (" << in << ")."; return STATUS_UNEXPECTED_NULL; } const AIBinder_Class* clazz = binder->getClass(); Loading Loading @@ -671,7 +677,9 @@ binder_status_t AIBinder_transact(AIBinder* binder, transaction_code_t code, APa AutoParcelDestroyer forIn(in, DestroyParcel); if (!isUserCommand(code)) { LOG(ERROR) << __func__ << ": Only user-defined transactions can be made from the NDK."; LOG(ERROR) << __func__ << ": Only user-defined transactions can be made from the NDK, but requested: " << code; return STATUS_UNKNOWN_TRANSACTION; } Loading @@ -682,7 +690,8 @@ binder_status_t AIBinder_transact(AIBinder* binder, transaction_code_t code, APa } if (binder == nullptr || *in == nullptr || out == nullptr) { LOG(ERROR) << __func__ << ": requires non-null parameters."; LOG(ERROR) << __func__ << ": requires non-null parameters binder (" << binder << "), in (" << in << "), and out (" << out << ")."; return STATUS_UNEXPECTED_NULL; } Loading