History log of /frameworks/base/media/java/android/media/RemoteControlClient.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
d4de20df2a1e57d22db7c538b197e3db18eaaa7d 04-Nov-2015 Jean-Michel Trivi <jmtrivi@google.com> AudioService: remove dead code

Remove dead code related to media button event receiver and
remote control display, now handled by MediaSession*

Change-Id: I4bd621240ddddf4df079df8d551c72b232c3301d
/frameworks/base/media/java/android/media/RemoteControlClient.java
08c7116ab9cd04ad6dd3c04aa1017237e7f409ac 28-Feb-2015 John Spurlock <jspurlock@google.com> Remove unused imports in frameworks/base.

Change-Id: I031443de83f93eb57a98863001826671b18f3b17
/frameworks/base/media/java/android/media/RemoteControlClient.java
38696ba77d7f614cb50672aaca99f7ba59b56126 20-Oct-2014 RoboErik <epastern@google.com> Set the metadata rating correctly in RCC

We weren't setting the ratings in the new MediaMetadata from RCC.
This adds some code to set them correctly.

bug:18051829
Change-Id: I358eeb2b25b3fb9bd9a5d207eb3314bb2cdff25e
/frameworks/base/media/java/android/media/RemoteControlClient.java
51c07bc0bf338c9dd9d2345fe81d2cd964d680ca 03-Oct-2014 RoboErik <epastern@google.com> Fix regression in RCC.editMetadata(false)

Found a very simple fix. Just set the cached metadata so we have
it to copy over when editMetadata(false) is called.

bug:17796693
Change-Id: Ib27f0c3d28e7f2a3c7d9495697f36c8045e2bcf6
/frameworks/base/media/java/android/media/RemoteControlClient.java
6c30ff976dc6b49186c162ecbae08eb571a6b9f1 21-Aug-2014 RoboErik <epastern@google.com> Always set transport control flags

In case we're attaching to a pre-existing session with non-zero flags.

bug:16822064
Change-Id: Ibd5cc8e00de59f1fe30fc3d0e64741aaf9f4746f
/frameworks/base/media/java/android/media/RemoteControlClient.java
93b466253103eea22690d90a1ada7e77969a6ea1 21-Aug-2014 RoboErik <epastern@google.com> Set transport control flags when a session is created

Some apps only set the transport control flags once when their service
starts. This was leading to them not getting set when a session is
created on their behalf in RCC. This sets the flags when a session
is created if needed.

bug:16822064
Change-Id: Iea1ebf7747b3059101eb3c36b143b594cc51e114
/frameworks/base/media/java/android/media/RemoteControlClient.java
477d1197c3c25c01ace7ea4494437c23720a2eb3 06-Aug-2014 RoboErik <epastern@google.com> Combine MediaSession Callback and TransportControlsCallback

This combines them into a single Callback class and adds default
handling to media buttons to check the available actions and call
one of the other methods if appropriate.

Change-Id: If9897d8cf6d8d8046aa85a646c22382f1db1461b
/frameworks/base/media/java/android/media/RemoteControlClient.java
75847b98f39e521a57042c50e69be9e142788d32 29-Jul-2014 RoboErik <epastern@google.com> Add display metadata and change strings to CharSequences

This adds some fields for display purposes to MediaMetadata and also
makes the default for all text CharSequence instead of String. Also
adds a hidden method for getting a Description for the metadata.

bug: 11708293
Change-Id: I0ed58d9ac3aeff41325c4ccf5fed0539bbf03b4d
/frameworks/base/media/java/android/media/RemoteControlClient.java
f364f944962c4ec66f5e5b33dafe8480f38f6db6 22-Jul-2014 Gabriel Peal <gpeal@google.com> Added Action to PlaybackState

Added the ability to discover MediaBrowsers

Change-Id: I925c8738ac73afd0bee3dada2ee7ff2d5047e63f
/frameworks/base/media/java/android/media/RemoteControlClient.java
edb158f55f48a1f7b2cbf30ddec9b8917dc9a619 18-Jul-2014 RoboErik <epastern@google.com> Deprecate apis that were replaced by sessions

These classes all have new components in the session APIs.

bug:16218444
Change-Id: Ib64ff0e23503e4c9eb2fd9162a878e1eaba7c4df
/frameworks/base/media/java/android/media/RemoteControlClient.java
c785a78fb483fe54012175c53d3758b2412de7b9 14-Jul-2014 RoboErik <epastern@google.com> Make PlaybackState immutable with a builder

