4100 Commits

Author SHA1 Message Date
Mike Lockwood
0eb7b697b7 Merge changes Ib63ab95a,I585b0610,Ia84da0b5 into honeycomb-mr1
* changes:
  UsbManager: Hide APIs not needed for USB host or accessory support.
  Remove MtpClient class from framework and public API
  UsbDevice: Move IO related methods to new UsbDeviceConnection class
2011-03-11 10:57:06 -08:00
Mike Lockwood
c72eb9113a Remove MtpClient class from framework and public API
After reviewing this class I decided it would be best not to include it in the public API
since it adds no functionality that cannot be done using MtpDevice and other APIs directly.
So I am moving it to the CameraBrowser sample instead.

Also changed CameraBrowser to build against the SDK to ensure all the necessary APIs for
PTP support have been made public.

Bug: 4067029

Change-Id: I585b06104084953176d018ced08bba0cb4607490
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-11 10:55:44 -05:00
Mike Lockwood
acc29cc91b UsbDevice: Move IO related methods to new UsbDeviceConnection class
UsbDevice is now just an immutable parcelable object like UsbInterface and
UsbEndpoint.
All IO related functionality is now contained in UsbDeviceConnection
and UsbRequest.

Bug: 4067029

Change-Id: Ia84da0b512a697acc940eee0c3566711c62e1a68
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-11 10:24:21 -05:00
Glenn Kasten
b8763f60b4 Bug 3012968 DRM output control
Modifies Stagefright to verify that there is a hardware-protected path
to video sink for DRM content.

Change-Id: I18b8741390e803a05a88c7f180b860a24ba88a10
2011-03-10 19:16:40 -08:00
Rajneesh Chowdury
a7118e33b4 Merge "Fix for 4080402 NPE in Transition.setDuration" into honeycomb-mr1 2011-03-10 15:10:39 -08:00
Rajneesh Chowdury
e7defc2975 Fix for 4080402 NPE in Transition.setDuration
Change-Id: I1e4499e3191beafdaf9bb4b7fd51798bd1eab300
2011-03-10 10:35:42 -08:00
Mike Lockwood
564f12ebe4 Merge changes Ifd78cca3,Ieadb86fe,If5b44ebd into honeycomb-mr1
* changes:
  MTP: Convert date created and modified values from seconds to milliseconds
  Update USB accessory compatibility library to support new requestPermission API
  UsbService: Don't require permissions for UsbManager.getCurrentAccessory()
2011-03-09 15:47:10 -08:00
Mike Lockwood
b966b9d9e8 MTP: Convert date created and modified values from seconds to milliseconds
BUG: 4026365

Change-Id: Ifd78cca305299ed1cedd6595609d9bf8d520cd8e
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-09 17:28:33 -05:00
Eric Laurent
cc34967fdc Merge "Fix issue 3439872: video chat and bluetooth SCO" into honeycomb-mr1 2011-03-09 10:56:01 -08:00
Jean-Michel Trivi
5fa7aac81b Merge "Fix bug 4064086 Use a death handler on audio focus changes from mode" into honeycomb-mr1 2011-03-09 10:18:31 -08:00
Mike Lockwood
3a68b8338b USB: Add API and dialog for apps to request permissions for USB devices and accessories
New APIs:

UsbManager.hasPermission returns true if the caller has permission
for the given device or accessory

UsbManager.requestPermission poses a dialog to allow the user to give the caller
permission for the device or accessory.
Result is returned via a PendingIntent.
No dialog is displayed if the caller already has permission.

Also moved UsbResolverActivity to SystemUI package

BUG: 4069037

Change-Id: I93be769501a8776b49ac26e468af19f8fa2114c9
2011-03-08 21:22:19 -05:00
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
Jean-Michel Trivi
382f4e6ea4 Fix bug 4064086 Use a death handler on audio focus changes from mode
Use a death handler when audio focus changes are caused by audio
 mode changes.

The bug comes from the fact that audio focus clients that use the
 audio mode for automatic focus handling didn't register a death
 handler, which was set to null. When such a client died, this
 handler was compared against the one to remove from the
 audio focus stack, which resulted in an NPE.
The fix consists in registering a valid IBinder object in the
 audio focus stack, even for clients whose focus requests originate
 from a change in audio mode, as implemented in the
 handleFocusForCalls() method.

Change-Id: Id9e1d3d10afcd99969285f6d60fc4d7dde1e4a10
2011-03-08 15:12:26 -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
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
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
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
Santosh Madhava
895a28e14e Fix for issue 3453519: (Java/JNI) do not allow editing of DRM protected contents
Change-Id: I376483c42b5bed8d2a1765804c2261c18d720a0c
2011-03-04 18:37:51 -08:00
James Dong
99b862476d Fix a leak from AACEncoder.cpp
bug - 3470617

Change-Id: I328e92bc1b2aca72e5856703dae00f957f40bc27
2011-03-04 16:30:37 -08:00
James Dong
858b673a35 Do not enforce the rule in MP3Extractor that all audio frames in an mp3 file must have the same mode
For some mp3 files, the mode can be changed from one audio frame to another. Without
the capability to switch modes, the decoded audio may have lots of artifacts.

bug - 3253310

Change-Id: Id57bb1f204642d15e38a800c72214f6794cfaa37
2011-03-04 11:28:50 -08:00
Ray Chen
a2c322f599 3406494 Gallery photos in nonsensical order
Change-Id: Ic992465a6683179bff280753dcaf9aa6372424e6
2011-03-03 15:04:57 +08:00
Gloria Wang
396f6de660 Merge "- To track the usage of all audio output devices - To track the currently used audio device - The devices are separated as speaker and other audio devices - Provide the collected data to battery application through pullBatteryData()" 2011-03-02 19:51:04 -08:00
Mike Lockwood
37b05d7d61 Merge "MtpClient: remove finalize override to avoid multiple calls to unregisterReceiver" 2011-03-02 17:14:57 -08:00
Mike Lockwood
1bdeef34ef MtpClient: remove finalize override to avoid multiple calls to unregisterReceiver
BUG: 3497801

