Android Call: Lock screen unlocked during background call and found that there is a lock screen beep in the handset

Source: Internet
Author: User

"System Version": T0316
"HW": P1
"Test Prerequisites": 1. Card 1 Insert Mobile 4G card
"Test Steps": 1. Incoming or outgoing call, answer;
2. Press home to return to the background, lock screen unlock view.
"Test Result": 1. Lock screen unlocked during background call and found a lock screen beep in the handset
"Expected results": 1. There should be no lock screen beep during the call

"Probability": Must be present

Solution:

Modified file:./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);  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)->mmutec        Ount[stream]);    return no_error;    }//add start if (stream = = Audio_stream_system && isincall ()) index=0; Add End/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_p             Olicy_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; }    //..................}
can add code

if (stream = = Audio_stream_system && isincall ())        index=0;
Filtering out the system sounds can circumvent this problem

Android Call: Lock screen unlocked during background call and found that there is a lock screen beep in the handset

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.