6602 Commits

Author SHA1 Message Date
Adam Powell
0c26f97684 am 3b939b72: am fd3fd482: Merge "Update route count properly when MediaRouteButton detects grouped/ungrouped events" into jb-dev
* commit '3b939b7242f9c4155f4d8b34cb474abc77c6417f':
  Update route count properly when MediaRouteButton detects grouped/ungrouped events
2012-06-23 05:39:23 -07:00
Adam Powell
3b939b7242 am fd3fd482: Merge "Update route count properly when MediaRouteButton detects grouped/ungrouped events" into jb-dev
* commit 'fd3fd482ab6ab67b687696f51fa67714bd36fa49':
  Update route count properly when MediaRouteButton detects grouped/ungrouped events
2012-06-23 05:36:54 -07:00
Adam Powell
f3b653a21c Update route count properly when MediaRouteButton detects
grouped/ungrouped events

Change-Id: I1b00678cc3b548f347c51c3fcbfce18ecc8fbabe
2012-06-22 19:22:38 -07:00
Adam Powell
c7be481af1 am fd7ea067: am d7c00d2b: Merge "MediaRouter group volume reporting" into jb-dev
* commit 'fd7ea06787f0be4def188621888d228f38f3a4d1':
  MediaRouter group volume reporting
2012-06-21 12:03:55 -07:00
Adam Powell
fd7ea06787 am d7c00d2b: Merge "MediaRouter group volume reporting" into jb-dev
* commit 'd7c00d2bdd011d3a73faf1c4a5bb8012d24dd648':
  MediaRouter group volume reporting
2012-06-21 11:52:19 -07:00
Adam Powell
f8ac14a7f5 MediaRouter group volume reporting
RouteGroups always report back the loudest volume of their component
routes. Maintain this through volume update requests (such as those
reported by volume hard keys) such that each route updates
individually, but the group slider always indicates the loudest value.

Change-Id: I5de4b9048bf55682b6271e9485fe50496a1c97c2
2012-06-20 23:59:14 -07:00
Adam Powell
a08e6881c5 am ed044cda: am 09829b71: Merge "Expand volume APIs for MediaRouter" into jb-dev
* commit 'ed044cda8f6a7600923eecdec682c449f86e0429':
  Expand volume APIs for MediaRouter
2012-06-20 22:45:09 -07:00
Adam Powell
ed044cda8f am 09829b71: Merge "Expand volume APIs for MediaRouter" into jb-dev
* commit '09829b71de3a84cb9d1bc0d8aad78dd16daadddf':
  Expand volume APIs for MediaRouter
2012-06-20 22:35:44 -07:00
Pannag Sanketi
c83788cec9 am 4bae6149: am 60c5b714: Merge "Crash in SurfaceTextureTarget filter open" into jb-dev
* commit '4bae6149bd419eac00e5782a30d19463957e3c42':
  Crash in SurfaceTextureTarget filter open
2012-06-20 22:34:36 -07:00
Adam Powell
09829b71de Merge "Expand volume APIs for MediaRouter" into jb-dev 2012-06-20 22:32:39 -07:00
Pannag Sanketi
4bae6149bd am 60c5b714: Merge "Crash in SurfaceTextureTarget filter open" into jb-dev
* commit '60c5b714dc747eef0b5c2a57db60b162315fba2f':
  Crash in SurfaceTextureTarget filter open
2012-06-20 22:31:12 -07:00
Adam Powell
8e37a85bf3 Expand volume APIs for MediaRouter
Allow applications to set a requested volume level on RouteInfo
objects. If requested for a user route, the app-supplied callback will
be invoked to perform actual volume adjustment.

Change-Id: I856990a0da7292492aa15e6562dbc3d055b848a0
2012-06-20 22:19:29 -07:00
Pannag Sanketi
60c5b714dc Merge "Crash in SurfaceTextureTarget filter open" into jb-dev 2012-06-20 19:32:44 -07:00
Pannag Sanketi
22f2a8728e Crash in SurfaceTextureTarget filter open
If the filter graph in an app closes out, the SurfaceTextureTarget
filter was losing the reference to the original surfacetexture, and the
app would re-start the graph without setting the surfacetexture again,
thus leading to a crash in registering a surface from surfacetexture.

Typical scenarios is start/stop immediately in camera effects recording.

Fix part of b/6651352
Fix part of b/6655597

