diff options
author | RoboErik <epastern@google.com> | 2014-05-02 20:07:07 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-05-02 20:07:07 +0000 |
commit | 4f854e0d0b619596752b1874492efe2dabcc092b (patch) | |
tree | 4452921cfc09431c95a81836c7bcec730dcd2bc0 /services | |
parent | 9529d8f26fc635ed8742ed212a967f069c8e47c7 (diff) | |
parent | 66dea73906f24226a6f699759e79040726bde8b5 (diff) | |
download | frameworks_base-4f854e0d0b619596752b1874492efe2dabcc092b.zip frameworks_base-4f854e0d0b619596752b1874492efe2dabcc092b.tar.gz frameworks_base-4f854e0d0b619596752b1874492efe2dabcc092b.tar.bz2 |
Merge "Add playback state and metadata to dump"
Diffstat (limited to 'services')
-rw-r--r-- | services/core/java/com/android/server/media/MediaSessionRecord.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/media/MediaSessionRecord.java b/services/core/java/com/android/server/media/MediaSessionRecord.java index ab2a723..3dc17fc 100644 --- a/services/core/java/com/android/server/media/MediaSessionRecord.java +++ b/services/core/java/com/android/server/media/MediaSessionRecord.java @@ -238,6 +238,8 @@ public class MediaSessionRecord implements IBinder.DeathRecipient { pw.println(indent + "transport controls enabled=" + mTransportPerformerEnabled); pw.println(indent + "rating type=" + mRatingType); pw.println(indent + "controllers: " + mControllerCallbacks.size()); + pw.println(indent + "state=" + mPlaybackState.toString()); + pw.println(indent + "metadata:" + getShortMetadataString()); pw.println(indent + "route requests {"); int size = mRequests.size(); for (int i = 0; i < size; i++) { @@ -249,6 +251,13 @@ public class MediaSessionRecord implements IBinder.DeathRecipient { pw.println(indent + "params=" + (mRequest == null ? null : mRequest.toString())); } + private String getShortMetadataString() { + int fields = mMetadata == null ? 0 : mMetadata.size(); + String title = mMetadata == null ? null : mMetadata + .getString(MediaMetadata.METADATA_KEY_TITLE); + return "size=" + fields + ", title=" + title; + } + private void onDestroy() { mService.destroySession(this); } |