use of android.media.session.MediaSession.QueueItem in project android_frameworks_base by DirtyUnicorns.
the class MediaSessions method dump.
private static void dump(int n, PrintWriter writer, MediaController c) {
writer.println(" Controller " + n + ": " + c.getPackageName());
final Bundle extras = c.getExtras();
final long flags = c.getFlags();
final MediaMetadata mm = c.getMetadata();
final PlaybackInfo pi = c.getPlaybackInfo();
final PlaybackState playbackState = c.getPlaybackState();
final List<QueueItem> queue = c.getQueue();
final CharSequence queueTitle = c.getQueueTitle();
final int ratingType = c.getRatingType();
final PendingIntent sessionActivity = c.getSessionActivity();
writer.println(" PlaybackState: " + Util.playbackStateToString(playbackState));
writer.println(" PlaybackInfo: " + Util.playbackInfoToString(pi));
if (mm != null) {
writer.println(" MediaMetadata.desc=" + mm.getDescription());
}
writer.println(" RatingType: " + ratingType);
writer.println(" Flags: " + flags);
if (extras != null) {
writer.println(" Extras:");
for (String key : extras.keySet()) {
writer.println(" " + key + "=" + extras.get(key));
}
}
if (queueTitle != null) {
writer.println(" QueueTitle: " + queueTitle);
}
if (queue != null && !queue.isEmpty()) {
writer.println(" Queue:");
for (QueueItem qi : queue) {
writer.println(" " + qi);
}
}
if (pi != null) {
writer.println(" sessionActivity: " + sessionActivity);
}
}
use of android.media.session.MediaSession.QueueItem in project android_frameworks_base by DirtyUnicorns.
the class PlayerSession method setIcon.
public void setIcon(Bitmap icon) {
mMetadataBuilder.putBitmap(MediaMetadata.METADATA_KEY_DISPLAY_ICON, icon);
mQueue.clear();
mQueue.add(new QueueItem(mMetadataBuilder.build().getDescription(), 11));
updateMetadata();
}
use of android.media.session.MediaSession.QueueItem in project android_frameworks_base by ResurrectionRemix.
the class MediaSessions method dump.
private static void dump(int n, PrintWriter writer, MediaController c) {
writer.println(" Controller " + n + ": " + c.getPackageName());
final Bundle extras = c.getExtras();
final long flags = c.getFlags();
final MediaMetadata mm = c.getMetadata();
final PlaybackInfo pi = c.getPlaybackInfo();
final PlaybackState playbackState = c.getPlaybackState();
final List<QueueItem> queue = c.getQueue();
final CharSequence queueTitle = c.getQueueTitle();
final int ratingType = c.getRatingType();
final PendingIntent sessionActivity = c.getSessionActivity();
writer.println(" PlaybackState: " + Util.playbackStateToString(playbackState));
writer.println(" PlaybackInfo: " + Util.playbackInfoToString(pi));
if (mm != null) {
writer.println(" MediaMetadata.desc=" + mm.getDescription());
}
writer.println(" RatingType: " + ratingType);
writer.println(" Flags: " + flags);
if (extras != null) {
writer.println(" Extras:");
for (String key : extras.keySet()) {
writer.println(" " + key + "=" + extras.get(key));
}
}
if (queueTitle != null) {
writer.println(" QueueTitle: " + queueTitle);
}
if (queue != null && !queue.isEmpty()) {
writer.println(" Queue:");
for (QueueItem qi : queue) {
writer.println(" " + qi);
}
}
if (pi != null) {
writer.println(" sessionActivity: " + sessionActivity);
}
}
Aggregations