summaryrefslogtreecommitdiffstats
path: root/services/batteryservice
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2014-11-14 08:01:01 -0800
committerMarco Nelissen <marcone@google.com>2014-11-14 14:01:29 -0800
commit2ea926bda2fa30f3ba8d0ed2d2395a8ada952e6e (patch)
treeaf1a760841833f80084aac64b548471259b647a4 /services/batteryservice
parentaedb1c843e9a1d3149ca81d586fa168d146d8f5e (diff)
downloadframeworks_native-2ea926bda2fa30f3ba8d0ed2d2395a8ada952e6e.zip
frameworks_native-2ea926bda2fa30f3ba8d0ed2d2395a8ada952e6e.tar.gz
frameworks_native-2ea926bda2fa30f3ba8d0ed2d2395a8ada952e6e.tar.bz2
Replace IInterface::asBinder() with a static
so we can do NULL checks again, and update calls to IInterface::asBinder() to use the new static version. Change-Id: Ia7b10eb38ca55b72278bfd33d3bf647f338b4e6a
Diffstat (limited to 'services/batteryservice')
-rw-r--r--services/batteryservice/IBatteryPropertiesRegistrar.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/batteryservice/IBatteryPropertiesRegistrar.cpp b/services/batteryservice/IBatteryPropertiesRegistrar.cpp
index 296bfab..46934e0 100644
--- a/services/batteryservice/IBatteryPropertiesRegistrar.cpp
+++ b/services/batteryservice/IBatteryPropertiesRegistrar.cpp
@@ -34,14 +34,14 @@ public:
void registerListener(const sp<IBatteryPropertiesListener>& listener) {
Parcel data;
data.writeInterfaceToken(IBatteryPropertiesRegistrar::getInterfaceDescriptor());
- data.writeStrongBinder(listener->asBinder());
+ data.writeStrongBinder(IInterface::asBinder(listener));
remote()->transact(REGISTER_LISTENER, data, NULL);
}
void unregisterListener(const sp<IBatteryPropertiesListener>& listener) {
Parcel data;
data.writeInterfaceToken(IBatteryPropertiesRegistrar::getInterfaceDescriptor());
- data.writeStrongBinder(listener->asBinder());
+ data.writeStrongBinder(IInterface::asBinder(listener));
remote()->transact(UNREGISTER_LISTENER, data, NULL);
}