Change-Id: I4ed0166efcc509a18361287c5816bc4844089025
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-02 16:59:53 -08:00
Gloria Wang
9b3f1521b5 - To track the usage of all audio output devices
- To track the currently used audio device
- The devices are separated as speaker and other audio devices
- Provide the collected data to battery application through pullBatteryData()

Change-Id: I374c755266b5ac6b1c6c630400f4daf901ea8acc
2011-03-02 16:53:24 -08:00
Jamie Gennis
28a8cb75e8 Merge "Stagefright: Use the ANW min undequeued bufs query." 2011-03-02 16:44:51 -08:00
Andreas Huber
ce80b0ca33 Merge "Resize internal PES buffers dynamically instead of relying on a fixed maximum size." 2011-03-02 16:22:20 -08:00
Andreas Huber
56e84ba150 Resize internal PES buffers dynamically instead of relying on a fixed maximum size.
Change-Id: Ibe720e6148799e32d039ccdb4b269659bc779952
2011-03-02 16:18:33 -08:00
Andreas Huber
00fa3a729c Merge "Allow optional specification of a PTS timestamp when signalling a discontinuity." 2011-03-02 16:11:01 -08:00
Andreas Huber
669ad13de9 Allow optional specification of a PTS timestamp when signalling a discontinuity.
If present, rendering will be suppressed until reaching the timestamp.

Change-Id: Ic64bdf4225063c5a4d042ea9809960b843a46d19
related-to-bug: 3489454
2011-03-02 15:38:32 -08:00
James Dong
d08f27ee5b Merge "PV's mp3 decoder mistreated inputBufferCurrentLength in unit of bytes as in unit of bits" 2011-03-02 14:00:56 -08:00
James Dong
c096a1308e PV's mp3 decoder mistreated inputBufferCurrentLength in unit of bytes as in unit of bits
bug - 3464899

Change-Id: Idef81a1bd3846d60fc5e4a40c11ce1ba78ebaa23
2011-03-02 12:26:14 -08:00
Andreas Huber
76bb1200c2 Merge "Provide better duration and seek accuracy if playing vorbis audio from a non-streaming source." 2011-03-02 11:54:48 -08:00
Basavapatna Dattaguru
4a3a05879e Merge "Fix for issue 3371667: fix source code compilation warnings (4)" 2011-03-02 11:50:17 -08:00
Andreas Huber
c655790d61 Provide better duration and seek accuracy if playing vorbis audio from a non-streaming source.
Change-Id: Ib823c2dd28e84f4c49e3676f4e4962a6e006b166
related-to-bug: 3107013
2011-03-02 11:14:44 -08:00
Basavapatna Dattaguru
4fad6762c6 Fix for issue 3371667: fix source code compilation warnings (4)
Change-Id: I898f81fea6c061b9ca7cbd675218d9f4b8c0bc77
2011-03-02 10:37:58 -08:00
Santosh Madhava
06b3afe2bd Merge "Fix for issue 3495914: (In Java) Video clip switches between start and end" 2011-03-02 09:48:39 -08:00
Santosh Madhava
7256a7c525 Fix for issue 3495914: (In Java) Video clip switches between start and end
Change-Id: Ie5ea83c61c6c008162abea76e15d745a901a1e23
2011-03-01 21:36:31 -08:00
James Dong
de1d7b4be6 Merge "Get rid of redundant media profiles" 2011-03-01 17:11:26 -08:00
James Dong
797e4f1dce Get rid of redundant media profiles
bug - 3330679

Change-Id: Idc55aea32746c0c57552c5e15a289681421aa859
2011-03-01 15:58:59 -08:00
Eric Laurent
9b44c662d5 Fix issue 3499926.
Make sure that NumberEffectsEnabled is decremented at the same time as
SamplesToExitCountBb reaches 0 in Effect_process(). Not doing so
causes NumberEffectsEnabled not being decremented if Effect_setEnabled()
is called after SamplesToExitCountBb reaches 0 and before next Effect_process() is called.

Change-Id: Id827a301f93a5a09ecd9995a0c7d731ef526711a
2011-03-01 12:35:18 -08:00
Santosh Madhava
2380aa08c2 Merge "Fix for issue 3431967: Memory leak from video editor engine" 2011-03-01 12:04:12 -08:00
Mike Lockwood
04e1a9620f Merge "Move USB framework support from android.hardware to android.hardware.usb package" 2011-03-01 11:58:22 -08:00
Santosh Madhava
71771b3b1b Fix for issue 3431967: Memory leak from video editor engine
Change-Id: Ibaa66d7c95f2a60b59dc3102d3b5130ff1fbc62e
2011-03-01 11:44:50 -08:00
Jamie Gennis
7fc013753b Merge "Stagefright: Query buffer usage from the component." 2011-03-01 11:41:29 -08:00
Jamie Gennis
29f87f76bc Merge "Add an OMX IL API for querying buffer usage flags." 2011-03-01 10:25:38 -08:00
Jamie Gennis
dbb520e0a0 Merge "Fix error recovery in Stagefright init." 2011-03-01 10:24:55 -08:00
Mike Lockwood
c4308f01c9 Move USB framework support from android.hardware to android.hardware.usb package
Change-Id: I00fd4f0caaa4aebe48f71c576bb211b5f38bf88d
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-01 08:07:20 -08:00