2528 Commits

Author SHA1 Message Date
Chong Zhang
19001d29bd am 9a05e846: am f32962a8: am e8d0fbf2: Merge "Fixed a bug updating presentation displays." into klp-dev
* commit '9a05e846f3ac2f5c60f42160bcca37355647a3a7':
  Fixed a bug updating presentation displays.
2013-11-11 15:23:37 -08:00
Jeff Brown
75af171006 Changes to support new screen cast settings screen.
Fixed the Preference ordering code to consider the case where
two preferences might have the same order.  In that case, it
falls back on the title to disambiguate.  Previous behavior was
undefined (and technically not stable).

Expose the wifi display device address.

Perform wifi display scans every 10 seconds instead of every 15
to improve reponsiveness.

Make sure to define routes for wifi displays that we are connecting
to even if they are not yet paired.  Simplified the logic for
adding and removing these routes to avoid possibly getting out
of sync and leaving stale routes behind.

Fix wifi display notification icon.

Bug: 11257292
Change-Id: I8ac15fb17d83758c0bdce80399e12723c367b83c
2013-11-10 22:51:15 -08:00
Jeff Brown
dd4f9e8b61 Merge "Update the media router dialogs and integrate into system UI." into klp-dev 2013-11-11 05:59:38 +00:00
Jeff Brown
0abd3a6ce8 Update the media router dialogs and integrate into system UI.
Port the new style UI back into the framework from the support library.
There are now two dialogs: a chooser and a controller.  We use the
same dialogs for selecting routes within app and within quick settings.

Note that the new UI does not support any grouping features since they
are deprecated and unused.

Bug: 11257292
Change-Id: I64e936a18d25ab75f0c470cbc1e7085f67004863
2013-11-10 14:39:19 -08:00
Chong Zhang
5830b0b336 Fixed a bug updating presentation displays.
Also made findRemoteDisplay public.

Bug: 11257292
Change-Id: Ibc9bf3d8ee7c90293ffd8796270e8883ea458a65
2013-11-08 19:02:48 -08:00
Jeff Brown
7da5bbedc7 am c2b652fd: am 5182ea4b: am d40a4d74: Merge "Add media router service and integrate with remote displays." into klp-dev
* commit 'c2b652fd4d386b79dc99af249b6ad3844e53fdf1':
  Add media router service and integrate with remote displays.
2013-11-07 17:47:25 -08:00
Jeff Brown
6c58d890f3 am 84d76025: am eb223425: am 1f7a8a06: Merge "Add a platform library for remote display providers." into klp-dev
* commit '84d760257f46232601e5f47411fb4e59f57f1872':
  Add a platform library for remote display providers.
2013-11-07 17:47:21 -08:00
Jeff Brown
d40a4d74c6 Merge "Add media router service and integrate with remote displays." into klp-dev 2013-11-08 01:36:55 +00:00
Jeff Brown
1f7a8a0625 Merge "Add a platform library for remote display providers." into klp-dev 2013-11-08 01:36:41 +00:00
Jeff Brown
69b07161be Add media router service and integrate with remote displays.
This change adds a new media router service whose purpose is to track
global state information associated with media routes.  This service
publishes routes to the media router instance in application processes
and handles requested state changes such as selecting or unselecting
global routes.  The service also binds to remote display provider
services which can offer new remote display routes to the system.

Includes a test application for manually verifying certain aspects
of the operation of the media router service.

The remote display provider interface is essentially a stripped down
media route provider interface as defined in the support library
media router implementation.  For now, it is designed to be used only
by first parties to publish remote display routes to the system so
it is not exposed as public API in the SDK.  In the future, the remote
display provider interface will most likely be deprecated and replaced
with a more featureful media route provider interface for third
party integration, similar to what is in the support library today.

Further patch sets integrate these new capabilities into the System UI
and Settings for connecting remote displays.

Bug: 11257292
Change-Id: I31109f23f17b474d17534d0f5f4503e388b081c2
2013-11-07 03:25:37 -08:00
Jeff Brown
f3c99e883f Add a platform library for remote display providers.
This interface allows applications to register services that offer
remote displays to the system.  The system will then provide UI
to allow user to connect to these displays and enable mirroring.

Bug: 11257292
Change-Id: I34da5b9dfdaf71267bd3450c505bc1b7368d1b40
2013-11-07 01:58:15 -08:00
Andy Hung
b84a72cb5c Merge "Revert "Add "throws IOException" to MediaCodec constructors (3)"" 2013-11-07 04:15:32 +00:00
Andy Hung
8ca55fc980 Revert "Add "throws IOException" to MediaCodec constructors (3)"
This reverts commit 52d8aa79a31c5042d2b43d06f08fa28489b27d1b.

