Add getMediaSession to RCC
This is to make integration with Media notifications easier. Change-Id: I783ae5c2620ff0e11bf5584604b9c9623850e2f0
This commit is contained in:
@@ -406,6 +406,19 @@ public class RemoteControlClient
|
||||
mSession = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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,
|
||||
|
||||
Reference in New Issue
Block a user