summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorRoboErik <epastern@google.com>2014-05-01 16:03:59 -0700
committerRoboErik <epastern@google.com>2014-05-01 16:16:00 -0700
commit66dea73906f24226a6f699759e79040726bde8b5 (patch)
tree6d0b46b9e7bc8abe403f49143d6f66ba94287e30 /services
parentb94d412848653ae532e589c2a7479b0d0149d341 (diff)
downloadframeworks_base-66dea73906f24226a6f699759e79040726bde8b5.zip
frameworks_base-66dea73906f24226a6f699759e79040726bde8b5.tar.gz
frameworks_base-66dea73906f24226a6f699759e79040726bde8b5.tar.bz2
Add playback state and metadata to dump
Change-Id: I813ff23c496f75776c8bd63f78bbe87683b19bc0
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/media/MediaSessionRecord.java9
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);
}