Android 蓝牙 A2dp更改编码Codec格式 (二)

同学,别退出呀,我可是全网最牛逼的 Android 蓝牙分析博主,我写了上百篇蓝牙文章,请点击下面了解本专栏,进入本博主主页看看再走呗,一定不会让你后悔的,记得一定要去看主页置顶文章哦

今天我们讲下如何更改A2dp编码Codec格式:

三、更新Codec格式

接上文:

/frameworks/base/core/java/android/bluetooth/BluetoothCodecConfig.java
public static final int CODEC_PRIORITY_DEFAULT = 0;  默认是SBC

mBluetoothA2dpConfigStore.setCodecType(codecTypeValue); //设置编码类型
/packages/apps/Settings/src/com/android/settings/development/BluetoothA2dpConfigStore.java
 public void setCodecType(int codecType) {
38          mCodecType = codecType;
39      }

mBluetoothA2dpConfigStore.setCodecPriority(codecPriorityValue);//设置编码高优先级
/packages/apps/Settings/src/com/android/settings/development/BluetoothA2dpConfigStore.java
public void setCodecPriority(int codecPriority) {
42          mCodecPriority = codecPri

猜你喜欢

转载自blog.csdn.net/weixin_45534242/article/details/125585671
今日推荐