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

Commit 538529b9 authored by Glenn Kasten's avatar Glenn Kasten
Browse files

Simplify removeNotificationClient

No need to check for presence of item before removing
(but we do lose the log of the previous value).

Change-Id: I2838430824de5f257f2ee15db0c22b1920c67d08
parent 2521a019
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -1023,12 +1023,7 @@ void AudioFlinger::removeNotificationClient(pid_t pid)
{
    Mutex::Autolock _l(mLock);

    ssize_t index = mNotificationClients.indexOfKey(pid);
    if (index >= 0) {
        sp <NotificationClient> client = mNotificationClients.valueFor(pid);
        ALOGV("removeNotificationClient() %p, pid %d", client.get(), pid);
    mNotificationClients.removeItem(pid);
    }

    ALOGV("%d died, releasing its sessions", pid);
    size_t num = mAudioSessionRefs.size();