系统铃声设置最大,多次通话完挂断后,发现系统铃声变为1.

it2022-05-05  140

问题原因是:

我们自己开发的一个功能

BUG #42204 【客户必解】用电信卡通话,对方挂断后,测试机没有提示音。

BUG #42563 【客户BUG】插电信卡,对方挂断电话,提示音量太大

在通话完成后,发现当前使用的是电信卡拨打,就播放一个嘟的声音,因为播放音量太大,给设置成了1.

找到原因后,发现分析问题的思路有问题。

1 log搜到设置音量的代码后,没有关联PID

在log中有设置音量的代码

07-18 10:24:20.375194  8492  8492 D AudioManager: setStreamVolume: StreamType = 2, index = 1

07-18 10:24:21.166533  8492  8492 D AudioManager: setStreamVolume: StreamType = 2, index = 15

07-18 10:26:00.937668  8492  8492 D AudioManager: setStreamVolume: StreamType = 2, index = 1

07-18 10:26:01.836529  8492  8492 D AudioManager: setStreamVolume: StreamType = 2, index = 1

都是同一个进程进行操作的。

查找当前进程的相关log

07-18 10:26:01.809963  8492  8492 D BeeAndVibrateManager: onCompletion

07-18 10:26:01.810393   429  1219 D NuPlayerDriver: stop(0xb45a55b0)

07-18 10:26:01.810533   429  1219 D NuPlayerDriver: notifyListener_l(0xb45a55b0), (8, 0, 0, -1), loop setting(0, 0)

07-18 10:26:01.812430  8492  8492 V MediaPlayer: resetDrmState:  mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false

07-18 10:26:01.812613  8492  8492 V MediaPlayer: cleanDrmObj: mDrmObj=null mDrmSessionId=null

07-18 10:26:01.812949   429  1219 D NuPlayerDriver: reset(0xb45a55b0) at state 8

07-18 10:26:01.813178   429  1219 D GenericSource: disconnect: mDataSource 0xb279b380 mHttpSource 0x0

07-18 10:26:01.814330   429  8867 D AudioTrack: pause(): 0xb27d5380, mState = 1

07-18 10:26:01.814686   437  8870 D MtkOmxAudioDecBase: # Got general command (OMX_CommandFlush)

07-18 10:26:01.814880   429  8867 D AudioTrack: stop(): 0xb27d5380, mState = 4

07-18 10:26:01.818868   418  2653 D APM_AudioPolicyManager: setForceUse() usage 1, config 10, mPhoneState 0

07-18 10:26:01.819933   859  1503 D flx_light: currTimeMinute=626;startTime=420;endTime=1020;switchLightCloseFlg=true

07-18 10:26:01.822208   437  8870 D MtkOmxAudioDecBase: # Got general command (OMX_CommandStateSet)

07-18 10:26:01.823237   437  8870 D MtkOmxAudioDecBase: # Got general command (OMX_CommandStateSet)

07-18 10:26:01.832847   429  8868 W MediaAnalyticsItem: Unable to record: (codec:0:-1:-11:0:6:android.media.mediacodec.mime=audio/raw:android.media.mediacodec.mode=audio:android.media.mediacodec.encoder=0:android.media.mediacodec.codec=OMX.MTK.AUDIO.DECODER.RAW:android.media.mediacodec.secure=0:android.media.mediacodec.bytesin=70000:) [forcenew=0]

07-18 10:26:01.833215   429  8861 D NuPlayer: audio shutdown completed

07-18 10:26:01.835205   429  8861 D NuPlayerDriver: notifyResetComplete(0xb45a55b0)

07-18 10:26:01.836059   429  1219 D AudioTrack: ~AudioTrack(): 0xb27d5380

07-18 10:26:01.836304   429  1219 D AudioTrack: stop(): 0xb27d5380, mState = 4

07-18 10:26:01.836529  8492  8492 D AudioManager: setStreamVolume: StreamType = 2, index = 1

07-18 10:26:01.841109  8492  8492 I Dialer  : 10cl - voice

8492  从进程对应的log上看都是dialer的操作,应该就是和现象吻合的,打电话的界面等操作就是在dialer下面。

 是应该可以很果断在电话本里面搜索setStreamVolume操作,然后根据前后log进行问题判断确认。

 

所以问题出现了 忽略了进程ID,查看对应的应用。

 

另外发现了 dumpsys.txt的作用

里面有明确的记录音量设置的信息

07-18 10:23:16:406 setStreamVolume(stream:STREAM_MUSIC index:15 flags:0x4) from com.nbbsw.mmi_test

07-18 10:24:20:376 setStreamVolume(stream:STREAM_RING index:1 flags:0x4) from com.android.dialer

07-18 10:24:21:167 setStreamVolume(stream:STREAM_RING index:15 flags:0x4) from com.android.dialer

07-18 10:26:00:980 setStreamVolume(stream:STREAM_RING index:1 flags:0x4) from com.android.dialer

07-18 10:26:01:837 setStreamVolume(stream:STREAM_RING index:1 flags:0x4) from com.android.dialer

--------- 0.064s was the duration of dumpsys audio, ending at: 2019-07-18 10:31:21


问题可以直接定位于哪个应用的操作。

adb shell dumpsys   > %Folder%\dumpsys.txt

查看系统信息服务的状态

 


最新回复(0)