Merge "Revert "Move all BluetoothCodecConfig and BluetoothCodecStatus APIs moved from"" into android11-tests-dev
This commit is contained in:
@@ -51,25 +51,19 @@ public final class BluetoothCodecConfig implements Parcelable {
|
|||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.SOURCE)
|
||||||
public @interface SourceCodecType {}
|
public @interface SourceCodecType {}
|
||||||
|
|
||||||
@UnsupportedAppUsage
|
|
||||||
public static final int SOURCE_CODEC_TYPE_SBC = 0;
|
public static final int SOURCE_CODEC_TYPE_SBC = 0;
|
||||||
|
|
||||||
@UnsupportedAppUsage
|
|
||||||
public static final int SOURCE_CODEC_TYPE_AAC = 1;
|
public static final int SOURCE_CODEC_TYPE_AAC = 1;
|
||||||
|
|
||||||
@UnsupportedAppUsage
|
|
||||||
public static final int SOURCE_CODEC_TYPE_APTX = 2;
|
public static final int SOURCE_CODEC_TYPE_APTX = 2;
|
||||||
|
|
||||||
@UnsupportedAppUsage
|
|
||||||
public static final int SOURCE_CODEC_TYPE_APTX_HD = 3;
|
public static final int SOURCE_CODEC_TYPE_APTX_HD = 3;
|
||||||
|
|
||||||
@UnsupportedAppUsage
|
|
||||||
public static final int SOURCE_CODEC_TYPE_LDAC = 4;
|
public static final int SOURCE_CODEC_TYPE_LDAC = 4;
|
||||||
|
|
||||||
@UnsupportedAppUsage
|
|
||||||
public static final int SOURCE_CODEC_TYPE_MAX = 5;
|
public static final int SOURCE_CODEC_TYPE_MAX = 5;
|
||||||
|
|
||||||
@UnsupportedAppUsage
|
|
||||||
public static final int SOURCE_CODEC_TYPE_INVALID = 1000 * 1000;
|
public static final int SOURCE_CODEC_TYPE_INVALID = 1000 * 1000;
|
||||||
|
|
||||||
/** @hide */
|
/** @hide */
|
||||||
@@ -81,13 +75,10 @@ public final class BluetoothCodecConfig implements Parcelable {
|
|||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.SOURCE)
|
||||||
public @interface CodecPriority {}
|
public @interface CodecPriority {}
|
||||||
|
|
||||||
@UnsupportedAppUsage
|
|
||||||
public static final int CODEC_PRIORITY_DISABLED = -1;
|
public static final int CODEC_PRIORITY_DISABLED = -1;
|
||||||
|
|
||||||
@UnsupportedAppUsage
|
|
||||||
public static final int CODEC_PRIORITY_DEFAULT = 0;
|
public static final int CODEC_PRIORITY_DEFAULT = 0;
|
||||||
|
|
||||||
@UnsupportedAppUsage
|
|
||||||
public static final int CODEC_PRIORITY_HIGHEST = 1000 * 1000;
|
public static final int CODEC_PRIORITY_HIGHEST = 1000 * 1000;
|
||||||
|
|
||||||
|
|
||||||
@@ -104,25 +95,18 @@ public final class BluetoothCodecConfig implements Parcelable {
|
|||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.SOURCE)
|
||||||
public @interface SampleRate {}
|
public @interface SampleRate {}
|
||||||
|
|
||||||
@UnsupportedAppUsage
|
|
||||||
public static final int SAMPLE_RATE_NONE = 0;
|
public static final int SAMPLE_RATE_NONE = 0;
|
||||||
|
|
||||||
@UnsupportedAppUsage
|
|
||||||
public static final int SAMPLE_RATE_44100 = 0x1 << 0;
|
public static final int SAMPLE_RATE_44100 = 0x1 << 0;
|
||||||
|
|
||||||
@UnsupportedAppUsage
|
|
||||||
public static final int SAMPLE_RATE_48000 = 0x1 << 1;
|
public static final int SAMPLE_RATE_48000 = 0x1 << 1;
|
||||||
|
|
||||||
@UnsupportedAppUsage
|
|
||||||
public static final int SAMPLE_RATE_88200 = 0x1 << 2;
|
public static final int SAMPLE_RATE_88200 = 0x1 << 2;
|
||||||
|
|
||||||
@UnsupportedAppUsage
|
|
||||||
public static final int SAMPLE_RATE_96000 = 0x1 << 3;
|
public static final int SAMPLE_RATE_96000 = 0x1 << 3;
|
||||||
|
|
||||||
@UnsupportedAppUsage
|
|
||||||
public static final int SAMPLE_RATE_176400 = 0x1 << 4;
|
public static final int SAMPLE_RATE_176400 = 0x1 << 4;
|
||||||
|
|
||||||
@UnsupportedAppUsage
|
|
||||||
public static final int SAMPLE_RATE_192000 = 0x1 << 5;
|
public static final int SAMPLE_RATE_192000 = 0x1 << 5;
|
||||||
|
|
||||||
|
|
||||||
@@ -136,16 +120,12 @@ public final class BluetoothCodecConfig implements Parcelable {
|
|||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.SOURCE)
|
||||||
public @interface BitsPerSample {}
|
public @interface BitsPerSample {}
|
||||||
|
|
||||||
@UnsupportedAppUsage
|
|
||||||
public static final int BITS_PER_SAMPLE_NONE = 0;
|
public static final int BITS_PER_SAMPLE_NONE = 0;
|
||||||
|
|
||||||
@UnsupportedAppUsage
|
|
||||||
public static final int BITS_PER_SAMPLE_16 = 0x1 << 0;
|
public static final int BITS_PER_SAMPLE_16 = 0x1 << 0;
|
||||||
|
|
||||||
@UnsupportedAppUsage
|
|
||||||
public static final int BITS_PER_SAMPLE_24 = 0x1 << 1;
|
public static final int BITS_PER_SAMPLE_24 = 0x1 << 1;
|
||||||
|
|
||||||
@UnsupportedAppUsage
|
|
||||||
public static final int BITS_PER_SAMPLE_32 = 0x1 << 2;
|
public static final int BITS_PER_SAMPLE_32 = 0x1 << 2;
|
||||||
|
|
||||||
|
|
||||||
@@ -158,13 +138,10 @@ public final class BluetoothCodecConfig implements Parcelable {
|
|||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.SOURCE)
|
||||||
public @interface ChannelMode {}
|
public @interface ChannelMode {}
|
||||||
|
|
||||||
@UnsupportedAppUsage
|
|
||||||
public static final int CHANNEL_MODE_NONE = 0;
|
public static final int CHANNEL_MODE_NONE = 0;
|
||||||
|
|
||||||
@UnsupportedAppUsage
|
|
||||||
public static final int CHANNEL_MODE_MONO = 0x1 << 0;
|
public static final int CHANNEL_MODE_MONO = 0x1 << 0;
|
||||||
|
|
||||||
@UnsupportedAppUsage
|
|
||||||
public static final int CHANNEL_MODE_STEREO = 0x1 << 1;
|
public static final int CHANNEL_MODE_STEREO = 0x1 << 1;
|
||||||
|
|
||||||
private final @SourceCodecType int mCodecType;
|
private final @SourceCodecType int mCodecType;
|
||||||
@@ -177,7 +154,6 @@ public final class BluetoothCodecConfig implements Parcelable {
|
|||||||
private final long mCodecSpecific3;
|
private final long mCodecSpecific3;
|
||||||
private final long mCodecSpecific4;
|
private final long mCodecSpecific4;
|
||||||
|
|
||||||
@UnsupportedAppUsage
|
|
||||||
public BluetoothCodecConfig(@SourceCodecType int codecType, @CodecPriority int codecPriority,
|
public BluetoothCodecConfig(@SourceCodecType int codecType, @CodecPriority int codecPriority,
|
||||||
@SampleRate int sampleRate, @BitsPerSample int bitsPerSample,
|
@SampleRate int sampleRate, @BitsPerSample int bitsPerSample,
|
||||||
@ChannelMode int channelMode, long codecSpecific1,
|
@ChannelMode int channelMode, long codecSpecific1,
|
||||||
@@ -194,7 +170,6 @@ public final class BluetoothCodecConfig implements Parcelable {
|
|||||||
mCodecSpecific4 = codecSpecific4;
|
mCodecSpecific4 = codecSpecific4;
|
||||||
}
|
}
|
||||||
|
|
||||||
@UnsupportedAppUsage
|
|
||||||
public BluetoothCodecConfig(@SourceCodecType int codecType) {
|
public BluetoothCodecConfig(@SourceCodecType int codecType) {
|
||||||
mCodecType = codecType;
|
mCodecType = codecType;
|
||||||
mCodecPriority = BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT;
|
mCodecPriority = BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT;
|
||||||
@@ -416,7 +391,6 @@ public final class BluetoothCodecConfig implements Parcelable {
|
|||||||
*
|
*
|
||||||
* @return the codec type
|
* @return the codec type
|
||||||
*/
|
*/
|
||||||
@UnsupportedAppUsage
|
|
||||||
public @SourceCodecType int getCodecType() {
|
public @SourceCodecType int getCodecType() {
|
||||||
return mCodecType;
|
return mCodecType;
|
||||||
}
|
}
|
||||||
@@ -437,7 +411,6 @@ public final class BluetoothCodecConfig implements Parcelable {
|
|||||||
*
|
*
|
||||||
* @return the codec priority
|
* @return the codec priority
|
||||||
*/
|
*/
|
||||||
@UnsupportedAppUsage
|
|
||||||
public @CodecPriority int getCodecPriority() {
|
public @CodecPriority int getCodecPriority() {
|
||||||
return mCodecPriority;
|
return mCodecPriority;
|
||||||
}
|
}
|
||||||
@@ -468,7 +441,6 @@ public final class BluetoothCodecConfig implements Parcelable {
|
|||||||
*
|
*
|
||||||
* @return the codec sample rate
|
* @return the codec sample rate
|
||||||
*/
|
*/
|
||||||
@UnsupportedAppUsage
|
|
||||||
public @SampleRate int getSampleRate() {
|
public @SampleRate int getSampleRate() {
|
||||||
return mSampleRate;
|
return mSampleRate;
|
||||||
}
|
}
|
||||||
@@ -483,7 +455,6 @@ public final class BluetoothCodecConfig implements Parcelable {
|
|||||||
*
|
*
|
||||||
* @return the codec bits per sample
|
* @return the codec bits per sample
|
||||||
*/
|
*/
|
||||||
@UnsupportedAppUsage
|
|
||||||
public @BitsPerSample int getBitsPerSample() {
|
public @BitsPerSample int getBitsPerSample() {
|
||||||
return mBitsPerSample;
|
return mBitsPerSample;
|
||||||
}
|
}
|
||||||
@@ -508,7 +479,6 @@ public final class BluetoothCodecConfig implements Parcelable {
|
|||||||
*
|
*
|
||||||
* @return a codec specific value1.
|
* @return a codec specific value1.
|
||||||
*/
|
*/
|
||||||
@UnsupportedAppUsage
|
|
||||||
public long getCodecSpecific1() {
|
public long getCodecSpecific1() {
|
||||||
return mCodecSpecific1;
|
return mCodecSpecific1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
package android.bluetooth;
|
package android.bluetooth;
|
||||||
|
|
||||||
import android.annotation.Nullable;
|
import android.annotation.Nullable;
|
||||||
import android.compat.annotation.UnsupportedAppUsage;
|
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
|
|
||||||
@@ -39,7 +38,6 @@ public final class BluetoothCodecStatus implements Parcelable {
|
|||||||
* This extra represents the current codec status of the A2DP
|
* This extra represents the current codec status of the A2DP
|
||||||
* profile.
|
* profile.
|
||||||
*/
|
*/
|
||||||
@UnsupportedAppUsage
|
|
||||||
public static final String EXTRA_CODEC_STATUS =
|
public static final String EXTRA_CODEC_STATUS =
|
||||||
"android.bluetooth.extra.CODEC_STATUS";
|
"android.bluetooth.extra.CODEC_STATUS";
|
||||||
|
|
||||||
@@ -198,7 +196,6 @@ public final class BluetoothCodecStatus implements Parcelable {
|
|||||||
*
|
*
|
||||||
* @return the current codec configuration
|
* @return the current codec configuration
|
||||||
*/
|
*/
|
||||||
@UnsupportedAppUsage
|
|
||||||
public @Nullable BluetoothCodecConfig getCodecConfig() {
|
public @Nullable BluetoothCodecConfig getCodecConfig() {
|
||||||
return mCodecConfig;
|
return mCodecConfig;
|
||||||
}
|
}
|
||||||
@@ -208,7 +205,6 @@ public final class BluetoothCodecStatus implements Parcelable {
|
|||||||
*
|
*
|
||||||
* @return an array with the codecs local capabilities
|
* @return an array with the codecs local capabilities
|
||||||
*/
|
*/
|
||||||
@UnsupportedAppUsage
|
|
||||||
public @Nullable BluetoothCodecConfig[] getCodecsLocalCapabilities() {
|
public @Nullable BluetoothCodecConfig[] getCodecsLocalCapabilities() {
|
||||||
return mCodecsLocalCapabilities;
|
return mCodecsLocalCapabilities;
|
||||||
}
|
}
|
||||||
@@ -218,7 +214,6 @@ public final class BluetoothCodecStatus implements Parcelable {
|
|||||||
*
|
*
|
||||||
* @return an array with the codecs selectable capabilities
|
* @return an array with the codecs selectable capabilities
|
||||||
*/
|
*/
|
||||||
@UnsupportedAppUsage
|
|
||||||
public @Nullable BluetoothCodecConfig[] getCodecsSelectableCapabilities() {
|
public @Nullable BluetoothCodecConfig[] getCodecsSelectableCapabilities() {
|
||||||
return mCodecsSelectableCapabilities;
|
return mCodecsSelectableCapabilities;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user