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
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index d522091..3f49941 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -1023,12 +1023,7 @@
{
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();