bug:15862252
Change-Id: I51f2e466bd2c41bbe80d20aa9785126a7ac6ab3f
/frameworks/base/media/java/android/media/RemoteControlClient.java
b2e93efcac593f5f27722219b274bd0fa5c1b0fe 11-Jul-2014 Erik Pasternak <roboerik@android.com> Revert "Make PlaybackState immutable with a builder"

Will resubmit tomorrow for Build Breakage Friday as this change needs new SDK prebuilts for unbundled app branches.

This reverts commit aa746b27610680a2c0fbdf7d81a6455c4597f05e.

Change-Id: I28ba7e1b09234a5eb1b725aed043b9de98e1bc16
/frameworks/base/media/java/android/media/RemoteControlClient.java
5a4e01114361b7dad4fc5465b4da00fd444fc098 09-Jul-2014 RoboErik <epastern@google.com> Make PlaybackState immutable with a builder

bug:15862252
Change-Id: I8944b7753cd6a36a74b0091f71a386f77040c4ab
/frameworks/base/media/java/android/media/RemoteControlClient.java
430fc48865e5a371b08f180390946b96d73848fe 13-Jun-2014 RoboErik <epastern@google.com> Work on removing non-session media routing code

Change-Id: I73e7d22f2f8772c7b07ccf32d962161d79d5db74
/frameworks/base/media/java/android/media/RemoteControlClient.java
c47fa84b0a6bda48c38ba8822481ce613bafd019 29-May-2014 RoboErik <epastern@google.com> Refactor transport controls APIs

This merges TransportPerformer into MediaSession + a
TransportControlsCallback and makes TransportController into an
inner class on MediaController called TransportControls. Also makes
the PlaybackState and Metadata part of the session APIs instead of
transport controls.

Change-Id: I16ad392e6d318abe3119ad5d89656d253af25e16
/frameworks/base/media/java/android/media/RemoteControlClient.java
79fa4630bbca7c6c251eea99fe8997e4b45becee 28-May-2014 RoboErik <epastern@google.com> API changes to sessions

Changes requested by API Council review. A second CL will refactor
TransportController and TransportPerformer based on feedback.

Change-Id: Ie26a7d01d7021232a66c2edf1eb58120437fdfde
/frameworks/base/media/java/android/media/RemoteControlClient.java
5f31737c68f7709cb75a8fefb7536daa77812cc3 20-May-2014 RoboErik <epastern@google.com> Add getMediaSession to RCC

This is to make integration with Media notifications easier.

Change-Id: I783ae5c2620ff0e11bf5584604b9c9623850e2f0
/frameworks/base/media/java/android/media/RemoteControlClient.java
42ea7eecd149161ed192d3029f0d77d1d08a4aa5 17-May-2014 RoboErik <epastern@google.com> Rename session classes to have media prefix, hide routes

This renames several of the core session classes to be prefixed
with Media. It also adds @hide to all route references for now.

Change-Id: Idb42897d490cf24626e4e93ca975b2cb93ec054c
/frameworks/base/media/java/android/media/RemoteControlClient.java
f1372428f2df781c71c71caa2f6a4db6f847cf10 23-Apr-2014 RoboErik <epastern@google.com> Add Session API calls to RCC and AudioManager

This makes RCC and MediaButtonReceiver (via AudioManager) also use the new Session APIs in parallel to their existing code. This will allow us to bring up the Session compatibility pieces without disrupting the old behavior and then switch everything over to just using the new APIs when ready.

Change-Id: I33ce0a044dea3ec763f2302b91a5e415be27d4a4
/frameworks/base/media/java/android/media/RemoteControlClient.java
6090995951c6e2e4dcf38102f01793f8a94166e1 19-Nov-2013 John Spurlock <jspurlock@google.com> Remove unused imports from frameworks/base.

Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
/frameworks/base/media/java/android/media/RemoteControlClient.java
f108cdd9ee5efe354d87edd02a07b323298c116c 28-Sep-2013 Jean-Michel Trivi <jmtrivi@google.com> 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
/frameworks/base/media/java/android/media/RemoteControlClient.java
f8895248e2ac4dbb46622f3e04c7256f03175b4f 01-Oct-2013 Adam Powell <adamp@google.com> 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
/frameworks/base/media/java/android/media/RemoteControlClient.java
86142da1ce8c1341404a9f9e21be8acbcba69ab3 29-Sep-2013 Jean-Michel Trivi <jmtrivi@google.com> Improve RemoteControlDisplay registration

