1152 Commits

Author SHA1 Message Date
Jamie Gennis
8d102eb672 Merge changes I33f59705,Ia4c8c822,I2fb695ab,I2e587afc
* changes:
  MediaDump: use the MediaPlayer#setSurface method
  HTML5VideoView: switch to MediaPlayer#setSurface
  MediaPlayer: unhide the setSurface method
  Surface: unhide the SurfaceTexture ctor
2011-08-30 14:38:56 -07:00
Rajneesh Chowdury
8f7bf02506 5106773 Can't export a movie - Error returned from OMX API in ducati
Video Editor engine wrongly set the profile in place of level.
So level was always 1 (default value for Profile)

Change-Id: I202f866d32e81869d9692174d59d9d777a772282
2011-08-29 20:16:22 -07:00
Jamie Gennis
b283dc64bc MediaPlayer: unhide the setSurface method
Change-Id: I2fb695ab918d1099ad7cc51bfd436712a0b640d9
2011-08-29 14:33:10 -07:00
Jean-Michel Trivi
db8a361629 Update IRemoteControlDisplay when it registers.
When an IRemoteControlDisplay registers, it must receive information
 from the current client.

Change-Id: Id845e7a87ac74c2db2c59e0281b28a45f8d20528
2011-08-29 09:57:18 -07:00
Jean-Michel Trivi
7309c83b95 Cannot compare Binder references for RC display to unregister
Cannot trust references to IRemoteControlDisplay to remain the
 same when removing a RemoteControlDisplay, compare the
 result of .asBinder() instead.

Change-Id: Ib2e82aa24bd4b12804bccff94a6a0090ff83bea8
2011-08-26 18:54:44 -07:00
Jean-Michel Trivi
18e7bce523 Address multiple RemoteControlDisplay competing for registration
The RemoteControlClient / Display feature only supports one
 display. If multiple displays are registered, this CL implements
 the following policy:
 - cannot unregister a display that is not the current one,
 - registering a display when another is already registered
    causes the old one to be unregistered.
This fixes a death handler leak where the previous display was
 simply overwritten, without unlinking to its death.

Change-Id: I63f8a38093796e0960761936d7fc58d47b7589b3
2011-08-26 18:14:29 -07:00
Jean-Michel Trivi
6e679d5a53 Don't try to rescale when no bitmap in RemoteControlClient
If a RemoteControlClient has a null artwork, do no attempt to
 rescale the bitmap, it's ok to send a null bitmap to the
 IRemoteControlDisplay.

Change-Id: I8332ccfcf18107ea0b41d4e7fa232d7f68798efc
2011-08-26 11:57:42 -07:00
Jean-Michel Trivi
3094d955b8 Fix deadlock in AudioService
Locks related to audio focus and remote control should always be
 taken in the following order:
 1/ audio focus lock
 2/ remote control stack
 3/ current remote control client generation

Change-Id: If8be11bfef92849957e692b2bd52adbd67a2ef0b
2011-08-24 19:08:48 -07:00
Jean-Michel Trivi
4b6df6a3dc More information for RemoteControlDisplay about new client
When the client gets cleared, let the display know the new
 client generation ID is for a clear.
When a new client becomes current, let the display know
 what the associated media button event receiver is.

Change-Id: I18e37a309b5b30ed361a68918379b60418409f1e
2011-08-24 17:13:49 -07:00
Jean-Michel Trivi
44413e5b51 Bug 5045498 Single binder call when metadata and artwork are updated
When metadata gets applied, optimize the artwork and metadata
 update by doing it in a single call.

Add missing RemoteControlDisplay-related methods in AudioManager.

Change-Id: I97aa802cc480327bee5592ea8dfdbd414c0f037a
2011-08-23 19:08:47 -07:00
Jean-Michel Trivi
4da5eeffc9 Bug 5045498 Implementation of RemoteControlClient.MetadataEditor
A MetadataEditor contains all the metadata and artwork to be applied
 to a RemoteControlClient.
A MetadataEditor can only be applied once.

Change-Id: I3ce9d97f520cd9ab009fb1a92a2b399717511bd8
2011-08-23 18:09:49 -07:00
Jean-Michel Trivi
68e37ae87a Merge "Bug 5045498 New implementation of remote control API" 2011-08-23 11:46:44 -07:00
Jean-Michel Trivi
4426e42ac6 Bug 5045498 New implementation of remote control API
Remote control displays expose an IRemoteControlDisplay interface
 which they register through AudioManager.
Remote control clients create a RemoteControlClient object, which
 implicitely exposes an IRemoteControlClient interface registered
 in AudioService through AudioManager.
AudioService tells all clients and displays when a new client
 is the one that should be displayed.
A client's data gets sent to the display when it is valid, or
 it sets new data (while being valid).

The implementation for setting metadata and album art is temporary,
 and will migrate to the MetadataEditor API in future CLs.

