diff options
author | John Spurlock <jspurlock@google.com> | 2014-08-28 16:50:08 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-08-28 16:50:09 +0000 |
commit | 2ac81fbfaeec4dc0d5eda3df065f3baded9ab854 (patch) | |
tree | 558407a543b680faf20f71ab742ee017499e3bb3 /media | |
parent | e9a204f04465c26a32a15c237b985def8c2b4a90 (diff) | |
parent | 2b29bc4c1cef64abdf3a68b60bdcf7207193e980 (diff) | |
download | frameworks_base-2ac81fbfaeec4dc0d5eda3df065f3baded9ab854.zip frameworks_base-2ac81fbfaeec4dc0d5eda3df065f3baded9ab854.tar.gz frameworks_base-2ac81fbfaeec4dc0d5eda3df065f3baded9ab854.tar.bz2 |
Merge "Enhance audio service dumpsys." into lmp-dev
Diffstat (limited to 'media')
-rw-r--r-- | media/java/android/media/AudioService.java | 19 | ||||
-rw-r--r-- | media/java/android/media/AudioSystem.java | 3 |
2 files changed, 20 insertions, 2 deletions
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java index bce4074..3fea688 100644 --- a/media/java/android/media/AudioService.java +++ b/media/java/android/media/AudioService.java @@ -3486,13 +3486,28 @@ public class AudioService extends IAudioService.Stub { private void dump(PrintWriter pw) { pw.print(" Mute count: "); pw.println(muteCount()); + pw.print(" Max: "); + pw.println((mIndexMax + 5) / 10); pw.print(" Current: "); Set set = mIndex.entrySet(); Iterator i = set.iterator(); while (i.hasNext()) { Map.Entry entry = (Map.Entry)i.next(); - pw.print(Integer.toHexString(((Integer)entry.getKey()).intValue()) - + ": " + ((((Integer)entry.getValue()).intValue() + 5) / 10)+", "); + final int device = (Integer) entry.getKey(); + pw.print(Integer.toHexString(device)); + final String deviceName = device == AudioSystem.DEVICE_OUT_DEFAULT ? "default" + : AudioSystem.getOutputDeviceName(device); + if (!deviceName.isEmpty()) { + pw.print(" ("); + pw.print(deviceName); + pw.print(")"); + } + pw.print(": "); + final int index = (((Integer) entry.getValue()) + 5) / 10; + pw.print(index); + if (i.hasNext()) { + pw.print(", "); + } } } } diff --git a/media/java/android/media/AudioSystem.java b/media/java/android/media/AudioSystem.java index e11aab1..9a76f94 100644 --- a/media/java/android/media/AudioSystem.java +++ b/media/java/android/media/AudioSystem.java @@ -371,6 +371,7 @@ public class AudioSystem public static final String DEVICE_OUT_HDMI_ARC_NAME = "hmdi_arc"; public static final String DEVICE_OUT_SPDIF_NAME = "spdif"; public static final String DEVICE_OUT_FM_NAME = "fm_transmitter"; + public static final String DEVICE_OUT_AUX_LINE_NAME = "aux_line"; public static String getOutputDeviceName(int device) { @@ -417,6 +418,8 @@ public class AudioSystem return DEVICE_OUT_SPDIF_NAME; case DEVICE_OUT_FM: return DEVICE_OUT_FM_NAME; + case DEVICE_OUT_AUX_LINE: + return DEVICE_OUT_AUX_LINE_NAME; case DEVICE_OUT_DEFAULT: default: return ""; |