4118 Commits

Author SHA1 Message Date
shailendra
d0c2813289 Fix for testPropertiesWMVFile case failed with build HMI75B(4128259)
Change-Id: I0a7081f901684ff7c7388b830afc6ae2f2ce7bcd
2011-03-18 10:45:29 -07:00
shailendra
0d922ec92d Merge "Fix for testThumbnailForInvalidFilePath and testPropertiesForNonExsitingFile failed with HMI75B(4124235)" into honeycomb-mr1 2011-03-18 09:35:37 -07:00
shailendra
c8b4efdd74 Fix for testThumbnailForInvalidFilePath and testPropertiesForNonExsitingFile failed with HMI75B(4124235)
Change-Id: Iab523e666c11b7f99aac71c761a4295d32ca026c
2011-03-17 14:53:20 -07:00
James Dong
2f1f2248c8 Fix missing AOSP copyright headers for a bunch of media framework files
bug - 4119349

Change-Id: If5924e16a5f596d5d73d9beb66eaf5ac9a6f0e50
2011-03-17 11:10:40 -07:00
Mike Lockwood
a3f8514492 MtpServer: Do not attempt to stop MTP if it has not been started
Fixes an ANR that occurred if we got a USB disconnected event
before the MTP service had started.

Bug: 4118033

Change-Id: I6cad4281a5911a9926cae923f34d3a6bf98346c5
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-17 09:43:50 -04:00
Yu Shan Emily Lau
fd5c1f7c57 Merge "Suppress the 1 hour video editor export test case which exceed the 5 mins large test limit. Add the media test util for capturing the memory usage. Bug# 4108259 Change-Id: I751a622ff5dfbb1d563f63a2cbc9db71d194a0f6" into honeycomb-mr1 2011-03-16 16:40:46 -07:00
Yu Shan Emily Lau
9dab784705 Suppress the 1 hour video editor export test case which exceed the 5 mins large test limit.
Add the media test util for capturing the memory usage.
Bug# 4108259
Change-Id: I751a622ff5dfbb1d563f63a2cbc9db71d194a0f6
2011-03-16 16:36:17 -07:00
Rajneesh Chowdury
0edefea88e Merge "Fix for 4087846 Crash reported by monkey report (Java/Jni)" into honeycomb-mr1 2011-03-16 16:03:15 -07:00
James Dong
6ec0ca9e8e Add the default camera id to mCameraIds for emulator and those devices without media_profiles.xml configuration file.
bug - 4109530

Change-Id: Ib83be7a7f767a4b20ac338734ada1581e7a4c5bf
2011-03-16 14:11:32 -07:00
Andreas Huber
5bd3bb46b1 DO NOT MERGE: Fix a race condition when playing an audio-only stream and seeking before starting.
Change-Id: I70dfdfb7c27e3c713079c359ef89a570eb600dc7
related-to-bug: 4039068
2011-03-16 12:04:56 -07:00
Rajneesh Chowdury
8e7991a52e Fix for 4087846 Crash reported by monkey report (Java/Jni)
Change-Id: I356f975743f5a24e72f33a20ee497a2b12791be6
2011-03-15 16:20:17 -07:00
Shailendra Yadav
3fabad87f6 Merge "Fix for Don't allow adding 64-bit files(4086708)" into honeycomb-mr1 2011-03-14 17:23:05 -07:00
Shailendra Yadav
4d0ec22aa9 Fix for Don't allow adding 64-bit files(4086708)
Change-Id: I880c89b565dd8172fdf077a514d5b3d03eab7d9e
2011-03-14 15:07:05 -07:00
Eric Laurent
3cbfd10bbb Merge "Partial fix for issue 3515250: video chat and SCO" into honeycomb-mr1 2011-03-14 11:21:50 -07:00
Mike Lockwood
90f5d75cf0 MtpDevice: Handle zero length packets in readResponse()
Bug: 3509060

Change-Id: I291eefeaa667688c9e6e75da74ec3025b84065e9
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-14 10:33:22 -04:00
Eric Laurent
fa640154f1 Partial fix for issue 3515250: video chat and SCO
Do not call directly into AudioSystem in setBluetoothScoOn() but
send a message to the AudioService handler instead. As the
procedure to switch audio path to BT SCO can last some time we should
not block the caller which can run in the UI thread.

Change-Id: I6ac4b5a934d69781db3aebe5d0e8137b52a0ada4
2011-03-12 15:59:51 -08:00
Mike Lockwood
bcc0516bc8 MTP host: Fix problems reading large data packets
Fixes problem reading large thumbnails via PTP

Bug: 4065217

Change-Id: I643672512829c93ab0827091f39103dbb1918071
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-12 14:03:23 -05:00
Mike Lockwood
62cfeeb821 USB: minor cleanup work
Bug: 4067029

Change-Id: Icd8f912ab8732b5f770a217b9b3731092597ce02
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-11 18:51:29 -05:00
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