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
This commit is contained in:
Glenn Kasten
2012-01-20 09:19:01 -08:00
parent 2521a01970
commit 538529b9dc

View File

@@ -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);
}
mNotificationClients.removeItem(pid);
ALOGV("%d died, releasing its sessions", pid);
size_t num = mAudioSessionRefs.size();