libbinder: warn on null binder read
This error does happen a few times during boot, but it can be
pretty hard to discover (evidenced from a few email threads).
Bug: N/A
Test: boot
Change-Id: I650319cb8bdfb9eb65c079077fbf834cbc66b7f9
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index 504c6c2..a217a15 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -1862,6 +1862,7 @@
{
status_t status = readNullableStrongBinder(val);
if (status == OK && !val->get()) {
+ ALOGW("Expecting binder but got null!");
status = UNEXPECTED_NULL;
}
return status;