Merge "Fix monkey bug 2586534 java.util.ConcurrentModificationException Unlike the other audio focus and media button stack handling methods, abandonAudioFocus() and unregisterAudioFocusClient() were not synchronized around their focus stack. This CL corrects this." into froyo

This commit is contained in:
Jean-Michel Trivi
2010-04-12 12:05:08 -07:00
committed by Android (Google) Code Review

View File

@@ -2090,14 +2090,18 @@ public class AudioService extends IAudioService.Stub {
Log.i(TAG, " AudioFocus abandonAudioFocus() from " + clientId);
// this will take care of notifying the new focus owner if needed
removeFocusStackEntry(clientId, true);
synchronized(mFocusStack) {
removeFocusStackEntry(clientId, true);
}
return AudioManager.AUDIOFOCUS_REQUEST_GRANTED;
}
public void unregisterAudioFocusClient(String clientId) {
removeFocusStackEntry(clientId, false);
synchronized(mFocusStack) {
removeFocusStackEntry(clientId, false);
}
}