关键字如下:
Telecom : CallAudioManager: setAudioRoute, route: SPEAKER
对应日志依次如下:
11-06 10:03:26.627 1905 1905 I Telecom : CallsManager: [TC@1, CONNECTING, null, tel:10086, ATR, childs(0), has_parent(false), [Capabilities:], [Properties:]] Starting with speakerphone because its a video call.: NOCBIR.oR@Ai4
注意其中的 Starting with speakerphone because its a video call。设置mSpeakerphoneOn标志位。
然后在主叫命令成功执行后,依次执行如下函数打开speaker:
对应log如下:
11-06 10:03:26.800 1905 3564 I Telecom : CallsManager: setCallState CONNECTING -> DIALING, call: [TC@1, CONNECTING, com.android.phone/com.android.services.telephony.TelephonyConnectionService, tel:10086, ATR, childs(0), has_parent(false), [Capabilities: CAPABILITY_MUTE], [Properties:]]: ((SBC.oSC)->CS.crCo->H.CS.crCo->H.CS.crCo.pICR)->CSW.hCCC@E-E-AjQ_0_0_0_0
11-06 10:03:26.807 1905 3564 V Telecom : CallAudioManager: setAudioRoute, route: SPEAKER: ((SBC.oSC)->CS.crCo->H.CS.crCo->H.CS.crCo.pICR)->CSW.hCCC@E-E-AjQ_0_0_0_0
以己方主动切到高清视频为例:
11-06 14:00:14.379 1922 3540 D Telecom : CallAudioManager: Switching to speaker because call TC@1 transitioned video state from Audio Only to Audio Tx Rx: CSW.sVS@Buk
11-06 14:00:14.380 1922 3062 I Telecom : CallAudioRouteStateMachine: Message received: SWITCH_SPEAKER=1004, arg1=0: CSW.sVS->CARSM.pM_SWITCH_SPEAKER@Buk_0
11-06 14:00:14.380 1922 3062 I Telecom : ActiveEarpieceRoute: Processing message SWITCH_SPEAKER: CSW.sVS->CARSM.pM_SWITCH_SPEAKER@Buk_0
11-06 14:00:14.381 1922 3062 I Telecom : Event: RecordEntry TC@1: AUDIO_ROUTE, Leaving state ActiveEarpieceRoute: CSW.sVS->CARSM.pM_SWITCH_SPEAKER@Buk_0
11-06 14:00:14.381 1922 3062 I Telecom : Event: RecordEntry TC@1: AUDIO_ROUTE, Entering state ActiveSpeakerRoute: CSW.sVS->CARSM.pM_SWITCH_SPEAKER@Buk_0
11-06 14:00:14.381 1922 3062 I Telecom : Event: RecordEntry TC@1: AUDIO_ROUTE_SPEAKER, null: CSW.sVS->CARSM.pM_SWITCH_SPEAKER@Buk_0
作者:dreamfly130
来源:CSDN
原文:https://blog.csdn.net/dreamfly130/article/details/83783000
版权声明:本文为博主原创文章,转载请附上博文链接!