Change-Id: Ib2bae7e886784e91b3a886f7ccd439ff190feb22
2012-06-20 19:23:48 -07:00
Jean-Michel Trivi
ecab2aab19 am e44440f4: am bd6b1820: Merge "Unhide new API in android.media.MediaRouter for remote playback" into jb-dev
* commit 'e44440f40c6b005dce2eba1b37b3cabe97133152':
  Unhide new API in android.media.MediaRouter for remote playback
2012-06-20 16:46:55 -07:00
Jean-Michel Trivi
63258b253c am 7fe75d97: am fc178e38: Merge "Asynchronous handling of remote volume updates" into jb-dev
* commit '7fe75d9759544d9b2eccac19aacb8c3992dfcc02':
  Asynchronous handling of remote volume updates
2012-06-20 16:46:51 -07:00
Jean-Michel Trivi
e44440f40c am bd6b1820: Merge "Unhide new API in android.media.MediaRouter for remote playback" into jb-dev
* commit 'bd6b1820d931ef11fc7fc5b8571a8265c1ed4994':
  Unhide new API in android.media.MediaRouter for remote playback
2012-06-20 16:43:55 -07:00
Jean-Michel Trivi
7fe75d9759 am fc178e38: Merge "Asynchronous handling of remote volume updates" into jb-dev
* commit 'fc178e381d3db299901a96461122eb22a4ffb43e':
  Asynchronous handling of remote volume updates
2012-06-20 16:43:52 -07:00
Jean-Michel Trivi
2cd5d25378 Unhide new API in android.media.MediaRouter for remote playback
Expose new functionality for handling remote volume in:
 android.media.MediaRouter.RouteInfo
 android.media.MediaRouter.UserRouteInfo
 android.media.MediaRouter.VolumeCallback

Change-Id: I8fd9c92be606364599e65939f318e11c2860bab9
2012-06-20 14:36:23 -07:00
Jean-Michel Trivi
f98de1e8dd Asynchronous handling of remote volume updates
Remote playback information updates will be posted from the
 application thread, and sent to AudioService. Because they
 require locking the stack containing the remote playback
 information, the update should happen on AudioService's handler
 thread to avoid lock contention.

Change-Id: Ie04898295e08c16dd8ab5985fd825301e9cf1981
2012-06-20 13:40:22 -07:00
Jean-Michel Trivi
6009dc014f am b92d2a13: am 18ddb6ce: Merge "Remote volume handling in MediaRouter" into jb-dev
* commit 'b92d2a13c4ab34862968f47191d2713de3701757':
  Remote volume handling in MediaRouter
2012-06-20 09:12:59 -07:00
Jean-Michel Trivi
b92d2a13c4 am 18ddb6ce: Merge "Remote volume handling in MediaRouter" into jb-dev
* commit '18ddb6ce6f3672a24a6f86ee4b28f5baa746bc20':
  Remote volume handling in MediaRouter
2012-06-20 09:10:18 -07:00
Jean-Michel Trivi
1357012968 Remote volume handling in MediaRouter
Extend MediaRouter.UserRouteInfo to enable setting playback
 information, which includes volume. When the user route instance
 has a RemoteControlClient, forward any playback information to it.
 Enable specifying a callback to be notified of volume events
 on the route.
Extend MediaRouter.RouteInfo to enable retrieving playback
 information.

Update RemoteControlClient javadoc to reflect which parts of the
 API are not intended to be made public.

Change-Id: I59d728eb61747af6c8c89d53f0faeb07940594c3
2012-06-19 19:41:35 -07:00
Jean-Michel Trivi
629f051f7d am 586b8ee6: am 2f442304: Merge "Remote volume handling" into jb-dev
* commit '586b8ee62e0245e3c88ce9db51e1c1c3b4f1fb2c':
  Remote volume handling
2012-06-19 10:59:15 -07:00
Jean-Michel Trivi
586b8ee62e am 2f442304: Merge "Remote volume handling" into jb-dev
* commit '2f4423043ffeaf232ec984be03743326f08cdc8a':
  Remote volume handling
2012-06-19 10:56:28 -07:00
Jean-Michel Trivi
2f4423043f Merge "Remote volume handling" into jb-dev 2012-06-19 10:54:32 -07:00
Adam Powell
e97d222110 am 29a2f84f: am 5bb835a9: Merge "MediaRouter bluetooth a2dp selection" into jb-dev
* commit '29a2f84fbee96c1bbbcb50eceb17d9b726854146':
  MediaRouter bluetooth a2dp selection
2012-06-18 21:43:46 -07:00
Adam Powell
29a2f84fbe am 5bb835a9: Merge "MediaRouter bluetooth a2dp selection" into jb-dev
* commit '5bb835a95942b0b313b2fa4e3f05941e630f9be7':
  MediaRouter bluetooth a2dp selection
