QC 8909 android P平台,通话过程中蓝牙切换至免提失败,切换到了听筒

项目前提:不支持听筒和线控耳机

步骤:
蓝牙耳机连接工作状态下接通电话 - 音频路径(此时为蓝牙) - 切换至免提

现象:
切换免提失败,UI显示切换至听筒

提case给高通,回复让我打个patch:

please merge CR#2477458 patch and test again.

Subject: [PATCH] Change bluetooth routing to be more responsive

Rely on the BT stack's audio-off message to transition into the
audio-off state.

Bug: 115319793
CRs-Fixed: 2477458
---

diff --git a/src/com/android/server/telecom/bluetooth/BluetoothRouteManager.java b/src/com/android/server/telecom/bluetooth/BluetoothRouteManager.java
index 516c8bd..6ad7c9b 100644
--- a/src/com/android/server/telecom/bluetooth/BluetoothRouteManager.java
+++ b/src/com/android/server/telecom/bluetooth/BluetoothRouteManager.java
@@ -123,7 +123,7 @@
BluetoothDevice erroneouslyConnectedDevice = getBluetoothAudioConnectedDevice();
if (erroneouslyConnectedDevice != null) {
Log.w(LOG_TAG, "Entering AudioOff state but device %s appears to be connected. " +
- "Switching to audio-on state for that device", erroneouslyConnectedDevice);
+ "Switching to audio-on state for that device.", erroneouslyConnectedDevice);
// change this to just transition to the new audio on state
transitionToActualState();
}
@@ -262,7 +262,6 @@
break;
case DISCONNECT_HFP:
disconnectAudio();
- transitionTo(mAudioOffState);
break;
case RETRY_HFP_CONNECTION:
if (Objects.equals(address, mDeviceAddress)) {
@@ -375,7 +374,6 @@
break;
case DISCONNECT_HFP:
disconnectAudio();
- transitionTo(mAudioOffState);
break;
case RETRY_HFP_CONNECTION:
if (Objects.equals(address, mDeviceAddress)) { 

成功切换了,记录一下。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值