4165 Commits

Author SHA1 Message Date
Mike Lockwood
92405699cb am 0bea34fc: am dec0b755: Merge "MTP host: Fix problems reading large data packets" into honeycomb-mr1
* commit '0bea34fc3ec5dfd8d0e7483368875b457b7e2262':
  MTP host: Fix problems reading large data packets
2011-03-14 07:10:03 -07:00
Mike Lockwood
0bea34fc3e am dec0b755: Merge "MTP host: Fix problems reading large data packets" into honeycomb-mr1
* commit 'dec0b755fff1bf87aafd397ef0dd864f54c587cf':
  MTP host: Fix problems reading large data packets
2011-03-14 06:55:21 -07: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
e1976e5c61 am 3b473d95: am 9fffd9a8: Merge "USB: minor cleanup work" into honeycomb-mr1
* commit '3b473d958c46ea6511b9599f727b47636e5cbc4a':
  USB: minor cleanup work
2011-03-11 23:10:41 -08:00
James Dong
a7727dc887 Merge "If MP3 decoder output frame size were 0, media server would crash." 2011-03-11 17:55:52 -08:00
Mike Lockwood
3b473d958c am 9fffd9a8: Merge "USB: minor cleanup work" into honeycomb-mr1
* commit '9fffd9a8bb73e9b225878686862d49b27e98c659':
  USB: minor cleanup work
2011-03-11 17:54:23 -08:00
Ying Wang
86ad55028b Merge "Remove unnecessary ld flags." 2011-03-11 16:52:59 -08:00
James Dong
69ad25e0ff If MP3 decoder output frame size were 0, media server would crash.
This is to log an error message should that happen.

Change-Id: I0f947cd7a8e6639b4f11a928bf90286a34cc652e
2011-03-11 16:13:15 -08:00
Ying Wang
eab30df281 Remove unnecessary ld flags.
This fixes the x86 buid, in which bfd linker is unavailabe.

Change-Id: Ibce1b5cbfb0435644b2d75056003578371510929
2011-03-11 16:06:02 -08: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
James Dong
d96d1be7bd Merge "A little cleanup in MediaScanner JNI code" 2011-03-11 15:15:40 -08:00
Chih-Wei Huang
4c1ac4e665 Remove unnecessary SkImageDecoder_libjpeg.cpp
Adding files outside $(LOCAL_PATH) is a bad idea. It generates output files
to an unexpected directory. In this case, it's

out/target/external/skia/src/images/SkImageDecoder_libjpeg.o

It's not in $(PRODUCT_OUT), which is not correct.
Worse, it makes the build system be unable to build different
architectures (arm and x86) simultaneously, since the output files
conflcit.

Seems we can just remove SkImageDecoder_libjpeg.cpp since it's
already in libskia.

Change-Id: Ia0ed72d8a6cbd3b2f3997b71dfdcf72fee50f5bb
2011-03-11 14:02:39 -08:00
James Dong
f399752858 A little cleanup in MediaScanner JNI code
o mainly use the defined class name rather than repeat the string each time
  to reduce the typo chance.
o format the code also

Change-Id: I131c98f11335ff524d01a6791baa1b8c11013abc
2011-03-11 13:36:28 -08:00
Mike Lockwood
b46ecb3526 am 75c95e9a: am 0eb7b697: Merge changes Ib63ab95a,I585b0610,Ia84da0b5 into honeycomb-mr1
* commit '75c95e9a6d5a91b660af62f72b5a3bac0f5c3811':
  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 11:53:13 -08:00
Mike Lockwood
75c95e9a6d am 0eb7b697: Merge changes Ib63ab95a,I585b0610,Ia84da0b5 into honeycomb-mr1
* commit '0eb7b697b7c180660647b5cd0cd7dd067f6b6abb':
  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 11:37:14 -08: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
Andreas Huber
92b94c7f97 Only use ChromiumHTTPDataSource if webkit was built with chromium support.
Change-Id: I9ce16f4aae35c61c9fb92fefc2a7c72537631cba
2011-03-11 10:07:19 -08:00
Glenn Kasten
6dd429efe2 am 055066e1: am 92f2f3ff: Merge "Bug 3012968 DRM output control" into honeycomb-mr1
* commit '055066e1e77d944383360d50057f5b8187f23c0b':
  Bug 3012968 DRM output control
2011-03-11 08:46:40 -08:00
Glenn Kasten
055066e1e7 am 92f2f3ff: Merge "Bug 3012968 DRM output control" into honeycomb-mr1
* commit '92f2f3ff2ea5c5b474722f2055cfee4916010e26':
  Bug 3012968 DRM output control
2011-03-11 08:44:35 -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
Gloria Wang
7363ac80cf Merge "Fix for bug 3477330 This patch fixs a crash bug caused by using a NULL DecryptHandle pointer. Fix by using sp<DecryptHandle> instead." 2011-03-10 16:37:21 -08:00
Gloria Wang
ae7752798a Fix for bug 3477330
This patch fixs a crash bug caused by using a NULL DecryptHandle pointer.
Fix by using sp<DecryptHandle> instead.

Change-Id: Icbd59858385e8256125a615a3c82656b25319d44
2011-03-10 16:20:48 -08:00
Rajneesh Chowdury
c0d9d25b87 am a4865ec7: am a7118e33: Merge "Fix for 4080402 NPE in Transition.setDuration" into honeycomb-mr1
* commit 'a4865ec73f9faccd6dc442cbc6d78666b1a69b28':
  Fix for 4080402 NPE in Transition.setDuration