Change-Id: Ic706e0fb469931664499d00fa3a221726b258673
2013-11-07 04:06:31 +00:00
Andy Hung
928f9fe466 Merge "Add "throws IOException" to MediaCodec constructors (3)" 2013-11-07 01:58:52 +00:00
Eric Laurent
4feaa2e0b6 am 1a231f5f: am e661b541: am 7791b84c: Merge "AudioService: fix notifications with A2DP abs volume" into klp-dev
* commit '1a231f5fdabb00e491d86abf878efb15588012da':
  AudioService: fix notifications with A2DP abs volume
2013-11-06 08:52:07 -08:00
Andy Hung
52d8aa79a3 Add "throws IOException" to MediaCodec constructors (3)
Change to add "throws IOException" to android.media.MediaCodec
(createByCodecName|createDecoderByType|createEncoderByType).  The exception was
previously thrown through the native JNI, but not explicitly declared.

Requires changes to existing code for declaration compatibility.

Bug: 11364276
Change-Id: Ia0d3481397285cb1503bedde37d4651934b3a481
Signed-off-by: Andy Hung <hunga@google.com>
2013-11-05 18:54:43 -08:00
Eric Laurent
cd772d0434 AudioService: fix notifications with A2DP abs volume
When A2DP absolute volume is enabled, the music stream
software volume is maxed out because the headset applies
the volume.

We must also max out other streams playing over A2DP otherwise
they are attenuated twice and are barely audible.

Bug: 11316102.
Change-Id: I7e58c74cb683ad1d6f3b68abb0ef967c817fbf4f
2013-11-04 12:37:53 -08:00
Lajos Molnar
128537f600 am f57530e4: am fcd69ca4: am 66b753b0: Merge "MediaPlayer: MTP: update state only based on source events" into klp-dev
* commit 'f57530e449631658cf9dddfa774ffc3df2383513':
  MediaPlayer: MTP: update state only based on source events
2013-10-28 15:09:02 -07:00
Lajos Molnar
66b753b06b Merge "MediaPlayer: MTP: update state only based on source events" into klp-dev 2013-10-28 21:59:55 +00:00
Lajos Molnar
4de8e7c1a5 MediaPlayer: MTP: update state only based on source events
State only depends on events from the MediaPlayer (this includes
the pseudo-event from MTP recovery mechanism.)

Change-Id: Idd62a773d2386ad6bfbfe417412c2e2ff09b3600
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 11412881
2013-10-28 09:19:26 -07:00
Jean-Michel Trivi
cfcd53a815 am 33f713d2: am a60057c0: am d4249251: Merge "Limit RemoteControlClient generation ID changes" into klp-dev
* commit '33f713d2b3663ac05d145a0d971b009d9e0988a7':
  Limit RemoteControlClient generation ID changes
2013-10-25 14:04:52 -07:00
Jean-Michel Trivi
d4249251e0 Merge "Limit RemoteControlClient generation ID changes" into klp-dev 2013-10-25 20:41:39 +00:00
Jean-Michel Trivi
0b60534917 Limit RemoteControlClient generation ID changes
At the beginning of each song, the Music app re-registers its
 media button event and requests audio focus, which causes
 the reevaluation of each corresponding stack of clients. Each
 reevaluation is accompanied by the incrementation of the
 RemoteControlClient generation ID, which causes RemoteController
 to issue a notification that the client has changed. The lockscreen
 correctly interprets this as a reason to dump the current
 RemoteControlClient data (including the artwork) because it will
 receive the new data if new one is available. This is what causes
 the "flashing" of the wallpaper on the lockscreen: for an instant,
 no client data is available.
The fix consists in not causing the client generation ID to be
 incremented when registrations don't cause any change in the
 RemoteControlClient stack. Even though Music re-registers everything,
 nothing has changed: it still is the current media button receiver,
 and it still has the same RemoteControlClient.

Bug 11307382

Change-Id: I4d2404b571e88aeedb0eca6bd19d39f7ec4fc8b1
2013-10-24 19:10:24 -07:00
Jean-Michel Trivi
e38b99504d am 6a3bfe07: am 9c267f8d: am 5504537e: Merge "Missing LoudnessEnhancer constructor and UUID in public API" into klp-dev
* commit '6a3bfe0796f09114c834dab34b7f5b62a549e51c':
  Missing LoudnessEnhancer constructor and UUID in public API
2013-10-24 16:49:59 -07:00
Jean-Michel Trivi
3661494d46 Missing LoudnessEnhancer constructor and UUID in public API
Bug 11356672

