diff options
author | RoboErik <epastern@google.com> | 2014-05-20 21:02:18 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-05-20 21:02:18 +0000 |
commit | 23a42810e341fbc7444bcab4a61279d879e0c610 (patch) | |
tree | c67f0fbcbcf22b8eec467eb28c3ebddd36e5b637 | |
parent | b86b1027a3274dc13a1025ae8ad74157483f7f65 (diff) | |
parent | 5f31737c68f7709cb75a8fefb7536daa77812cc3 (diff) | |
download | frameworks_base-23a42810e341fbc7444bcab4a61279d879e0c610.zip frameworks_base-23a42810e341fbc7444bcab4a61279d879e0c610.tar.gz frameworks_base-23a42810e341fbc7444bcab4a61279d879e0c610.tar.bz2 |
Merge "Add getMediaSession to RCC"
-rw-r--r-- | api/current.txt | 1 | ||||
-rw-r--r-- | media/java/android/media/RemoteControlClient.java | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/api/current.txt b/api/current.txt index 9ac27db..a620727 100644 --- a/api/current.txt +++ b/api/current.txt @@ -14979,6 +14979,7 @@ package android.media { ctor public RemoteControlClient(android.app.PendingIntent); ctor public RemoteControlClient(android.app.PendingIntent, android.os.Looper); method public android.media.RemoteControlClient.MetadataEditor editMetadata(boolean); + method public android.media.session.MediaSession getMediaSession(); method public void setMetadataUpdateListener(android.media.RemoteControlClient.OnMetadataUpdateListener); method public void setOnGetPlaybackPositionListener(android.media.RemoteControlClient.OnGetPlaybackPositionListener); method public void setPlaybackPositionUpdateListener(android.media.RemoteControlClient.OnPlaybackPositionUpdateListener); diff --git a/media/java/android/media/RemoteControlClient.java b/media/java/android/media/RemoteControlClient.java index 37f45c2..26ae3cc 100644 --- a/media/java/android/media/RemoteControlClient.java +++ b/media/java/android/media/RemoteControlClient.java @@ -407,6 +407,19 @@ public class RemoteControlClient } /** + * Get a {@link MediaSession} associated with this RCC. It will only have a + * session while it is registered with + * {@link AudioManager#registerRemoteControlClient}. The session returned + * should not be modified directly by the application but may be used with + * other APIs that require a session. + * + * @return A media session object or null. + */ + public MediaSession getMediaSession() { + return mSession; + } + + /** * Class used to modify metadata in a {@link RemoteControlClient} object. * Use {@link RemoteControlClient#editMetadata(boolean)} to create an instance of an editor, * on which you set the metadata for the RemoteControlClient instance. Once all the information |