Skip to content

Commit 538529b

Browse files
committed
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
1 parent 2521a01 commit 538529b

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

services/audioflinger/AudioFlinger.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,12 +1023,7 @@ void AudioFlinger::removeNotificationClient(pid_t pid)
10231023
{
10241024
Mutex::Autolock _l(mLock);
10251025

1026-
ssize_t index = mNotificationClients.indexOfKey(pid);
1027-
if (index >= 0) {
1028-
sp <NotificationClient> client = mNotificationClients.valueFor(pid);
1029-
ALOGV("removeNotificationClient() %p, pid %d", client.get(), pid);
1030-
mNotificationClients.removeItem(pid);
1031-
}
1026+
mNotificationClients.removeItem(pid);
10321027

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

0 commit comments

Comments
 (0)