2011-03-10 15:14:27 -08:00
Rajneesh Chowdury
a4865ec73f am a7118e33: Merge "Fix for 4080402 NPE in Transition.setDuration" into honeycomb-mr1
* commit 'a7118e33b494b26bfbd37c895a1c412cd5da56ec':
  Fix for 4080402 NPE in Transition.setDuration
2011-03-10 15:12:34 -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
8fe7ca1d7d am 18d8a074: am 564f12eb: Merge changes Ifd78cca3,Ieadb86fe,If5b44ebd into honeycomb-mr1
* commit '18d8a0748d3c42a31799e5ce7c7f4c2fd63d1896':
  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:53:43 -08:00
Mike Lockwood
18d8a0748d am 564f12eb: Merge changes Ifd78cca3,Ieadb86fe,If5b44ebd into honeycomb-mr1
* commit '564f12ebe409bead467eee04dfd719e97367e520':
  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:50:31 -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
Andreas Huber
aab7d1a29a Merge "Support http authentication ala http://foo:bar@host.org in stagefright." 2011-03-09 15:26:11 -08:00
Lorenzo Colitti
3b093c1339 am d1e09e08: am 8df2477c: am bd0e806a: Support IPv6->IPv4 fallback in HTTP streaming.
* commit 'd1e09e08210e755034bbdd07e1f48b35ec9a4752':
  Support IPv6->IPv4 fallback in HTTP streaming.
2011-03-09 15:21:34 -08:00
Lorenzo Colitti
6c3727413b am d6aaec0c: am e4a02b61: am b9da16a1: Support IPv6 in HTTP streaming.
* commit 'd6aaec0ce7639a9d8bb73983711e20545b55e860':
  Support IPv6 in HTTP streaming.
2011-03-09 15:21:31 -08:00
Lorenzo Colitti
d1e09e0821 am 8df2477c: am bd0e806a: Support IPv6->IPv4 fallback in HTTP streaming.
* commit '8df2477c4e7e5bf72d6d1216ae5184c53304470e':
  Support IPv6->IPv4 fallback in HTTP streaming.
2011-03-09 15:17:20 -08:00
Lorenzo Colitti
d6aaec0ce7 am e4a02b61: am b9da16a1: Support IPv6 in HTTP streaming.
* commit 'e4a02b61290fa61955c979cfd1afc17a92bba481':
  Support IPv6 in HTTP streaming.
2011-03-09 15:17:12 -08:00
Lorenzo Colitti
8df2477c4e am bd0e806a: Support IPv6->IPv4 fallback in HTTP streaming.
* commit 'bd0e806a61df9b67890dc3b1390db554e7468b4a':
  Support IPv6->IPv4 fallback in HTTP streaming.
2011-03-09 15:09:20 -08:00
Lorenzo Colitti
e4a02b6129 am b9da16a1: Support IPv6 in HTTP streaming.
* commit 'b9da16a1e36fcf4e38a50adcf10ea59c12dea254':
  Support IPv6 in HTTP streaming.
2011-03-09 15:09:04 -08:00
Andreas Huber
20660eeb4d Support http authentication ala http://foo:bar@host.org in stagefright.
Change-Id: I0b20077ad540ec8aa11adf0ca9f4142ea8b8ae98
2011-03-09 14:47:20 -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
Andreas Huber
db7dc9cc89 Use the same http proxy mechanism that webkit uses instead of bypassing proxies.
Change-Id: Ifd64664d3052fbfa715c2920984170c2a6190f6b
related-to-bug: 3440271
2011-03-09 13:36:15 -08:00
Eric Laurent
18632db49a am 2dc78477: am cc34967f: Merge "Fix issue 3439872: video chat and bluetooth SCO" into honeycomb-mr1
* commit '2dc78477364bd4accb9a603baaafca9a5523dcec':
  Fix issue 3439872: video chat and bluetooth SCO
2011-03-09 11:00:22 -08:00
Eric Laurent
cc34967fdc Merge "Fix issue 3439872: video chat and bluetooth SCO" into honeycomb-mr1 2011-03-09 10:56:01 -08:00
Andreas Huber
f9f6087915 Merge "An HTTP datasource for stagefright using the chromium code." 2011-03-09 10:37:20 -08:00
Jean-Michel Trivi
0984ba25db am 8d0e2b98: am 5fa7aac8: Merge "Fix bug 4064086 Use a death handler on audio focus changes from mode" into honeycomb-mr1
* commit '8d0e2b9857e5f77ced233dc408a7acd9e8ab2e8c':
  Fix bug 4064086 Use a death handler on audio focus changes from mode
2011-03-09 10:22:56 -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
Andreas Huber
5f5719e45b An HTTP datasource for stagefright using the chromium code.
Use of this new datasource is now the default unless overwritten by

adb shell setprop media.stagefright.use-chromium false

Change-Id: I156a8eb9a1fff1cb537b4aec6cf3e8e6052be81e
2011-03-09 10:14:46 -08:00
Mike Lockwood
77e1a4c57e am 093cf07f: am 9e8e4ea0: Merge changes Ib517e5e4,I93be7695,I49bf22a4 into honeycomb-mr1
* commit '093cf07f3c58a6553c415d750edba1a75b269f05':
  Close USB dialogs if their corresponding accessory or device has disconnected
  USB: Add API and dialog for apps to request permissions for USB devices and accessories
  UsbService: Automatically use system apps by default if it is the only choice
2011-03-09 03:57:14 -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