46419 Commits

Author SHA1 Message Date
Eric Laurent
421ddc014b Fix issue 3439872: video chat and bluetooth SCO
This change fixes the stability problems experienced when using
a bluetooth headset supporting both A2DP and SCO. Problems occur
when starting the video chat at which time the A2DP output is being
stopped to start SCO. At that time, active AudioTracks are invalidated
by AudioFlinger so that a new AudioTrack binder interface can be
recreated by the client process on the new mixer thread with correct parameters.
The problem was that the process to restore the binder interface was not
protected against concurrent requests which caused 2 binder interfaces
to be created sometimes. This could lead to permanent client deadlock
if one of the client threads was waiting for a condition of the first
created binder interface while the second one was created (as the AudioFlinger
would only signal conditions on the last one created).
This concurrent request situation is more likely to happen when a client
uses the JAVA AudioTrack as the JNI implementation uses simultaneously the
native AudioTrack callback and write push mechanisms. By doing so, the code
that checks if the binder interface should be restored (in obtainBuffer()) is
much more likely to be called concurrently from two different threads.

The fix consists in protecting the critical binder interface restore phase
with a flag in the AudioTrack control block. The first thread acting upon the binder
interface restore request will raise the flag and the second thread will just wait for
a condition to be signaled when the restore process is complete.

Also protected all accesses to the AudioTrack control block by a mutex to prevent
access while the track is being destroyed and restored. If a mutex cannot be held
(e.g because we call a callback function), acquire a strong reference on the IAudioTrack
to prevent its destruction while the cblk is being accessed.

Modified AudioTrack JNI to use GetByteArrayElements() instead of
GetPrimitiveArrayCritical() when writing audio buffers. Entering a critical section would
cause the JNI to abort if a mediaserver crash occurs during a write due to the AudioSystem
callback being called during the critical section when media server process restarts.
Anyway with current JNI implementation, either versions do not copy data most of the times
and the criticial version does not guaranty no data copy.

The same modifications have been made to AudioRecord.

Change-Id: Idc5aa711a04c3eee180cdd03f44fe17f3c4dcb52
2011-03-08 16:33:15 -08:00
Gilles Debunne
949d0c8c38 Merge "Text handles positions' are correctly updated." into honeycomb-mr1 2011-03-08 10:21:54 -08:00
Leon Scroggins
055a858562 Merge "Do not attempt to start action mode if there is no parent." into honeycomb-mr1 2011-03-08 09:06:54 -08:00
Leon Scroggins
93553d7fb3 Do not attempt to start action mode if there is no parent.
Bug:3514747
Change-Id: Id4c5c803bfb8bb2f5f81fa15599784e808e0d223
2011-03-08 11:43:40 -05:00
Jesse Wilson
102930a0de Merge "Remove deprecated and unused entryEvicted method." into honeycomb-mr1 2011-03-07 23:23:36 -08:00
Romain Guy
bc8a8e8c92 Merge "Add support for partial invalidates in WebView Bug #3461349" into honeycomb-mr1 2011-03-07 22:40:27 -08:00
Mike Lockwood
823f5bf3db Merge "MTP: Use SharedPreferences for MTP device properties rather than sqlite3" into honeycomb-mr1 2011-03-07 20:04:23 -08:00
Santosh Madhava
0e8dc72db3 Merge "Fix for issue 3453519: (Java/JNI) do not allow editing of DRM protected contents" into honeycomb-mr1 2011-03-07 19:42:16 -08:00
Wink Saville
ff23352ea7 am b3c991b0: Provide default value for operator numeric for CDMA.
* commit 'b3c991b0190faa4fc833a5fc9074939fd5d8a3c4':
  Provide default value for operator numeric for CDMA.
2011-03-07 18:51:57 -08:00
Dianne Hackborn
37e792d53d Merge "Fix issue #3515088: Don't be so aggressive trying to reclaim memory" into honeycomb-mr1 2011-03-07 18:20:23 -08:00
Chet Haase
4bd6ccd251 Merge "Restore save/restore calls removed recently" into honeycomb-mr1 2011-03-07 18:12:34 -08:00
Romain Guy
25b81110b1 Merge "Fix EGL JNI bugs Bug #3461349" into honeycomb-mr1 2011-03-07 18:11:21 -08:00
Romain Guy
cabfcc1364 Add support for partial invalidates in WebView
Bug #3461349

This change also fixes two bugs that prevented partial invalidates
from working with other views. Both bugs were in our EGL implementation:
they were preventing the caller from comparing the current context/surface
with another context/surface. This was causing HardwareRenderer to always
redraw the entire screen.