Change-Id: Ia3d16712c8b9bb425a587acd87ba7fad6b4ce31c
2013-10-23 15:21:08 -07:00
Adam Powell
d21b70322a am 16f495df: am 11c746ab: am a9412556: Merge "Fix stale data in keyguard transport control display" into klp-dev
* commit '16f495dfa43a9e51e3964511c9d6e5567528587d':
  Fix stale data in keyguard transport control display
2013-10-17 10:41:19 -07:00
Adam Powell
3b435fb2f0 Fix stale data in keyguard transport control display
Make sure that caches are cleared at the right times and views have
their data populated correctly. Also fix a caching issue in
RemoteController.

Bug 11218218

Change-Id: Ieb833b5dc440ccd1b82050f12eb7059a4e0a412f
2013-10-15 19:18:04 -07:00
Eino-Ville Talvala
d38b1302b7 Merge "DO NOT MERGE: Hide new camera API." into klp-dev 2013-10-13 01:50:30 +00:00
Jean-Michel Trivi
59ff7bd243 am 09872a35: am fb059f3c: am 7a6ccb87: Merge "Remote volume changes" into klp-dev
* commit '09872a35cb09fc8dbe97d443d083d6c5b0948b90':
  Remote volume changes
2013-10-11 14:21:10 -07:00
Eino-Ville Talvala
cd92588528 DO NOT MERGE: Hide new camera API.
Not yet ready.

Bug: 11141002

Change-Id: I4704bffb9ba36af47a66dc5b49cbba00be623aae
2013-10-11 19:26:08 +00:00
Jean-Michel Trivi
fca1e60323 Remote volume changes
When the user plays media remotely, and presses on the volume
 keys with the screen off, verify whether not only local playback
 is active, but also if remote playback is active to see if
 the volume should be adjusted.
When adjusting the volume with screen off, adjust the remote
 volume if applicable.

When controlling volume, give priority to local media playback.

Bug 11169862

Change-Id: I88a8c003969177d50d4c1569ec6cd2a7c153a341
2013-10-11 11:36:18 -07:00
Jean-Michel Trivi
cfed3656c0 am f2177bae: am 2d06e69c: am c04337aa: Merge "Make RemoteController weakly referenced by IRemoteControlDisplay" into klp-dev
* commit 'f2177bae2da4c73bb2180efe154b3f7abb615370':
  Make RemoteController weakly referenced by IRemoteControlDisplay
2013-10-09 09:13:39 -07:00
Jean-Michel Trivi
4348a73bbe Make RemoteController weakly referenced by IRemoteControlDisplay
In the RemoteController implementation, the inner class that
 implements the IRemoteControlDisplay interface must have a weak
 link to the RemoteController instance with which it is associated,
 as MediaFocusControl and RemoteControlClient hold a strong
 reference to this binder object in a different remote process.
 Without a weak reference, any object referencing RemoteController
 couldn't be independently garbage collected without a garbage
 collection in the remote process.

Bug 8209392

Change-Id: I29e4274c45249b3cb0d3d89417c69e8fe8f62fc4
2013-10-08 15:42:31 -07:00
Jean-Michel Trivi
f90299dfbc am 47f698b8: am c38c93f4: am 1a1e24f1: Merge "Update RemoteController info when enabling/disabling it" into klp-dev
* commit '47f698b88e8be919f3cc0400fa9f1076c1df037c':
  Update RemoteController info when enabling/disabling it
2013-10-07 17:53:34 -07:00
Jean-Michel Trivi
19566543c4 Update RemoteController info when enabling/disabling it
When a RemoteController listener is disabled: send its listener
 "blank" information (no artist, "stopped state"...)
When a RemoteController listener is enabled: have the current
 RemoteControlClient send the current information.

Bug 8209392

Change-Id: I375bf3c42a425ada94c61453b51669d7e819dde4
2013-10-07 17:10:08 -07:00
Jean-Michel Trivi
49fc2590c1 am 9633629b: am 65d57713: am bacb5422: Merge "Also rely on enabled notification listeners for RemoteController registration" into klp-dev
* commit '9633629b7916b5694ae1bd960b9c08610b47b7aa':
  Also rely on enabled notification listeners for RemoteController registration
2013-10-07 10:15:48 -07:00
Jean-Michel Trivi
bacb5422bc Merge "Also rely on enabled notification listeners for RemoteController registration" into klp-dev 2013-10-07 17:04:20 +00:00
Jean-Michel Trivi
f108cdd9ee Also rely on enabled notification listeners for RemoteController registration
Registration of a RemoteController may succeed only if:
 - the caller has the MEDIA_CONTENT_CONTROL permission,
 - or if the RemoteController.OnClientUpdateListener it
   registers if one of the enabled notification listeners.