Change-Id: Ibab6ea1d94c68f32482c760c6ae269541f885548
2011-08-23 11:23:22 -07:00
Eric Laurent
cf56f1e7ad Merge "Revert "Change condition to enter silent mode."" 2011-08-23 08:44:13 -07:00
Eric Laurent
73a56fe477 Revert "Change condition to enter silent mode."
This reverts commit c11c3ae4dd5d4054e5b44a7bdfe6b203bdb69976.
2011-08-23 08:27:41 -07:00
Chih-Chung Chang
f1824a9762 Pass correct indices for thumbnails of MediaImageItem.
Change-Id: I8e52014ab76c63994385bc54106c19b425be8550
2011-08-23 16:00:28 +08:00
Rajneesh Chowdury
3ced044154 Fix for 4142219 Don't hard code platform-specific limitations (Jni/ Java)
Also fixes 5118207 add other video codec support for video editor export.

Change-Id: If72427173bd8ff684af07ba00f4425c1deef29c6
2011-08-19 14:34:47 -07:00
Jean-Michel Trivi
8c60d89b37 Merge "Bug 5045498 RemoteControlClient interface" 2011-08-17 16:54:37 -07:00
Eric Laurent
8f6684144a Merge "Fix issue 5126270: Holding volume down vibrates" 2011-08-17 14:59:58 -07:00
Eric Laurent
cc11b1b8bb Fix issue 5126270: Holding volume down vibrates
Clear AudioManager.FLAG_VIBRATE in adjustStreamVolume() if
already in silent mode.

Change-Id: I8035a8cc713e1880799d9aaf053d8e4d12acad75
2011-08-17 12:42:07 -07:00
Eric Laurent
bc91ea6bff Merge "Change condition to enter silent mode." 2011-08-17 10:19:06 -07:00
Jean-Michel Trivi
178889eff7 Bug 5045498 RemoteControlClient interface
Define a RemoteControlClient interface that applications must
 implement and register to be displayed on the lockscreen.

Change-Id: I67276ae653f203e76727432231f1d76535c31942
2011-08-17 09:53:12 -07:00
Eric Laurent
c11c3ae4dd Change condition to enter silent mode.
Previously, silent mode was entered if volume was already at 0 and
volume down key was pressed once.

The new volume management policy specifies that silent mode is entered when
volume is at last audible step and volume down key is pressed once.

Pressing volume down key continuously will decrease volume until
last audible step is reached, not 0.

Change-Id: Ib7b530668473d6a5af1e748f445d6185afed2158
2011-08-16 12:31:00 -07:00
Chih-Chung Chang
1f5de3833d Display thumbnails one by one and cache them.
Change-Id: I10808f5bca475aea924817bf532dc5916438563a
2011-08-16 16:48:43 +08:00
Eric Laurent
931e739463 Merge "Fix issue 5131056: key beeps when screen is locked" 2011-08-15 18:01:37 -07:00
Eric Laurent
96f218e0b9 Fix issue 5131056: key beeps when screen is locked
Clear AudioManager.FLAG_PLAY_SOUND in AudioService adjustSuggestedStreamVolume()
if keyguard is locked.

Change-Id: I2effb9cab8d946845e948b28899b17d7f24c1282
2011-08-15 17:57:05 -07:00
Jean-Michel Trivi
59df720668 Merge "Bug 5045498 javadoc for the remote control client API" 2011-08-15 17:14:04 -07:00
Jean-Michel Trivi
837da7153f Merge "Bug 5045498 Send media button event receiver to remote control" 2011-08-15 17:12:33 -07:00
Jean-Michel Trivi
fcd693a21d Bug 5045498 javadoc for the remote control client API
Change-Id: I2a8aeffd94c4f9e93a1be459be8e45d595438f38
2011-08-15 16:05:44 -07:00
Eric Laurent
152abefccb Merge "Deprecate use of some audio effects on output mix." 2011-08-15 15:49:55 -07:00
Jean-Michel Trivi
0a9faa8cf9 Bug 5045498 Send media button event receiver to remote control
When notifying the remote controls of an update, also pass the
 associated media button event receiver.

Change-Id: I9125378653ce21e3bd672b936df638c0c6154edb
2011-08-15 14:41:38 -07:00
Eric Laurent
62f3617f2f Deprecate use of some audio effects on output mix.
The possibility for applications to apply insert audio effects
(Equalizer, BassBoost, Virtualizer) on global output mix has brought up
a number of issue.

This change updates the java doc for audio effects indicating that
application should not apply insert effects globaly anymore as this behavior
will soon be deprecated.

The audio framework will still allow global insert effects during an interim
period but will give the priority to effects inserted on particular player by
disabling global effects when both are present.

============

Change-Id: If87f1944a0409d45d8d2eee66ff331f95965ca89
2011-08-15 11:11:13 -07:00
Jean-Michel Trivi
70b5c66a24 Merge "Fail request for audio focus when linkToDeath fails" 2011-08-14 16:12:09 -07:00
Jean-Michel Trivi
baf674eedd Fail request for audio focus when linkToDeath fails
When requesting audio focus and linkToDeath() threw a
 RemoteException, AudioService was only logging a warning, and
 was still changing the focus, with a non-null death handler.