Change-Id: I33e096b304d4a0b7e6c8f92930f71d2ece9bebf5
2011-03-07 18:09:03 -08:00
Adam Powell
ad542efb8a Merge "Fix bug 3506292 - Add guards against bad event streams to ScaleGestureDetector" into honeycomb-mr1 2011-03-07 18:08:11 -08:00
Romain Guy
9b7146db6d Fix EGL JNI bugs
Bug #3461349

Before this change, eglGetCurrent*() could not be used to compare
contexts, displays and surfaces at the Dalvik level.

Change-Id: I442037dae37bc357b64810ab10c779b5754e9153
2011-03-07 18:05:04 -08:00
Wink Saville
b3c991b019 Provide default value for operator numeric for CDMA.
If the RIL_REQUEST_OPERATOR response[2], the numeric for the operator,
is bad use the system property ro.cdma.home.operator.numeric.

bug: 3383515
Change-Id: I090e5ba0cb7e3a7f1dc08d24996e78e489b9cd41
2011-03-07 17:52:36 -08:00
Chet Haase
88172fe49c Restore save/restore calls removed recently
Calls thought to be duplicates were removed, which caused rendering problems
for Browser as well as crashes in the widget list and music.

Change-Id: I6364aaa362619ea3dd368990304d61d84bbe2a90
2011-03-07 17:36:33 -08:00
Adam Powell
0818020d7c Fix bug 3506292 - Add guards against bad event streams to ScaleGestureDetector
Change-Id: Id38ebb368168b7157369964e39948036405427b1
2011-03-07 16:48:29 -08:00
Adam Powell
a46c1df226 Merge "Fix bug 4021346 - crash while navigating" into honeycomb-mr1 2011-03-07 16:25:20 -08:00
Gilles Debunne
cfc22c5332 Text handles positions' are correctly updated.
Bug 3510106

The CAB animation does not fire events, which does not update the
handles' positions.

The solution is to make the handle update their position before any
draw traversal, using an onPreDrawListener. The ScrollingPopupWindow
onScroll listener is no longer needed with this change. This is also
a more robust solution since other events (such as animations) may
change the TextView's position.

The cost is a recomputation of the Handles' positions at each redraw
which was not necessary with listeners. But as mentioned before, not
all possible events provide listeners or will in the future.

Change-Id: I0f46118de5f660a75d95eecb2cf987fcb4b3b322
2011-03-07 15:50:47 -08:00
Chia-chi Yeh
ab7c3245ed Merge "NEW_API: Unhide RTP APIs." into honeycomb-mr1 2011-03-07 15:39:54 -08:00
Adam Powell
3ba8f5d675 Fix bug 4021346 - crash while navigating
Change-Id: Iff60c5f4214c56597f2a1b393982d023866e490e
2011-03-07 15:36:33 -08:00
Adam Powell
43a811979d Merge "Fix bug 3501766 - Make the action bar "up" visual more prominent" into honeycomb-mr1 2011-03-07 15:06:02 -08:00
Adam Powell
8fca37ce30 Fix bug 3501766 - Make the action bar "up" visual more prominent
Change-Id: Id4b104dd6ca1df662479ab54f045e119585f990f
2011-03-07 14:54:48 -08:00
James Dong
4ed072f904 Merge "Add missing copyright headers to a couple of files" into honeycomb-mr1 2011-03-07 14:41:50 -08:00
James Dong
e2693e5d62 Add missing copyright headers to a couple of files
bug - 4025673

Change-Id: Ie1c4cf18c06032f9b89cc08e5be25d38c0f76aa1
2011-03-07 14:34:05 -08:00
Chia-chi Yeh
6defd2d47e NEW_API: Unhide RTP APIs.
This change unhides RTP related classes including AudioCodec,
AudioGroup, AudioStream, and RtpStream. This allows developers
to control audio streams directly and also makes conference
calls possible with the combination of the public SIP APIs.

Change-Id: Idfd4edf65a1cbf3245ec2786fbc03b06438b0fb3
2011-03-08 05:59:09 +08:00
Leon Scroggins
6478e4f0b0 Merge "New button assets for webview. DO NOT MERGE" into honeycomb-mr1 2011-03-07 13:47:30 -08:00
Gloria Wang
d686c31bf3 Merge "To support uri started with http:// in some Java APIs Fix for bug 4016388." into honeycomb-mr1 2011-03-07 13:28:27 -08:00
Mike Lockwood
11cb5cb9e3 Merge "MtpClient: Fix problem with getDeviceList() returning empty result in some cases" into honeycomb-mr1 2011-03-07 13:23:40 -08:00
Leon Scroggins
69ee2688e8 New button assets for webview. DO NOT MERGE
Bug:3009375

