diff options
author | Glenn Kasten <gkasten@google.com> | 2012-01-20 09:19:01 -0800 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2012-02-24 17:00:30 -0800 |
commit | 538529b9dcdb44c6aec631916f83611355b7ee8a (patch) | |
tree | d62bf4fe676f5e52c594eeb3134d031ae0905a64 /services | |
parent | 2521a0197065e5ff0335199becc5a84de295fd09 (diff) | |
download | frameworks_base-538529b9dcdb44c6aec631916f83611355b7ee8a.zip frameworks_base-538529b9dcdb44c6aec631916f83611355b7ee8a.tar.gz frameworks_base-538529b9dcdb44c6aec631916f83611355b7ee8a.tar.bz2 |
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
Diffstat (limited to 'services')
-rw-r--r-- | services/audioflinger/AudioFlinger.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
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 @@ 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(); |