Make AudioCapabilities constructor public

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=207707035
This commit is contained in:
andrewlewis 2018-08-07 06:47:32 -07:00 committed by Oliver Woodman
parent cab1d02c0c
commit 829f55e9cd

View file

@ -25,9 +25,7 @@ import android.media.AudioManager;
import android.support.annotation.Nullable;
import java.util.Arrays;
/**
* Represents the set of audio formats that a device is capable of playing.
*/
/** Represents the set of audio formats that a device is capable of playing. */
@TargetApi(21)
public final class AudioCapabilities {
@ -65,11 +63,15 @@ public final class AudioCapabilities {
* Constructs new audio capabilities based on a set of supported encodings and a maximum channel
* count.
*
* <p>Applications should generally call {@link #getCapabilities(Context)} to obtain an instance
* based on the capabilities advertised by the platform, rather than calling this constructor.
*
* @param supportedEncodings Supported audio encodings from {@link android.media.AudioFormat}'s
* {@code ENCODING_*} constants.
* {@code ENCODING_*} constants. Passing {@code null} indicates that no encodings are
* supported.
* @param maxChannelCount The maximum number of audio channels that can be played simultaneously.
*/
/* package */ AudioCapabilities(int[] supportedEncodings, int maxChannelCount) {
public AudioCapabilities(@Nullable int[] supportedEncodings, int maxChannelCount) {
if (supportedEncodings != null) {
this.supportedEncodings = Arrays.copyOf(supportedEncodings, supportedEncodings.length);
Arrays.sort(this.supportedEncodings);