diff options
author | Mike Lockwood <lockwood@google.com> | 2015-05-07 13:02:01 -0700 |
---|---|---|
committer | Mike Lockwood <lockwood@google.com> | 2015-05-07 13:02:01 -0700 |
commit | fd5637fcce18adf44421389bf97a9da546f08940 (patch) | |
tree | 4ef61f086c9dc9ba6a75031e7f0a6f00c40d793e /media | |
parent | dd441795409f26f45de3ce40a1bab4121cfcefe5 (diff) | |
download | frameworks_base-fd5637fcce18adf44421389bf97a9da546f08940.zip frameworks_base-fd5637fcce18adf44421389bf97a9da546f08940.tar.gz frameworks_base-fd5637fcce18adf44421389bf97a9da546f08940.tar.bz2 |
MidiManager: Improve output of "dumpsys midi"
- Include each device's port status from MidiDeviceStatus
- MidiDeviceInfo.toString() now outputs all the names and values in the properties Bundle
Change-Id: Ic9329153e4ae4d5619e274d27a420943473377e5
Diffstat (limited to 'media')
-rw-r--r-- | media/java/android/media/midi/MidiDeviceInfo.java | 3 | ||||
-rw-r--r-- | media/java/android/media/midi/MidiDeviceStatus.java | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/media/java/android/media/midi/MidiDeviceInfo.java b/media/java/android/media/midi/MidiDeviceInfo.java index 35374ed..57607e9 100644 --- a/media/java/android/media/midi/MidiDeviceInfo.java +++ b/media/java/android/media/midi/MidiDeviceInfo.java @@ -298,6 +298,9 @@ public final class MidiDeviceInfo implements Parcelable { @Override public String toString() { + // This is a hack to force the mProperties Bundle to unparcel so we can + // print all the names and values. + mProperties.getString(PROPERTY_NAME); return ("MidiDeviceInfo[mType=" + mType + ",mInputPortCount=" + mInputPortCount + ",mOutputPortCount=" + mOutputPortCount + diff --git a/media/java/android/media/midi/MidiDeviceStatus.java b/media/java/android/media/midi/MidiDeviceStatus.java index 7522dcf..d4abeff 100644 --- a/media/java/android/media/midi/MidiDeviceStatus.java +++ b/media/java/android/media/midi/MidiDeviceStatus.java @@ -89,10 +89,9 @@ public final class MidiDeviceStatus implements Parcelable { @Override public String toString() { - StringBuilder builder = new StringBuilder(mDeviceInfo.toString()); int inputPortCount = mDeviceInfo.getInputPortCount(); int outputPortCount = mDeviceInfo.getOutputPortCount(); - builder.append(" mInputPortOpen=["); + StringBuilder builder = new StringBuilder("mInputPortOpen=["); for (int i = 0; i < inputPortCount; i++) { builder.append(mInputPortOpen[i]); if (i < inputPortCount -1) { |