Methods Summary |
---|
public static java.lang.Object | createCallback(android.support.v4.media.session.MediaSessionCompatApi21$Callback callback)
return new CallbackProxy<Callback>(callback);
|
public static java.lang.Object | createSession(android.content.Context context, java.lang.String tag)
return new MediaSession(context, tag);
|
public static android.os.Parcelable | getSessionToken(java.lang.Object sessionObj)
return ((MediaSession)sessionObj).getSessionToken();
|
public static boolean | isActive(java.lang.Object sessionObj)
return ((MediaSession)sessionObj).isActive();
|
public static void | release(java.lang.Object sessionObj)
((MediaSession)sessionObj).release();
|
public static void | sendSessionEvent(java.lang.Object sessionObj, java.lang.String event, android.os.Bundle extras)
((MediaSession)sessionObj).sendSessionEvent(event, extras);
|
public static void | setActive(java.lang.Object sessionObj, boolean active)
((MediaSession)sessionObj).setActive(active);
|
public static void | setCallback(java.lang.Object sessionObj, java.lang.Object callbackObj, android.os.Handler handler)
((MediaSession) sessionObj).setCallback((MediaSession.Callback) callbackObj, handler);
|
public static void | setExtras(java.lang.Object sessionObj, android.os.Bundle extras)
((MediaSession) sessionObj).setExtras(extras);
|
public static void | setFlags(java.lang.Object sessionObj, int flags)
((MediaSession)sessionObj).setFlags(flags);
|
public static void | setMediaButtonReceiver(java.lang.Object sessionObj, android.app.PendingIntent pi)
((MediaSession) sessionObj).setMediaButtonReceiver(pi);
|
public static void | setMetadata(java.lang.Object sessionObj, java.lang.Object metadataObj)
((MediaSession)sessionObj).setMetadata((MediaMetadata)metadataObj);
|
public static void | setPlaybackState(java.lang.Object sessionObj, java.lang.Object stateObj)
((MediaSession)sessionObj).setPlaybackState((PlaybackState)stateObj);
|
public static void | setPlaybackToLocal(java.lang.Object sessionObj, int stream)
// TODO update APIs to use support version of AudioAttributes
AudioAttributes.Builder bob = new AudioAttributes.Builder();
bob.setLegacyStreamType(stream);
((MediaSession) sessionObj).setPlaybackToLocal(bob.build());
|
public static void | setPlaybackToRemote(java.lang.Object sessionObj, java.lang.Object volumeProviderObj)
((MediaSession)sessionObj).setPlaybackToRemote((VolumeProvider)volumeProviderObj);
|
public static void | setQueue(java.lang.Object sessionObj, java.util.List queueObjs)
if (queueObjs == null) {
((MediaSession) sessionObj).setQueue(null);
return;
}
ArrayList<MediaSession.QueueItem> queue = new ArrayList<MediaSession.QueueItem>();
for (Object itemObj : queueObjs) {
queue.add((MediaSession.QueueItem) itemObj);
}
((MediaSession) sessionObj).setQueue(queue);
|
public static void | setQueueTitle(java.lang.Object sessionObj, java.lang.CharSequence title)
((MediaSession) sessionObj).setQueueTitle(title);
|
public static void | setSessionActivity(java.lang.Object sessionObj, android.app.PendingIntent pi)
((MediaSession) sessionObj).setSessionActivity(pi);
|
public static java.lang.Object | verifySession(java.lang.Object mediaSession)
if (mediaSession instanceof MediaSession) {
return mediaSession;
}
throw new IllegalArgumentException("mediaSession is not a valid MediaSession object");
|
public static java.lang.Object | verifyToken(java.lang.Object token)
if (token instanceof MediaSession.Token) {
return token;
}
throw new IllegalArgumentException("token is not a valid MediaSession.Token object");
|