Refactor AudioCapabilities.getCapabilities

This commit is contained in:
Tianyi Feng 2023-05-16 11:07:52 +00:00
parent c61f8d317a
commit b9a53da121

View File

@ -124,12 +124,11 @@ public final class AudioCapabilities {
}
ImmutableSet supportedEncodingsSet = supportedEncodings.build();
if (supportedEncodingsSet.isEmpty()) {
return DEFAULT_AUDIO_CAPABILITIES;
} else {
if (!supportedEncodingsSet.isEmpty()) {
return new AudioCapabilities(
Ints.toArray(supportedEncodingsSet), /* defaultValue= */ DEFAULT_MAX_CHANNEL_COUNT);
}
return DEFAULT_AUDIO_CAPABILITIES;
}
/**