Swap HDMI case and non-HDMI case in AudioCapabilities.
This commit is contained in:
parent
773d3c52f1
commit
6b4cf4d362
@ -115,19 +115,19 @@ public final class AudioCapabilities {
|
|||||||
supportedEncodings.addAll(Ints.asList(Api29.getDirectPlaybackSupportedEncodings()));
|
supportedEncodings.addAll(Ints.asList(Api29.getDirectPlaybackSupportedEncodings()));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (intent == null || intent.getIntExtra(AudioManager.EXTRA_AUDIO_PLUG_STATE, 0) == 0) {
|
if (intent == null || intent.getIntExtra(AudioManager.EXTRA_AUDIO_PLUG_STATE, 0) == 1) {
|
||||||
if (supportedEncodings.build().isEmpty()) {
|
supportedEncodings.addAll(Ints.asList(
|
||||||
return DEFAULT_AUDIO_CAPABILITIES;
|
intent.getIntArrayExtra(AudioManager.EXTRA_ENCODINGS)));
|
||||||
} else {
|
return new AudioCapabilities(
|
||||||
return new AudioCapabilities(Ints.toArray(supportedEncodings.build()), /* defaultValue= */
|
Ints.toArray(supportedEncodings.build()), /* defaultValue= */ DEFAULT_MAX_CHANNEL_COUNT);
|
||||||
DEFAULT_MAX_CHANNEL_COUNT);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
supportedEncodings.addAll(Ints.asList(
|
if (supportedEncodings.build().isEmpty()) {
|
||||||
intent.getIntArrayExtra(AudioManager.EXTRA_ENCODINGS)));
|
return DEFAULT_AUDIO_CAPABILITIES;
|
||||||
return new AudioCapabilities(
|
} else {
|
||||||
Ints.toArray(supportedEncodings.build()), /* defaultValue= */ DEFAULT_MAX_CHANNEL_COUNT);
|
return new AudioCapabilities(Ints.toArray(supportedEncodings.build()), /* defaultValue= */
|
||||||
|
DEFAULT_MAX_CHANNEL_COUNT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user