The change first check that linkToDeath() didn't fail, and only
 then proceeds to change the focus (dispatch focus change
 notification, updates the focus stack, and updates the remote
 controls).

Change-Id: I0b96dd3c6e924d93f419880349d49f8b360b110b
2011-08-14 15:16:21 -07:00
Mike Lockwood
52727fc38a Merge "MediaScanner: Clear file path before deleting records to avoid accidental file deletions" 2011-08-14 14:39:12 -07:00
Jean-Michel Trivi
5a586199ce Merge "Fix leak of global references and AudioFocusDeathHandler objects." 2011-08-14 14:24:09 -07:00
Jean-Michel Trivi
061214bb71 Fix leak of global references and AudioFocusDeathHandler objects.
Need to call unlinkToDeath() for the object to be garbage collected.
Save the object in the FocusStackEntry, unlink to death when we remove it from the stack.
See http://b/issue?id=5048400

Change-Id: I84c5ba46017d0a8744b5e7509a7c7a5c8dd918fb
author: olivier@google.com
2011-08-14 11:37:24 -07:00
Mike Lockwood
f2e2b523dd MediaScanner: Clear file path before deleting records to avoid accidental file deletions
Bug: 5140112
See also http://code.google.com/p/android/issues/detail?id=3692

Change-Id: I971eea83a2f3986a0b0ea018b7211f2525b914ab
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-08-14 10:35:54 -07:00
Eric Laurent
497b3fe725 Issue 5081351: isWiredHeadsetOn() permission.
AudioManager.isWiredHeadsetOn() should not require permission MODIFY_AUDIO_SETTINGS.
Remove permission checks on all getters in audio policy manager as permission enforcement
is really usefull for setters.
Also deprecate AudioManager.isWiredHeadsetOn() which name and implementation are deceptive.

Change-Id: I38f8df7c26c0d417bf0e2b74e4c11c2d143f2ecd
2011-08-12 17:43:35 -07:00
Jean-Michel Trivi
bb04910893 Merge "Pass flags on remote control client information change in intent" 2011-08-12 09:21:27 -07:00
Ted Bonkenburg
1ee60119c4 Remove ParcelSurfaceTexture and update MediaPlayer
This removes the ParcelSurfaceTexture class since that functionality has been
folded into Surface.java. The change also updates the MediaPlayer to get rid
of setParcelSurfaceTexture() and modifies setTexture() to use the new Surface
functionality in order to simplify the code.

Change-Id: Iafa75ea3188263928128325d8a726786971b4de4
2011-08-11 19:58:25 -07:00
Marco Nelissen
bcbddd9342 Only set the ringtones and such if this is the first media scan
b/5126979

Change-Id: Ibef2bd5a3a1a288fc1137694e858d87628d780c0
2011-08-11 15:44:38 -07:00
Jean-Michel Trivi
b5f04d6dbf Pass flags on remote control client information change in intent
Pass the flags about what information changed in the remote
 control client in the intent used by the remote control display.
Also pass the IRemoteControlClient to verify it is still current
 before sending the intent.

Marked some logs as to be removed before release.

Change-Id: Ib3aa22d061e5dfaf80a9c4c78774c931a2cf0fbd
2011-08-11 10:50:43 -07:00
Marco Nelissen
f1ddd51f9c Check pids instead of IBinders
There can be multiple AudioManagers per process (because each Context has
its own cache of services), so AudioService should protect SCO activation
based on whether the pids match, not whether the IBinders match.

b/5044873

Change-Id: Ibec81365f95fec11f34b47becd0e473762bf06ad
2011-08-10 14:32:45 -07:00
Mike Lockwood
bdbe6939ff Merge "Use video/webm mime type for WEBM files" 2011-08-10 10:28:25 -07:00
Mike Lockwood
b33e079aca Merge "MediaScanner: Disable bulk inserts" 2011-08-10 10:28:18 -07:00
Gloria Wang
cd7f0d7f72 Merge "To support for switching from a non-null surface/ surface texture to a null one, and vice versa. Fix for bug 5137445." 2011-08-10 09:28:50 -07:00
Mike Lockwood
ff53591482 Use video/webm mime type for WEBM files
Bug: 5042137

Change-Id: I677af1b4f34c37c78f84229551a8d82f1a7bf245
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-08-10 12:16:40 -04:00
Mike Lockwood
3410b46565 MediaScanner: Disable bulk inserts
We are still finding bugs related to the bulk insert support,
so lets disable it for now.

Bug: 5026233

Change-Id: I436cd8fc5dbe9fcf220a623f1c070cf901c6d38c
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-08-10 12:13:30 -04:00
Jean-Michel Trivi
17da769e98 AudioService: don't use a soft reference on IRemoteControlClient
In the remote control stack, don't use a SoftReference to the
 IRemoteControlClient because the client live in a different
 process, which causes the reference to become null at the
 earliest opportunity.

Change-Id: I7f7733f9a1a043825cd5e8769282b535657dd82d
2011-08-09 18:44:00 -07:00