For using the "enabled notification listener" functionality,
 the CL involved:
 - making OnClientUpdateListener an interface so a 3rd-party
   application may have its implementation extend
   NotificationListenerService, which is required for a
   listener to be enabled by the user.
 - add the concept of "enabled" status in an
   IRemoteControlDisplay, so a RemoteController (which
   encapsulates the IRemoteControlDisplay implementation)
   may be registered, but later temporarily disabled by
   the user, as a result of a user action in the security
   settings, or a user switch.
 - making MediaFocusControl, the component tied to
   AudioService, monitor changes in enabled notification
   listeners, and act upon enable/disable changes.

Bug 8209392

Change-Id: Ia8dfa2156c65668b2b0d4ae92048005912652d84
2013-10-04 17:50:44 -07:00
Eric Laurent
0272b31b52 am 02f00de8: am 4b292317: am 15bcc2d8: Merge "audioservice: fix DTMF stream volume" into klp-dev
* commit '02f00de89f5173aab94b554c26cba94fe5366f94':
  audioservice: fix DTMF stream volume
2013-10-04 11:10:58 -07:00
Adam Powell
f7ee79b6bf am 3a1abeac: am cf51fefd: am c7c7f5b5: Merge "Fix docs" into klp-dev
* commit '3a1abeac3526bb772d484a16a4110241f6ab090c':
  Fix docs
2013-10-04 11:10:08 -07:00
Adam Powell
5abb64d801 am 91aa6021: am 310796de: am d6239b92: Merge "Add a scrubber to keyguard; layout tweaks" into klp-dev
* commit '91aa6021876e1690ad84ca0b3304ca7b0f925e80':
  Add a scrubber to keyguard; layout tweaks
2013-10-04 11:09:12 -07:00
Eric Laurent
15bcc2d82f Merge "audioservice: fix DTMF stream volume" into klp-dev 2013-10-04 15:18:32 +00:00
Eric Laurent
24e0d9b6c4 audioservice: fix DTMF stream volume
DTMF stream must also be muted by silent mode when following ring
stream volume in order to be properly muted and unmuted when ringer
mode changes.

Also fix a problem in VolumeStreamState.setAllIndexes() when some
devices are not present in the stream state from which indexes
are copied.

Bug: 10932676.
Change-Id: I373d0fd1a475980786d97d97348d46a7e7421461
2013-10-03 18:15:07 -07:00
Adam Powell
70cb8021ef Fix docs
Change-Id: I19e0cdab6c526f7eed376fc2067b5c49b31a3ea9
2013-10-03 16:39:30 -07:00
Adam Powell
f8895248e2 Add a scrubber to keyguard; layout tweaks
Switch KeyguardTransportControlView over to using RemoteController
instead of the internal API.

Guard transition animations behind a flag until we can work out some
intermittent issues.

Change-Id: Ie9f41339ce6e735c5d524db88437672f2c9859e2
2013-10-03 14:55:18 -07:00
Eric Laurent
587b75c3d6 am 4bf36c3e: am 8222f04e: am 0bc0f109: Merge "audioservice: always acquire wake lock as AudioService" into klp-dev
* commit '4bf36c3ecb0294c0bfac04f8d2371b64a0f2f218':
  audioservice: always acquire wake lock as AudioService
2013-10-02 09:43:43 -07:00
Lajos Molnar
06429fba90 am 36c4adf9: am 990615e3: am fcd61bb5: Merge "Fix MediaTimeProvider seek & time drift recovery issue" into klp-dev
* commit '36c4adf9f713602722ebd99c4b44137f6240fca7':
  Fix MediaTimeProvider seek & time drift recovery issue
2013-10-02 09:43:17 -07:00
Jean-Michel Trivi
4c9110fcfc am 13715943: am b4c6b241: Merge "Cache RemoteController artwork bitmap size, use it in registration" into klp-dev
* commit '13715943f24760fbeb462dd601a52af410faac20':
  Cache RemoteController artwork bitmap size, use it in registration
2013-10-01 23:10:49 -07:00
Jean-Michel Trivi
e8e560e061 am db0944de: am 60e7f819: Merge "Improve RemoteControlDisplay registration" into klp-dev
* commit 'db0944de128247e7e6016982a14513b04ac5e6f1':
  Improve RemoteControlDisplay registration
2013-10-01 23:10:46 -07:00
Eric Laurent
0bc0f109df Merge "audioservice: always acquire wake lock as AudioService" into klp-dev 2013-10-01 21:00:10 +00:00