2012-06-18 21:40:19 -07:00
Adam Powell
dd0a19266d MediaRouter bluetooth a2dp selection
Remove bluetooth permission check from internal AudioService method
setBluetoothA2dpOn

Manage BT A2DP state in MediaRouter. A2DP is only enabled or disabled
when either the system built-in audio route or the A2DP audio route is
selected; when selecting any other route the current state is left
alone.

Change-Id: Ib14274e206e79bd8762edca1205ecfa87b7a94cf
2012-06-18 19:51:02 -07:00
Jean-Michel Trivi
3114ce3861 Remote volume handling
Extend RemoteControlClient class to enable an applicaton to
 specify more information about how it's playing media, now covering
 usecases where media playback happens "remotely". This playback
 information can be used to set the volume and maximum volume
 used remotely.
Declare a new intent and associated extras in Intent,
 ACTION_VOLUME_UPDATE, so an application can be notified that
 the volume it handles should be updated. It can then use
 the new RemoteControlClient.setPlaybackInformation() method
 to notify AudioService what the volume is.
Extend AudioService to maintain playback information associated
 with the RemoteControlClient information in the stack of
 media button event receivers (mRCStack). The information
 about the active remote is cached so the stack doesn't have
 to be iterated over in order to retrieve remote playback info.
 Events to "adjust" the remote volume based on hardware key
 presses cause the client application to be notified of
 volume updates, and the volume panel to display the volume
 set by the app.
 Revise which stream type is controlled when none is specified
 according to latest guidelines for remote playback.
Update VolumePanel class to support a new pseudo stream type,
 AudioService.STREAM_REMOTE_MUSIC, that corresponds to the
 remote playback volume, and uses the new "media route" icon.
 Enable it to receive asynchronously new volume values for
 the remote that will be displayed if the UI is still up,
 and ignored otherwise.
 Now supports hiding/showing sliders dynamically so remote
 volume only appears when AudioService has a remote control
 client handling remote volume.
Define new java symbols for the two media route icons.
Modify lockscreen behavior: don't automatically control music
 volume when music is active, consider also remote playback.

Still to do:
- playback information set by RemoteControlClient should post
  a message for AudioService to update playback information
  instead of updating it synchronously

Change-Id: I557aa687239f9acfe33a609f05876c67fa7eb967
2012-06-18 18:37:17 -07:00
Adam Powell
987f4a504a am 12c2fbd3: am eb2c1b21: Merge "Restrict MediaRouter selection" into jb-dev
* commit '12c2fbd3b7e98132fe1388b065a5dd09c20ef390':
  Restrict MediaRouter selection
2012-06-18 12:13:57 -07:00
Adam Powell
12c2fbd3b7 am eb2c1b21: Merge "Restrict MediaRouter selection" into jb-dev
* commit 'eb2c1b21c6835399fa55227e498fb2930e533439':
  Restrict MediaRouter selection
2012-06-18 12:12:00 -07:00
Adam Powell
4ee1f55ce0 Restrict MediaRouter selection
Actually restrict the programmatic selection of routes by
type. (Oops.)

Change-Id: I91e837f7ecbcddb626c664fb470e8296d563498d
2012-06-18 11:52:17 -07:00
Adam Powell
0be17da620 am c92aa2e7: am 1b4dc0fe: Merge "Volume control in MediaRouter dialogs" into jb-dev
* commit 'c92aa2e7c9112adafc5283921efe25574a95b7a4':
  Volume control in MediaRouter dialogs
2012-06-18 10:49:56 -07:00
Adam Powell
9471faf5dc am 8f695c52: am 706a8699: Merge "Make MediaRouter UI more robust around route count changes" into jb-dev
* commit '8f695c525f5baa623a8b951bd3a1fd2b5efd1ceb':
  Make MediaRouter UI more robust around route count changes
2012-06-18 10:49:53 -07:00
Adam Powell
7e8aac14c3 am bb20575f: am 130b4572: ActionProvider API update
* commit 'bb20575f85ada8ccdacefc53f0da7e00fdf12a16':
  ActionProvider API update
2012-06-18 10:49:41 -07:00
Dianne Hackborn
5ded10982c am acae5bd3: am 87959cdd: Merge "Add new callback for MediaRouter to found out about device changes." into jb-dev
* commit 'acae5bd34923a79115ad24687558a6ab2ce780ec':
  Add new callback for MediaRouter to found out about device changes.
