summaryrefslogtreecommitdiffstats
path: root/services/batteryservice
diff options
context:
space:
mode:
authorPaul Lawrence <paullawrence@google.com>2014-03-19 14:47:29 -0700
committerTodd Poynor <toddpoynor@google.com>2014-03-21 19:22:37 +0000
commit0a32461524f55697cdc49baa5c26c95839f4b52a (patch)
treea37b21c43bb3f491bbd529a75148829fb95ebc0a /services/batteryservice
parentb898440c99bc3800b427f166d12b003e8aa534e2 (diff)
downloadframeworks_native-0a32461524f55697cdc49baa5c26c95839f4b52a.zip
frameworks_native-0a32461524f55697cdc49baa5c26c95839f4b52a.tar.gz
frameworks_native-0a32461524f55697cdc49baa5c26c95839f4b52a.tar.bz2
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
Diffstat (limited to 'services/batteryservice')
-rw-r--r--services/batteryservice/IBatteryPropertiesRegistrar.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/services/batteryservice/IBatteryPropertiesRegistrar.cpp b/services/batteryservice/IBatteryPropertiesRegistrar.cpp
index 6647122..296bfab 100644
--- a/services/batteryservice/IBatteryPropertiesRegistrar.cpp
+++ b/services/batteryservice/IBatteryPropertiesRegistrar.cpp
@@ -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);