Change-Id: I27fc6a62845075f4a5f5708ef0a12dd928b12403
2011-03-07 16:22:11 -05:00
Eric Fischer
c5f7f582a6 Merge "Import revised translations. DO NOT MERGE" into honeycomb-mr1 2011-03-07 13:03:44 -08:00
Eric Fischer
e5d97c7fde Import revised translations. DO NOT MERGE
Change-Id: Id71f94e856fb7e4cbc9b24ff6afa9085b0e03244
2011-03-07 12:53:42 -08:00
Vasu Nori
0f73fe1c84 Merge "bug:3513950 Rename "completedDownload" to "addCompletedDownload"" into honeycomb-mr1 2011-03-07 12:46:59 -08:00
Dianne Hackborn
db773c5572 Fix issue #3515088: Don't be so aggressive trying to reclaim memory
Change-Id: I8184306fa8c27a41b8bcfcad8d96985be8f0c9aa
2011-03-07 11:57:33 -08:00
Patrick Dubroy
19960989e2 Merge "Remove guard preventing onDetachedFromWindow() from being called" into honeycomb-mr1 2011-03-07 11:51:50 -08:00
Vasu Nori
3728130310 bug:3513950 Rename "completedDownload" to "addCompletedDownload"
Change-Id: I28b33a0268309d74fd2512b5bdb599f38ff3a96d
2011-03-07 11:51:14 -08:00
Jeff Brown
f0210c3621 Merge "Joystick tweaks. (DO NOT MERGE)" into honeycomb-mr1 2011-03-07 11:47:58 -08:00
Romain Guy
0aaa11ed5b Merge "Remove many unnecessary save/restore calls." into honeycomb-mr1 2011-03-07 11:24:02 -08:00
Mike Lockwood
2b8a1ee057 MtpClient: Fix problem with getDeviceList() returning empty result in some cases
BUG: 3503128

Change-Id: I2263437d6018848e316ae4096eb07305fc4dc486
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-07 14:19:06 -05:00
Patrick Dubroy
8620d9533a Remove guard preventing onDetachedFromWindow() from being called
This was the cause of 3510699: Launcher has leaked IntentReceiver.

Change-Id: I7d0e4662314d657f6ac06a9a9d37861f8d8ee975
2011-03-07 11:07:26 -08:00
Daniel Sandler
ec1f1f4cfc Merge changes I674abfcc,Ia40f4c53 into honeycomb-mr1
* changes:
  When the user touches a peeked notification, reset the fadeout timer.
  Fix touches on glowing region around panel.
2011-03-07 10:47:13 -08:00
Gloria Wang
b8b6a9a8d4 To support uri started with http:// in some Java APIs
Fix for bug 4016388.

Change-Id: I9f6f449dca49eb03446bf6aa22b5dd467ca189c9
2011-03-07 10:41:41 -08:00
Winson Chung
d452dbc2b6 Merge "Fixing issue where AppWidget service was being hit regardless of caching in RemoteViewsAdapter. (3467340)" into honeycomb-mr1 2011-03-07 10:21:11 -08:00
Adam Powell
9ab91b843a Merge "Fix bug 3509417 - Serialize touch event handling in webview" into honeycomb-mr1 2011-03-07 10:20:23 -08:00
Jesse Wilson
dfed7c006a Remove deprecated and unused entryEvicted method.
Change-Id: I30ccf3d798a3ebfc88a1b340efaaacf524d56fae
http://b/3461302
2011-03-07 09:07:07 -08:00
Justin Ho
ef56004420 Merge "SearchView textfield backgrounds for bracketing the submit/voice button and improve padding." into honeycomb-mr1 2011-03-07 07:30:09 -08:00
Kristian Monsen
9f5f7af6cc Deprecating webkit API's that might not be supported in the future do not merge
Change-Id: I7ed9498a24aceee529397bbe1ed96a15f834b4eb
2011-03-07 13:01:28 +00:00
Mike Lockwood
775de951a8 MTP: Use SharedPreferences for MTP device properties rather than sqlite3
sqlite3 is overkill for what we are doing here, and more fragile.

BUG: 3512856

Change-Id: I83d86127949d894a3887db3456d91b013060e852
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-05 17:34:11 -05:00
Xia Wang
7d83f6020c am 928ec5e0: Merge "Modify connectivity manager test suite so that it can be run on Wi-Fi only device." into honeycomb
* commit '928ec5e021162fe371da8bdac7f5bb2c854b1aa1':
  Modify connectivity manager test suite so that it can be run on Wi-Fi only device.
2011-03-05 09:25:30 -08:00