When a new RemoteControlDisplay gets registered, don't cause all
existing RemoteControlDisplays to re-receive RemoteControl
information they already have.

Bug 8417073

Change-Id: Icc8e7104d6870f748fddd702692789dbaef948ac
/frameworks/base/media/java/android/media/RemoteControlClient.java
f841d70155c991b6cf728dd41e6d37e051be453d 18-Sep-2013 Jean-Michel Trivi <jmtrivi@google.com> Fix javadoc in RemoteControlClient and MediaMetadataEditor

Change-Id: Ibd333d9cb47e74c4ca1d8ec7bd950224d81783b0
/frameworks/base/media/java/android/media/RemoteControlClient.java
7ddd226e7c6e759feaf2747a90be1cc06acf37a3 02-Sep-2013 Jean-Michel Trivi <jmtrivi@google.com> RemoteController class to expose IRemoteControlDisplay features

Wrap all the features of IRemoteControlDisplay.aidl in a
new class, RemoteController, that implements the
IRemoteControlDisplay interface.

The API functions to expose in the SDK are tagged with
"CANDIDATE FOR API"

Bug 8209392

Change-Id: I597bcd503ac93e73889c9ae8b47b16c4fcb363bc
/frameworks/base/media/java/android/media/RemoteControlClient.java
88183e67d4628e8c8a3310af0076b6f33f955cb2 07-Sep-2013 Jean-Michel Trivi <jmtrivi@google.com> Revise new public API for ratings in RemoteControlClient

Refactor RemoteControlClient.MetadataEditor to move functionality
in new abstract class MediaMetadataEditor, so it can be also
used on the "display" side of the RemoteControl functionality.
Compatibility of these changes has been tested against
existing Play applications which use the RemoteControlClient API.

Move the new constants and method definitions related to the
ratings feature to MediaMetadataEditor. This changes the
yet-to-be-published ratings API, so this doesn't break
compatibility.
Rating feature is handled by the new Rating class with a set
of constructors that handle the different rating models.

Bug 8440498

Change-Id: I9b6dc2204bfc48594bad5cd6449d357f8a485da0
/frameworks/base/media/java/android/media/RemoteControlClient.java
b23cd118ce3339589fffd40ecf1aa9c5816b3438 27-Aug-2013 Jean-Michel Trivi <jmtrivi@google.com> Public API for RemoteControlClient ratings and editable metadata

A rating for RemoteControlClient content is:
- a value between 0 and 100
- or a value indicating there is no rating
For a same piece of content, a rating can come from:
- the user
- "others" (i.e. not the user), to provide an average rating
Rating styles are:
- heart (a toggle)
- thumb up / down
- stars (with a configurable maximum number of stars)

For editable metadata, add:
- methods to control which keys can be edited,
- interface for an application to receive new values for a key.

Rating by user is editable metadata.

Bug 8440498

Change-Id: Ia9f61e750772658051cea1ac7c316187717f0f58
/frameworks/base/media/java/android/media/RemoteControlClient.java
22e3eb64bfb97a32c31be3cb4641b92ecb8400ac 26-Aug-2013 Jean-Michel Trivi <jmtrivi@google.com> "Year" is an authorized metadate long field.

MediaMetadataRetriever.METADATA_KEY_YEAR is listed as one of the
supported long fields but is not declared in the list of authorized
long keys.

Change-Id: If277f0c300e2bfed10472e23a2eeba08bfa6ed33
/frameworks/base/media/java/android/media/RemoteControlClient.java
f823fc4dba2df5cf5f00e13361f2db93c81f6961 20-Aug-2013 Jean-Michel Trivi <jmtrivi@google.com> Ratings for RemoteControl

Add support for metadata of a RemoteControlClient that can be
updated:
- methods to control which keys can be edited,
- interface for an application to receive new values for a key.

Add definitions for ratings.
A rating is:
- a value between 0 and 100
- or a value indicating there is no rating
For a same piece of content, a rating can come from:
- the user
- "others" (i.e. not the user), to provide an average rating
Rating styles are:
- heart (a toggle)
- thumb up / down
- stars (with a configurable maximum number of stars)

Rating by user is editable metadata.

Bug 8440498

Change-Id: I1d45972f9ace4cb505ee0757e917f1d5dedd264e
/frameworks/base/media/java/android/media/RemoteControlClient.java
1b16cc3de51d69c8027cefcc70a084a5b2d7a3d0 08-Jun-2013 Jean-Michel Trivi <jmtrivi@google.com> Let RemoteControlDisplay know more about playback position

