【系统版本】:T0316
【 HW 】:p1
【测试前提】:1.卡1插入移动4G卡
【测试步骤】:1.呼入或呼出一通来电,接听;
2.按home返回后台,锁屏解锁查看。
【测试结果】:1.后台通话过程中锁屏解锁,发现听筒内存在锁屏提示音
【预期结果】:1.通话过程中不应存在锁屏提示音
【概 率】:必现
solution:
修改文件:./frameworks/av/services/audiopolicy/AudioPolicyManager.cpp
status_t AudioPolicyManager::checkAndSetVolume(audio_stream_type_t stream, int index, audio_io_handle_t output, audio_devices_t device, int delayMs, bool force) { ALOGD(" checkAndSetVolume stream = %d index = %d output = %d device = 0x%x delayMs = %d force = %d" ,stream,index,output,device,delayMs,force); // do not change actual stream volume if the stream is muted if (mOutputs.valueFor(output)->mMuteCount[stream] != 0) { ALOGVV("checkAndSetVolume() stream %d muted count %d", stream, mOutputs.valueFor(output)->mMuteCount[stream]); return NO_ERROR; } //add start if(stream == AUDIO_STREAM_SYSTEM && isInCall()) index=0; //add end // do not change in call volume if bluetooth is connected and vice versa if ((stream == AUDIO_STREAM_VOICE_CALL && mForceUse[AUDIO_POLICY_FORCE_FOR_COMMUNICATION] == AUDIO_POLICY_FORCE_BT_SCO) || (stream == AUDIO_STREAM_BLUETOOTH_SCO && mForceUse[AUDIO_POLICY_FORCE_FOR_COMMUNICATION] != AUDIO_POLICY_FORCE_BT_SCO)) { ALOGD("checkAndSetVolume() cannot set stream %d volume with force use = %d for comm", stream, mForceUse[AUDIO_POLICY_FORCE_FOR_COMMUNICATION]); return INVALID_OPERATION; } //.................. }
可以添加代码
if(stream == AUDIO_STREAM_SYSTEM && isInCall()) index=0;
过滤掉系统声音可以对这个问题进行规避
时间: 2024-10-18 21:34:10