summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorJohn Spurlock <jspurlock@google.com>2015-03-09 18:49:57 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-03-09 18:49:58 +0000
commit5844bd4096ee685b640f7cae3ae6ed26b7f00002 (patch)
treeaa08c59d9378dcf9946b8906218171b167230ff8 /services
parent3c36b8e9569292b7da9a916b148a21dd6c273dc9 (diff)
parent1ff1e6edf133158351e793dd842bd0655ef6c199 (diff)
downloadframeworks_base-5844bd4096ee685b640f7cae3ae6ed26b7f00002.zip
frameworks_base-5844bd4096ee685b640f7cae3ae6ed26b7f00002.tar.gz
frameworks_base-5844bd4096ee685b640f7cae3ae6ed26b7f00002.tar.bz2
Merge "AudioService: Fix device dump in dumpsys output."
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/audio/AudioService.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java
index 5d386bd..61a7263 100644
--- a/services/core/java/com/android/server/audio/AudioService.java
+++ b/services/core/java/com/android/server/audio/AudioService.java
@@ -3620,7 +3620,9 @@ public class AudioService extends IAudioService.Stub {
pw.print(" Devices: ");
final int devices = AudioSystem.getDevicesForStream(mStreamType);
int device, i = 0, n = 0;
- while ((device = 1 << i) <= AudioSystem.DEVICE_OUT_DEFAULT) {
+ // iterate all devices from 1 to DEVICE_OUT_DEFAULT exclusive
+ // (the default device is not returned by getDevicesForStream)
+ while ((device = 1 << i) != AudioSystem.DEVICE_OUT_DEFAULT) {
if ((devices & device) != 0) {
if (n++ > 0) {
pw.print(", ");