mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Make AudioCapabilities constructor public
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=207707035
This commit is contained in:
parent
cab1d02c0c
commit
829f55e9cd
1 changed files with 7 additions and 5 deletions
|
|
@ -25,9 +25,7 @@ import android.media.AudioManager;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
import java.util.Arrays;
|
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)
|
@TargetApi(21)
|
||||||
public final class AudioCapabilities {
|
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
|
* Constructs new audio capabilities based on a set of supported encodings and a maximum channel
|
||||||
* count.
|
* 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
|
* @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.
|
* @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) {
|
if (supportedEncodings != null) {
|
||||||
this.supportedEncodings = Arrays.copyOf(supportedEncodings, supportedEncodings.length);
|
this.supportedEncodings = Arrays.copyOf(supportedEncodings, supportedEncodings.length);
|
||||||
Arrays.sort(this.supportedEncodings);
|
Arrays.sort(this.supportedEncodings);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue