batteryservice: Native client read exception returned from getProperty

C++ binder client for IBatteryPropertiesRegistrar interface getProperty method
fails to read the exception code returned by the server.  Add the missing read of the exception code.

Bug: 11985952
Change-Id: I8a9b145160aafbcf9976e6c5ba9fcb883126a5e3
This commit is contained in:
Paul Lawrence 2014-03-19 14:47:29 -07:00 committed by Todd Poynor
parent b898440c99
commit 0a32461524
1 changed files with 5 additions and 1 deletions

View File

@ -50,7 +50,11 @@ public:
data.writeInterfaceToken(IBatteryPropertiesRegistrar::getInterfaceDescriptor());
data.writeInt32(id);
remote()->transact(GET_PROPERTY, data, &reply);
status_t ret = reply.readInt32();
int32_t ret = reply.readExceptionCode();
if (ret != 0) {
return ret;
}
ret = reply.readInt32();
int parcelpresent = reply.readInt32();
if (parcelpresent)
val->readFromParcel(&reply);