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:
parent
b898440c99
commit
0a32461524
|
@ -50,7 +50,11 @@ public:
|
||||||
data.writeInterfaceToken(IBatteryPropertiesRegistrar::getInterfaceDescriptor());
|
data.writeInterfaceToken(IBatteryPropertiesRegistrar::getInterfaceDescriptor());
|
||||||
data.writeInt32(id);
|
data.writeInt32(id);
|
||||||
remote()->transact(GET_PROPERTY, data, &reply);
|
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();
|
int parcelpresent = reply.readInt32();
|
||||||
if (parcelpresent)
|
if (parcelpresent)
|
||||||
val->readFromParcel(&reply);
|
val->readFromParcel(&reply);
|
||||||
|
|
Loading…
Reference in New Issue