diff options
author | RoboErik <epastern@google.com> | 2014-05-19 18:18:12 -0700 |
---|---|---|
committer | RoboErik <epastern@google.com> | 2014-05-20 14:00:53 -0700 |
commit | 5f31737c68f7709cb75a8fefb7536daa77812cc3 (patch) | |
tree | 20208960790e925effb594d49720585411002f4d /media | |
parent | b19c19265448a6252b1c14f3da85d52e50be34c3 (diff) | |
download | frameworks_base-5f31737c68f7709cb75a8fefb7536daa77812cc3.zip frameworks_base-5f31737c68f7709cb75a8fefb7536daa77812cc3.tar.gz frameworks_base-5f31737c68f7709cb75a8fefb7536daa77812cc3.tar.bz2 |
Add getMediaSession to RCC
This is to make integration with Media notifications easier.
Change-Id: I783ae5c2620ff0e11bf5584604b9c9623850e2f0
Diffstat (limited to 'media')
-rw-r--r-- | media/java/android/media/RemoteControlClient.java | 13 |
1 files changed, 13 insertions, 0 deletions
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 |