2012-06-18 10:49:15 -07:00
Eric Laurent
2c0044410e am 9686f24c: am c4f4b0f0: Merge "AudioManager: back to old setBluetoothA2dpOn()" into jb-dev
* commit '9686f24ce3d13446393a468fb3f52283bf2bc80d':
  AudioManager: back to old setBluetoothA2dpOn()
2012-06-18 10:49:12 -07:00
Adam Powell
c92aa2e7c9 am 1b4dc0fe: Merge "Volume control in MediaRouter dialogs" into jb-dev
* commit '1b4dc0fe00805f82fb4bb89a97b6b0501e117505':
  Volume control in MediaRouter dialogs
2012-06-18 10:34:32 -07:00
Adam Powell
8f695c525f am 706a8699: Merge "Make MediaRouter UI more robust around route count changes" into jb-dev
* commit '706a8699008ce416a7fbd9a4215726fdb00ee803':
  Make MediaRouter UI more robust around route count changes
2012-06-18 10:34:29 -07:00
Adam Powell
bb20575f85 am 130b4572: ActionProvider API update
* commit '130b4572d1f3df702e5b296a655d15a41f6d4c66':
  ActionProvider API update
2012-06-18 10:33:19 -07:00
Dianne Hackborn
acae5bd349 am 87959cdd: Merge "Add new callback for MediaRouter to found out about device changes." into jb-dev
* commit '87959cdd8560e743956a71bb687799e94053e086':
  Add new callback for MediaRouter to found out about device changes.
2012-06-18 10:31:29 -07:00
Eric Laurent
9686f24ce3 am c4f4b0f0: Merge "AudioManager: back to old setBluetoothA2dpOn()" into jb-dev
* commit 'c4f4b0f0a4905180314d1a681ddf5767ed1070ed':
  AudioManager: back to old setBluetoothA2dpOn()
2012-06-18 10:31:22 -07:00
Adam Powell
4599696591 Volume control in MediaRouter dialogs
MediaRouter dialogs now intercept the volume keys for altering the
current volume. The status icon indicates if the slider/buttons are
currently controlling the local device volume or a remote device's
volume.

Group volume for user routes is handled by using the
RemoteControlClient supplied by the first route in the group.

Change-Id: I40a0d054847ed5acce7a4c3b669487841b4dca15
2012-06-16 17:21:57 -07:00
Adam Powell
39d5c61725 Make MediaRouter UI more robust around route count changes
Improve the API around ActionProvider visibility overriding. Allow the
application to notify whatever is hosting the ActionProvider that
visibility has changed in a way that is friendly to alternate support
library-style reimplementations of MenuItem.

Allow MediaRouter.Callback implementations to add or remove themselves
or other Callbacks during dispatch of callback events.

Make MediaRouteActionProvider track the visibility of corresponding
menu items more accurately.

Change-Id: Ic7ddb6a87c3637904750d2661e4a9fa323b09ea0
2012-06-16 14:49:13 -07:00
Adam Powell
130b4572d1 ActionProvider API update
* Add ActionProvider#overridesItemVisibility and isVisible.
  These methods allow an ActionProvider to override the
  visibility of a MenuItem that it is bound to. If a MenuItem
  has been explicitly hidden by the application, it will not
  be visible.

* Change MediaRouteActionProvider to not require a MediaRouter
  callback, to avoid extra lifecycle management headaches.

Change-Id: I606fa98b3a6a3e60a953dd024274f9bf9c67acdd
2012-06-15 20:19:29 -07:00
Dianne Hackborn
87959cdd85 Merge "Add new callback for MediaRouter to found out about device changes." into jb-dev 2012-06-15 14:10:42 -07:00
Eric Laurent
c4f4b0f0a4 Merge "AudioManager: back to old setBluetoothA2dpOn()" into jb-dev 2012-06-15 14:01:49 -07:00
Dianne Hackborn
632ca417f0 Add new callback for MediaRouter to found out about device changes.
The AudioService now has an API to call to get the currently
connected devices, and later reports of changes in connection
state.  The information includes the name of the bluetooth
device if one is connected for display to the user, and states
for all of the pluggable devices.  No longer requires a Bluetooth
permission to keep the routes updated.

Change-Id: I81ca421c60592fbc1592477d59bf1c9d1b64954a
2012-06-15 13:15:35 -07:00
Adam Powell
d1e57d7886 am 15635728: am 27db797e: Merge "Update MediaRouteChooserDialog grouping UI" into jb-dev
* commit '15635728a4ff00da6cc3d6468c02d39e5631f124':
  Update MediaRouteChooserDialog grouping UI
2012-06-15 11:57:26 -07:00