This change fixes a corner case where a callback may not get handled until
a second callback arrives. This can happen because there is a significant
section of the wait_for_event function where the mutex is not locked, and
the sPendingCallbacks member could be updated. We now check to see if
there is a pending callback to handle before we wait for another callback.
Change-Id: I20cfae1e780944bb74133940dda032efc4c55540
Signed-off-by: Fred Fettinger <fred.fettinger@motorola.com>
Signed-off-by: Jared Suttles <jared.suttles@motorola.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
Merge commit '13bf8260134d516cbcc982d360d9f21067f47fa6' into eclair-mr2
* commit '13bf8260134d516cbcc982d360d9f21067f47fa6':
Fix SDK build: a few things missing, a link that was wrong.
Merge commit '274b120f3975c8db6daeeab51a5fe08d6dede479' into eclair-mr2
* commit '274b120f3975c8db6daeeab51a5fe08d6dede479':
Fix issue #2243096: Need to expose live wallpaper APIs in SDK
Merge commit 'f20e9a88a36ced533e96b8873a3321b4d51585ca' into eclair-mr2
* commit 'f20e9a88a36ced533e96b8873a3321b4d51585ca':
Prevent crash in Home when using widgets whose ids collide with Home's
Merge commit '8de4e0ad8ff39d9a397cd80de5155d4c09ef98fd' into eclair-mr2
* commit '8de4e0ad8ff39d9a397cd80de5155d4c09ef98fd':
Add BMW kits made by Motorola PCS to autoblack list for Bluetooth.
Merge commit 'eca41b31fb9a5202f755bfd9dbc4849dbb486137' into eclair-mr2
* commit 'eca41b31fb9a5202f755bfd9dbc4849dbb486137':
New live wallpaper API to expose author and description strings.
Merge commit '67b692920c18f99b096dce285adc6f7439fa866c' into eclair-mr2
* commit '67b692920c18f99b096dce285adc6f7439fa866c':
Fix issue 2203561: Sholes: audio playing out of earpiece.
Create a new IAudioTrack interface to AudioFlinger when start() fails due to a broken pipe error.
Do the same if start fails due to the same error after time out in obtainBuffer().
Do not indicate that the AudioTrack is started to AudioPolicyManager if IAudioTrack start fails.
This avoids that an AudioTrack keeps a dead IAudioTrack after a media server crash.
Same modifications for AudioRecord.
Add a flag to ToneGenerator indicating that the callback thread can call Java. Without it, when the media server crashes and restarts, the AudioSystem error callback will crash in JNI if the IAudiotrack is created from AudioTrack callback thread.
Merge commit '131564d26ac5b7f963c60802089b9fe1472659f7' into eclair-mr2
* commit '131564d26ac5b7f963c60802089b9fe1472659f7':
Remove unused field and add new API to control the children drawing order.
Merge commit '9053fdb32b38d1240d856bd6efedf72eefba48d3' into eclair-mr2
* commit '9053fdb32b38d1240d856bd6efedf72eefba48d3':
Add support for colored LED on jogball backlight.
Merge commit 'e1e0dc8e6eaec052ebb6b88f5b1223075ce5a356' into eclair-mr2
* commit 'e1e0dc8e6eaec052ebb6b88f5b1223075ce5a356':
Make sure we relayout the TextView when the text changes and marquee is enabled.
We had been using "parameter"/"param" by mistake, while both vCard
formats uses theterm "attribute"/"attr". This is confusing.
Internal issue number: 2233884