标签:
【系统版本】:T0316【概 率】:必现
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;过滤掉系统声音可以对这个问题进行规避
Android 通话:后台通话过程中锁屏解锁,发现听筒内存在锁屏提示音
标签:
原文地址:http://blog.csdn.net/deng0zhaotai/article/details/46427621