diff options
author | Marco Nelissen <marcone@google.com> | 2014-11-14 08:03:02 -0800 |
---|---|---|
committer | Marco Nelissen <marcone@google.com> | 2014-11-17 10:06:42 -0800 |
commit | 99f00d5ff3c20b849565bb47f1b23bc6eec77958 (patch) | |
tree | afc60a618e353f9aa1aefc15717f42323e26bcb4 /healthd/BatteryPropertiesRegistrar.cpp | |
parent | e90159b070a773fa33fdbb2aaf2f84ac0189f699 (diff) | |
download | core-99f00d5ff3c20b849565bb47f1b23bc6eec77958.tar.gz core-99f00d5ff3c20b849565bb47f1b23bc6eec77958.tar.bz2 core-99f00d5ff3c20b849565bb47f1b23bc6eec77958.zip |
Update calls to IInterface::asBinder()
to use the new static version.
Change-Id: Ia7b10eb38ca55b72278bfd33d3bf647f338b4e6a
Diffstat (limited to 'healthd/BatteryPropertiesRegistrar.cpp')
-rw-r--r-- | healthd/BatteryPropertiesRegistrar.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/healthd/BatteryPropertiesRegistrar.cpp b/healthd/BatteryPropertiesRegistrar.cpp index 74bcbfde0..09667a1ad 100644 --- a/healthd/BatteryPropertiesRegistrar.cpp +++ b/healthd/BatteryPropertiesRegistrar.cpp @@ -48,13 +48,13 @@ void BatteryPropertiesRegistrar::registerListener(const sp<IBatteryPropertiesLis Mutex::Autolock _l(mRegistrationLock); // check whether this is a duplicate for (size_t i = 0; i < mListeners.size(); i++) { - if (mListeners[i]->asBinder() == listener->asBinder()) { + if (IInterface::asBinder(mListeners[i]) == IInterface::asBinder(listener)) { return; } } mListeners.add(listener); - listener->asBinder()->linkToDeath(this); + IInterface::asBinder(listener)->linkToDeath(this); } healthd_battery_update(); } @@ -64,8 +64,8 @@ void BatteryPropertiesRegistrar::unregisterListener(const sp<IBatteryPropertiesL return; Mutex::Autolock _l(mRegistrationLock); for (size_t i = 0; i < mListeners.size(); i++) { - if (mListeners[i]->asBinder() == listener->asBinder()) { - mListeners[i]->asBinder()->unlinkToDeath(this); + if (IInterface::asBinder(mListeners[i]) == IInterface::asBinder(listener)) { + IInterface::asBinder(mListeners[i])->unlinkToDeath(this); mListeners.removeAt(i); break; } @@ -93,7 +93,7 @@ void BatteryPropertiesRegistrar::binderDied(const wp<IBinder>& who) { Mutex::Autolock _l(mRegistrationLock); for (size_t i = 0; i < mListeners.size(); i++) { - if (mListeners[i]->asBinder() == who) { + if (IInterface::asBinder(mListeners[i]) == who) { mListeners.removeAt(i); break; } |