Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 99f00d5f authored by Marco Nelissen's avatar Marco Nelissen
Browse files

Update calls to IInterface::asBinder()

to use the new static version.

Change-Id: Ia7b10eb38ca55b72278bfd33d3bf647f338b4e6a
parent e90159b0
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -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;
        }