The BT stack needs to differentiate between applications that use
the new RemoteControlClient APIs to pass a playback position but
don't have one yet, and applications that use the legacy API and
will never pass a position.

Bug 9294855

Change-Id: I05cba82a073e6e0aaea1d8bbf9cc8c99da715f58
/frameworks/base/media/java/android/media/RemoteControlClient.java
c3c4babf8424f65b3d3d2700f60fae6e94e9cd00 19-Apr-2013 Jean-Michel Trivi <jmtrivi@google.com> Opt-in mechanism for RemoteControlClient position anti-drift check

RemoteControlClient has an interface for the framework to query
the playback position. This mechanism is used to detect
when the estimated position drifts from the real position by
having the framework regularly poll (every 15s when playing at
1x) this interface and compare against the estimation.
But this mechanism:
- should only be used when IRemoteControlDisplay implementation
care about position display
- should not be used by default because the implementation of
the position query interface might involve network traffic
in some remote media player implementation for instance.

This CL implements an opt-in mechanism to be used by
implementators of IRemoteControlDisplay, to request the
anti-drift mechanism to be turned on.

bug 8120740

Change-Id: I1baa3e515546ac41e0ac9c3a41bfa3147ecf3d7f
/frameworks/base/media/java/android/media/RemoteControlClient.java
521e68e76cfdcf297d0de056032dc142d4939fa0 17-Apr-2013 Jean-Michel Trivi <jmtrivi@google.com> Anti-drift in RCC playback position

Periodically verify that the reported playback position hasn't
drifted from the estimated playback position.
If a drift is noticed, re-synchronize registered
IRemoteControlDisplay implementations.

bug 8120740

Note that this implementation updates the playback position
of all IRemoteControlDisplay implementations,
and always causes the OnGetPlaybackPositionListener to be
called. This might be undesirable in some circumstances
and will be addressed in a subsequent CL.

Change-Id: Ib9f40e1b000e912f6c35fa03e41adf81efadc894
/frameworks/base/media/java/android/media/RemoteControlClient.java
05e7c2ff8cd6b6386d8c553995c2d12075833e4a 17-Apr-2013 Jean-Michel Trivi <jmtrivi@google.com> Fix message handling in RemoteControlClient

Internal message must go through the message queue, not be
dispatched immediately.
Missing 'break' when handling MSG_SEEK_TO message.
This was spamming the log with fake error messages.

Bug 8120740

Change-Id: Ib53ec05ef33133637e587eb1b24dac9ea32a5680
/frameworks/base/media/java/android/media/RemoteControlClient.java
e63b0609c3b5f6c21d4e006ee9ddd3ba98a4e684 15-Apr-2013 Scott Main <smain@google.com> fix javadoc build

Change-Id: I9b86dda5aea075832d5e165043f45c8d507b5c16
/frameworks/base/media/java/android/media/RemoteControlClient.java
915747730060dff71b5b2ca7e4ee4073024fc24e 11-Apr-2013 Jean-Michel Trivi <jmtrivi@google.com> Public APIs for media position in RemoteControlClient

New APIs in android.media.RemoteControlClient to support application
exposing their current media playback position and speed, and
let the framework request position changes.

Bug 8120740

Change-Id: Ibfc41f60e279413c26147e3276d96f28b7f506e7
/frameworks/base/media/java/android/media/RemoteControlClient.java
3fbf67e217fb489fe7318a9e43d8ae86646eb4cc 09-Apr-2013 Jean-Michel Trivi <jmtrivi@google.com> Handle seek requests in AudioService

AudioService handles seek requests to RemoteControlClients.
Discard old or unprocessed seek requests when handling a new one.
Update javadoc for OnPlaybackPositionUpdateListener interface.

bug 8120740

Change-Id: Id17c2852b24d4b8af85e472a177484b98cfeba05
/frameworks/base/media/java/android/media/RemoteControlClient.java
3261b537c5fdec824575a1f6ad6d8942715e82e2 01-Apr-2013 Jean-Michel Trivi <jmtrivi@google.com> RemoteControlClient receives playback position change requests

RemoteControlClient defines two listener interfaces for playback
position, one to let the framework query the current playback
position, the other to request playback to seek to a given
position.

