Log loudly when the binder driver returns an error
This should go/disgracefully-explode but this has been here long enough
that just making it crash would be scary.
Test: build and boot emulator
Bug: 262395166
Change-Id: I9f68e08d153c9ed0aa5d0208db6f3184ed9e8f5e
diff --git a/libs/binder/IPCThreadState.cpp b/libs/binder/IPCThreadState.cpp
index 6d64e1e..da58251 100644
--- a/libs/binder/IPCThreadState.cpp
+++ b/libs/binder/IPCThreadState.cpp
@@ -1221,6 +1221,10 @@
return NO_ERROR;
}
+ ALOGE_IF(mProcess->mDriverFD >= 0,
+ "Driver returned error (%s). This is a bug in either libbinder or the driver. This "
+ "thread's connection to %s will no longer work.",
+ statusToString(err).c_str(), mProcess->mDriverName.c_str());
return err;
}