Loading services/core/java/com/android/server/audio/AudioService.java +4 −1 Original line number Original line Diff line number Diff line Loading @@ -7053,13 +7053,16 @@ public class AudioService extends IAudioService.Stub return deviceSet.iterator().next(); return deviceSet.iterator().next(); } else { } else { // Multiple device selection is either: // Multiple device selection is either: // - dock + one other device: give priority to dock in this case. // - speaker + one other device: give priority to speaker in this case. // - speaker + one other device: give priority to speaker in this case. // - one A2DP device + another device: happens with duplicated output. In this case // - one A2DP device + another device: happens with duplicated output. In this case // retain the device on the A2DP output as the other must not correspond to an active // retain the device on the A2DP output as the other must not correspond to an active // selection if not the speaker. // selection if not the speaker. // - HDMI-CEC system audio mode only output: give priority to available item in order. // - HDMI-CEC system audio mode only output: give priority to available item in order. if (deviceSet.contains(AudioSystem.DEVICE_OUT_SPEAKER)) { if (deviceSet.contains(AudioSystem.DEVICE_OUT_DGTL_DOCK_HEADSET)) { return AudioSystem.DEVICE_OUT_DGTL_DOCK_HEADSET; } else if (deviceSet.contains(AudioSystem.DEVICE_OUT_SPEAKER)) { return AudioSystem.DEVICE_OUT_SPEAKER; return AudioSystem.DEVICE_OUT_SPEAKER; } else if (deviceSet.contains(AudioSystem.DEVICE_OUT_SPEAKER_SAFE)) { } else if (deviceSet.contains(AudioSystem.DEVICE_OUT_SPEAKER_SAFE)) { // Note: DEVICE_OUT_SPEAKER_SAFE not present in getDeviceSetForStreamDirect // Note: DEVICE_OUT_SPEAKER_SAFE not present in getDeviceSetForStreamDirect Loading Loading
services/core/java/com/android/server/audio/AudioService.java +4 −1 Original line number Original line Diff line number Diff line Loading @@ -7053,13 +7053,16 @@ public class AudioService extends IAudioService.Stub return deviceSet.iterator().next(); return deviceSet.iterator().next(); } else { } else { // Multiple device selection is either: // Multiple device selection is either: // - dock + one other device: give priority to dock in this case. // - speaker + one other device: give priority to speaker in this case. // - speaker + one other device: give priority to speaker in this case. // - one A2DP device + another device: happens with duplicated output. In this case // - one A2DP device + another device: happens with duplicated output. In this case // retain the device on the A2DP output as the other must not correspond to an active // retain the device on the A2DP output as the other must not correspond to an active // selection if not the speaker. // selection if not the speaker. // - HDMI-CEC system audio mode only output: give priority to available item in order. // - HDMI-CEC system audio mode only output: give priority to available item in order. if (deviceSet.contains(AudioSystem.DEVICE_OUT_SPEAKER)) { if (deviceSet.contains(AudioSystem.DEVICE_OUT_DGTL_DOCK_HEADSET)) { return AudioSystem.DEVICE_OUT_DGTL_DOCK_HEADSET; } else if (deviceSet.contains(AudioSystem.DEVICE_OUT_SPEAKER)) { return AudioSystem.DEVICE_OUT_SPEAKER; return AudioSystem.DEVICE_OUT_SPEAKER; } else if (deviceSet.contains(AudioSystem.DEVICE_OUT_SPEAKER_SAFE)) { } else if (deviceSet.contains(AudioSystem.DEVICE_OUT_SPEAKER_SAFE)) { // Note: DEVICE_OUT_SPEAKER_SAFE not present in getDeviceSetForStreamDirect // Note: DEVICE_OUT_SPEAKER_SAFE not present in getDeviceSetForStreamDirect Loading