Updated IRemoteControlDisplay interface to support passing info
about whether the user of RemoteControlClient can provide a
playback position, and receive a new one.
Updated implementations of IRemoteControlDisplay to new
interface.

Bug 8120740

Change-Id: I1a5a969da4d0f8c9ad27f691919dd08f8653982b
/frameworks/base/media/java/android/media/RemoteControlClient.java
bc43b4c2f24fd03c0d0546895c97918c1736d9fb 22-Mar-2013 Jean-Michel Trivi <jmtrivi@google.com> RemoteControlClient can report current position, speed

Extend RemoteControlClient class to support reporting the
current playback position, and the playback speed.
Define listener for an application to receive new playback
position to seek to (use of listener to be implemented).
Update IRemoteControlDisplay implementations to new interface.

bug 8120740

Change-Id: I2654daeca1ac49713d325df8226dceb85943c020
/frameworks/base/media/java/android/media/RemoteControlClient.java
4a5700556191c835116ec2a6997a4f16f464ac9d 04-Mar-2013 Jean-Michel Trivi <jmtrivi@google.com> Support multiple IRemoteControlDisplay

Modify RemoteControlClient and AudioService to support multiple
simulataneous IRemoteControlDisplay interfaces active at the
same time.

Change-Id: I9f200a488afdd62a5e6957e64624d745e0f28149
/frameworks/base/media/java/android/media/RemoteControlClient.java
f98de1e8dd6dcbd191921b4aa07a1d41b0b9db91 20-Jun-2012 Jean-Michel Trivi <jmtrivi@google.com> 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
/frameworks/base/media/java/android/media/RemoteControlClient.java
1357012968f9066ea3051d83995e9bac69526c3c 19-Jun-2012 Jean-Michel Trivi <jmtrivi@google.com> 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
/frameworks/base/media/java/android/media/RemoteControlClient.java
3114ce3861f20f9a5c2c59dd2629197a1f4874a8 12-Jun-2012 Jean-Michel Trivi <jmtrivi@google.com> 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
/frameworks/base/media/java/android/media/RemoteControlClient.java
05c66cc5cc6357be19fdef0fc131731368c38646 04-Jun-2012 Jack Palevich <jackpal@google.com> Don't crash when scaling Bitmaps with private Bitmap.Configs

Bug: 6526197
Change-Id: I89f008f90888f0a679274c00293342ab0fb0e28e
/frameworks/base/media/java/android/media/RemoteControlClient.java
30c918ce7fbe171944b28fc91b3f22b3d631872d 11-Nov-2011 Glenn Kasten <gkasten@google.com> Use final on new member variables

Use final for member fields initialized to a new and that are never modified.

Change-Id: I042352c7bc21879613e7a50b1205b6923f8083cf
/frameworks/base/media/java/android/media/RemoteControlClient.java
ad87f5b40f2a3fd2d506dc15e00b8af28a8fa2ba 11-Oct-2011 Jean-Michel Trivi <jmtrivi@google.com> Fix 5389442 RemoteControlClient javadoc

Extend RemoteControlClient class description with an example
of instance creation showing how the PendingIntent is created
and how it uses the same ComponentName as the one used
in AudioManager.registerMediaButtonEventReceiver()

Change-Id: If8f050f94b112f9680ba6bf32ba622bc648fb1d0
/frameworks/base/media/java/android/media/RemoteControlClient.java
68622396b62f9084781add1e12f4d513b633ab54 19-Sep-2011 Jean-Michel Trivi <jmtrivi@google.com> Bug 5045498 Keep track of RemoteControlClient play state change time

Store the time at which a RemoteControlClient changes it playback
state, and send that time to the IRemoteControlDisplay.
This change will enable displays to implement strategies such as
timeouts (e.g. to not display transport controls for clients which have
been paused or stopped for a certain amount of time).

Change-Id: I902882500565743d455d56f6000efaf612cbe0a9
/frameworks/base/media/java/android/media/RemoteControlClient.java
f0cff0456258478ba768097f73d4367ab67fd7a3 15-Sep-2011 Jean-Michel Trivi <jmtrivi@google.com> Bug 5300223 RemoteControlClient uses PendingIntent for media button events

Update the implementation of the RemoteControlClient / Display
feature rely on PendingIntent as provided in the construction
of the RemoteControlClient instance.
The ComponentName that describes the target of the media button
events is set as the target of the Intent from which
a PendingIntent is constructed.
This ComponentName is still saved in the stack for persisting
the last media button event receiver.

