Merge commit 'c711e06c1869b1e5be5b7a9826470564268328ac' into eclair-mr2-plus-aosp
* commit 'c711e06c1869b1e5be5b7a9826470564268328ac':
Import revised translations. DO NOT MERGE
Merge commit '5e392e2b028fb0f92b2efe6de24b60a57cd4c565' into eclair-mr2-plus-aosp
* commit '5e392e2b028fb0f92b2efe6de24b60a57cd4c565':
Fix issue 2192673: Music Pausing Even when notifications are set to silent.
Merge commit 'a80a75f34a98fe1e41afab93c97aca505939903a' into eclair-mr2
* commit 'a80a75f34a98fe1e41afab93c97aca505939903a':
Register Handsfree profile before headset profile. DO NOT MERGE.
Merge commit 'abf7fed21bfa7eb899be558477d928a7c9f3e1f6' into eclair-mr2
* commit 'abf7fed21bfa7eb899be558477d928a7c9f3e1f6':
Fix more of bug 2290852: Don't wake screen when bluetooth headset is connected or disconnected.
Merge commit 'ae34cf92db9c54ba72fdcac33a8ba855a2215e4e'
* commit 'ae34cf92db9c54ba72fdcac33a8ba855a2215e4e':
A small sample tool to encode pcm audio data to amr, decode it again and play it. Some changes to OMXCodec to properly configure the AMR decoder(s).
Merge commit '079324bf5b0713a698c42c9fb4377ef8851c404b'
* commit '079324bf5b0713a698c42c9fb4377ef8851c404b':
fix issue with plugin surfaces not updating properly within the view system.
There was bug in the logic that calculated the relative timeout, the start time was
reset each time an event was received, which caused the timeout to never occur if
an application was constantly redrawing.
Now we always check for a timeout when we come back from the waitEvent() and
process the "anti-freeze" if needed, regardless of whether an event was received.
Merge commit 'cf98f4268cc70228ef49350f1ccef1266f2e3cf8' into eclair-mr2-plus-aosp
* commit 'cf98f4268cc70228ef49350f1ccef1266f2e3cf8':
Fix a leak in WebView.
Merge commit '781ac16283574ec07cd7b13d67b54b7b4c2c15cb' into eclair-mr2-plus-aosp
* commit '781ac16283574ec07cd7b13d67b54b7b4c2c15cb':
A small sample tool to encode pcm audio data to amr, decode it again and play it. Some changes to OMXCodec to properly configure the AMR decoder(s).
Merge commit '926492d9cc51f28f0471352cde77d2d91ae9becd' into eclair-mr2
* commit '926492d9cc51f28f0471352cde77d2d91ae9becd':
Import revised translations. DO NOT MERGE
Merge commit '732a1223b21cef3561ffbbb9f6ec2d2d2a8b5e5c' into eclair-mr2-plus-aosp
* commit '732a1223b21cef3561ffbbb9f6ec2d2d2a8b5e5c':
fix issue with plugin surfaces not updating properly within the view system.
Merge commit 'bb3bb57a6330f71323fcd7e93e88dbdab55daec3' into eclair-mr2
* commit 'bb3bb57a6330f71323fcd7e93e88dbdab55daec3':
Fix issue 2192673: Music Pausing Even when notifications are set to silent.
* changes:
A small sample tool to encode pcm audio data to amr, decode it again and play it. Some changes to OMXCodec to properly configure the AMR decoder(s).
Merge commit 'e459aa64515f91b494843d2eb2852be2da3d1628'
* commit 'e459aa64515f91b494843d2eb2852be2da3d1628':
Do not peform a click/move if longpress has been performed in WebTextView.
Merge commit '94c9db5485bb36734f10592241cbab060f8f7fb3'
* commit '94c9db5485bb36734f10592241cbab060f8f7fb3':
Refactoring the logging interface to remove dependence on NPP.
Merge commit 'bf72820e7775748c7239287b49b81031167b3428'
* commit 'bf72820e7775748c7239287b49b81031167b3428':
add --esn option to am to allow adding extra with a null value
Merge commit 'ed90811e711065bcc82a45f4173587cd95ef6b6f' into eclair-mr2-plus-aosp
* commit 'ed90811e711065bcc82a45f4173587cd95ef6b6f':
Do not peform a click/move if longpress has been performed in WebTextView.
Merge commit '51e45ff0d53ce299be316e14e48cdd3e3a51d0b0' into eclair-mr2-plus-aosp
* commit '51e45ff0d53ce299be316e14e48cdd3e3a51d0b0':
Cleanup how a plugin goes full-screen.
Merge commit 'c3e20af0b6aed8afe28be5fa08b8d69c6b50f34c' into eclair-mr2-plus-aosp
* commit 'c3e20af0b6aed8afe28be5fa08b8d69c6b50f34c':
Refactoring the logging interface to remove dependence on NPP.
The problem comes from a deadlock with AudioPolicyService mutex: When the second ringtone starts,
this mutex is locked by AudioPolicyService::startOutput() which in turn calls setParameters() to change the output device.
Audioflinger::ThreadBase::setParameters() signals the parameter change to the AudioFlinger mixer thread and waits for a condition
indicating that the parameter change has been processed.
At the same time, the mixer thread detects that the audio track corresponding to the first ring tone has been killed and calls its destructor.
This calls AudioPolicyService::releaseOutput() which tries to lock the AudioPolicyService mutex.
If this happens before the mixer thread can process the setParameters() command we are deadlocked.
The deadlock ends because setParameters() uses a timeout when waiting for the condition.
This regression was introduced by change 33736 fixing issue 2265163.
The fix consists in calling AudioPolicyService::releaseOutput() from Track::destroy() instead of from Track destructor: as detroy() is never called from the mixer thread loop (as opposed to the destructor) the deadlock described above cannot occur.