summaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothCodecConfig.java
diff options
context:
space:
mode:
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothCodecConfig.java')
-rw-r--r--framework/java/android/bluetooth/BluetoothCodecConfig.java18
1 files changed, 5 insertions, 13 deletions
diff --git a/framework/java/android/bluetooth/BluetoothCodecConfig.java b/framework/java/android/bluetooth/BluetoothCodecConfig.java
index 2ee171b996..59eabbcf34 100644
--- a/framework/java/android/bluetooth/BluetoothCodecConfig.java
+++ b/framework/java/android/bluetooth/BluetoothCodecConfig.java
@@ -83,8 +83,7 @@ public final class BluetoothCodecConfig implements Parcelable {
public static final int SOURCE_CODEC_TYPE_INVALID = 1000 * 1000;
/**
- * Represents the count of valid source codec types. Can be accessed via
- * {@link #getMaxCodecType}.
+ * Represents the count of valid source codec types.
*/
private static final int SOURCE_CODEC_TYPE_MAX = 6;
@@ -389,7 +388,7 @@ public final class BluetoothCodecConfig implements Parcelable {
channelModeStr = appendCapabilityToString(channelModeStr, "STEREO");
}
- return "{codecName:" + getCodecName()
+ return "{codecName:" + getCodecName(mCodecType)
+ ",mCodecType:" + mCodecType
+ ",mCodecPriority:" + mCodecPriority
+ ",mSampleRate:" + String.format("0x%x", mSampleRate)
@@ -449,8 +448,8 @@ public final class BluetoothCodecConfig implements Parcelable {
* Returns the codec name converted to {@link String}.
* @hide
*/
- public @NonNull String getCodecName() {
- switch (mCodecType) {
+ public static @NonNull String getCodecName(@SourceCodecType int codecType) {
+ switch (codecType) {
case SOURCE_CODEC_TYPE_SBC:
return "SBC";
case SOURCE_CODEC_TYPE_AAC:
@@ -468,7 +467,7 @@ public final class BluetoothCodecConfig implements Parcelable {
default:
break;
}
- return "UNKNOWN CODEC(" + mCodecType + ")";
+ return "UNKNOWN CODEC(" + codecType + ")";
}
/**
@@ -479,13 +478,6 @@ public final class BluetoothCodecConfig implements Parcelable {
}
/**
- * Returns the valid codec types count.
- */
- public static int getMaxCodecType() {
- return SOURCE_CODEC_TYPE_MAX;
- }
-
- /**
* Checks whether the codec is mandatory.
* <p> The actual mandatory codec type for Android Bluetooth audio is SBC.
* See {@link #SOURCE_CODEC_TYPE_SBC}.