This CL also updates the lockscreen IRemoteControlDisplay
implementation to use the PendingIntent supplied by the
application when sending transport control events. A (good)
side effect of doing this is that intent will be directly
targeted at the application.

Restoration of the media button event receiver
after reboot is not fully functional yet.

Change-Id: I2be82f2839e9dee1de02512437b3fb41cc386cde
/frameworks/base/media/java/android/media/RemoteControlClient.java
34d0d300cac645b48cce5a1735f45e1102d4ef0e 16-Sep-2011 Jean-Michel Trivi <jmtrivi@google.com> Fix bug 5327199 Recycle bitmaps in RemoteControlClient

When applying the new bitmap from the editor to the client,
recycle the old bitmap, and set the reference to the editor
bitmap to null.

Change-Id: I7d79e4b8410e5035fa51b20be4b1ada391c84c28
/frameworks/base/media/java/android/media/RemoteControlClient.java
6e920e6dac11c3ebf6c0c19402934834e9e491bf 14-Sep-2011 Jean-Michel Trivi <jmtrivi@google.com> Bug 5300223 RemoteControlClient uses PendingIntent

API change so RemoteControlClient is given a PendingIntent in
its constructor, which will be used for receiving media button
events from remote controls.
Leave the old constructors (but hidden) to not break
current functionality until the AudioManager and AudioService
implementations have been updated.

Change-Id: Ifa12c8036c948931adc386a827dce2936788e1cd
/frameworks/base/media/java/android/media/RemoteControlClient.java
466ade5ad66e7bfb1814d5e5ac76a17f8a0bcd3a 01-Sep-2011 Jean-Michel Trivi <jmtrivi@google.com> Fix bug 5045498 Unhide Remote Control Client API

The RemoteControlClient API enables media application to have
information such as album art, current song, playback state
be displayed on "remote control displays", as well as be
controlled by "remote controls".
The new API consists in:
- a new class, RemoteControlClient
- new methods in AudioManager to register a RemoteControlClient
- a new class, RemoteControlClient.MetadataEditor to edit and
apply the information associated with a RemoteControlClient,
and which will be displayed on a "remote control display"

Change-Id: I5616085e4ad58ce0bbc1a5953b0a5a28d32f8703
/frameworks/base/media/java/android/media/RemoteControlClient.java
5ad4b9fb96089e460902ffac9f3649366afd3750 31-Aug-2011 Jean-Michel Trivi <jmtrivi@google.com> RemoteControlClient metadata: add method for metadata of long type

Update to the RemoteControlClient.Editor API:
- new method for setting metadata of type long
- methods for setting metadata throw an exception if using
the wrong key with the wrong method.

Note that this change will cause the Music2 application to
throw an exception when it tries to set the duration as a string.

Change-Id: I17cff86467851a0aff313c07653e752ae6b6180f
/frameworks/base/media/java/android/media/RemoteControlClient.java
7309c83b95b36eac141680158df70ac1ce02a160 27-Aug-2011 Jean-Michel Trivi <jmtrivi@google.com> 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
/frameworks/base/media/java/android/media/RemoteControlClient.java
6e679d5a53091b348a2cdc0c76f4e8fa4ac52d4b 26-Aug-2011 Jean-Michel Trivi <jmtrivi@google.com> 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
/frameworks/base/media/java/android/media/RemoteControlClient.java
44413e5b514a91806a4bb4c7780029ea43be6f81 24-Aug-2011 Jean-Michel Trivi <jmtrivi@google.com> 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
/frameworks/base/media/java/android/media/RemoteControlClient.java
4da5eeffc92331b958eeb111aa2f3d938083954e 24-Aug-2011 Jean-Michel Trivi <jmtrivi@google.com> 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
/frameworks/base/media/java/android/media/RemoteControlClient.java
4426e42ac6107bf6b09f7c4cdad39eb161d8b9ca 19-Aug-2011 Jean-Michel Trivi <jmtrivi@google.com> 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
/frameworks/base/media/java/android/media/RemoteControlClient.java
178889eff7fa3361a5cb08d6d43846a1baf5216b 16-Aug-2011 Jean-Michel Trivi <jmtrivi@google.com> Bug 5045498 RemoteControlClient interface

Define a RemoteControlClient interface that applications must
implement and register to be displayed on the lockscreen.

Change-Id: I67276ae653f203e76727432231f1d76535c31942
/frameworks/base/media/java/android/media/RemoteControlClient.java