diff options
| author | Marco Nelissen <marcone@google.com> | 2014-11-17 18:24:57 +0000 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2014-11-17 18:24:57 +0000 |
| commit | 52b88980564b6f0f1f8b9ceb1eebb80204bab29e (patch) | |
| tree | 5b95efe7e1bf48fd9cfcb4de57ed40308a068e25 /healthd | |
| parent | 1ef4cf5f6d76339e30139c05c61296e0b2cc2dad (diff) | |
| parent | e11d81b37c119ec3d67c1fe60779d510d21e6a14 (diff) | |
| download | system_core-52b88980564b6f0f1f8b9ceb1eebb80204bab29e.zip system_core-52b88980564b6f0f1f8b9ceb1eebb80204bab29e.tar.gz system_core-52b88980564b6f0f1f8b9ceb1eebb80204bab29e.tar.bz2 | |
am e11d81b3: Merge "Update calls to IInterface::asBinder()"
* commit 'e11d81b37c119ec3d67c1fe60779d510d21e6a14':
Update calls to IInterface::asBinder()
Diffstat (limited to 'healthd')
| -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 74bcbfd..09667a1 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; } |
