Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0c093831 authored by John Spurlock's avatar John Spurlock Committed by Android (Google) Code Review
Browse files

Merge "AudioService: Add current stream devices to dumpsys output."

parents 6dafd87f b32fc972
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -3616,6 +3616,19 @@ public class AudioService extends IAudioService.Stub {
                final int index = (mIndexMap.valueAt(i) + 5) / 10;
                pw.print(index);
            }
            pw.println();
            pw.print("   Devices: ");
            final int devices = AudioSystem.getDevicesForStream(mStreamType);
            int device, i = 0, n = 0;
            while ((device = 1 << i) <= AudioSystem.DEVICE_OUT_DEFAULT) {
                if ((devices & device) != 0) {
                    if (n++ > 0) {
                        pw.print(", ");
                    }
                    pw.print(AudioSystem.getOutputDeviceName(device));
                }
                i++;
            }
        }
    }