Analyze the dialing process of Android 4.4.2 phone from call log

Source: Internet
Author: User

There are many articles about the dialing process on the net, mostly logic, this article starts from the log of logcat output. Analyze the call flow, restore the system to apply real debugging scenarios.

ADB logcat-b main-b radio-v time >> Call.log

Use the above ADB command to dial the log output to the phone.

1-£ º07.458 v/outgoingcallbroadcaster (  786):  -Broadcasting Intent:intent {act=android.intent.action.new_outgoing_call flg=0x10000000 (has extras)} .

The Outgoingcallbroadcaster class makes a dial request.

 01 -01  08 : 02 :  07.467  D/callcontroller (tel:xxxxxxxxxxx (Has extras)}  01 -01  08 : 02 : 786 ): Extras = Bundle[{android.phone.extra.actual_number_to_dial=010 58928914 , Com.android.phone.extra.video=false , Com.android.phone.extra.slot=1 }] 

Phoneglobals.getinstance (). Callcontroller.placecall (intent); calls the Placecall method of the Callcontroller class. Log also outputs the information.

 on- on  ,: Geneva:07.467D/phoneutils (786): Getinitialnumber (): Intent {act=android.intent.action.call dat=tel:xxxxxxxxxxx (has extras)} on- on  ,: Geneva:07.467D/phoneutils (786): ==> got extra_actual_number_to_dial; Returning'01058928914' on- on  ,: Geneva:07.467D/callcontroller (786): -Action:android.intent.action.CALL on- on  ,: Geneva:07.468D/callcontroller (786):-Uri:tel:01058928914
07.482 :d/callcontroller (  786): Placecallinternal ()  ... Intent = Intent {Act=android.intent.action.call dat=tel:xxxxxxxxxxx (has extras)}

Callcontroller will call Placecall () placecallinternal () and start the screen.

Phoneutils Helper class will make a number of judgments (such as whether it is an emergency number, etc.)

07.489 d/phoneutils(  786' ):  01058928914' GW:'null'

Call Phoneutils's Placecall () method from the Placecallinternal () function of Callcontroller

07.503 :d/callmanager (  786):  Dial ( Handler (com.android.internal.telephony.gsm.GSMPhone) {4252205001058928914)

Phoneutils's Placecall () method went to the CallManager dial method, but at this point the number was not actually dialed out. Keep looking at log.

 on- on  ,: Geneva:07.503D/callmanager (786): -Ringing:idle from Handler (com.android.internal.telephony.gsm.GSMPhone) {424B3D50} on- on  ,: Geneva:07.503D/callmanager (786): Phone:handler (Com.android.internal.telephony.gsm.GSMPhone) {424B3D50}, name = GSM, state =IDLE on- on  ,: Geneva:07.503D/callmanager (786): -foreground:idle background:idle Ringing:idle

The status of dialing is also seen from the log, and three Gsmcall objects are also idle states

07.504 :d/gsm (  786): Gsmphone (2 ): [CC][GSMPHONE][SIM2] Dial:01058928914: 07.504 d/gsm     (  786): newdial:01058928914

Go to Gsmphone's dial () method, at this point from the application layer into the framework layer.

07.532 :d/rilj (  786):  RIL (2 ): [0643]> DIAL

RIL Layer down Dial directive > refers to sending commands to the lower level

07.535 :d/at      (  559): at > ATD01058928914;

Send the AT command to the modem layer to indicate the number to dial out

07.539 :d/callmanager (  786): End Dial (Handler (com.android.internal.telephony.gsm.GSMPhone) {4252205001058928914)

Dial command Send End

07.540 :d/callmanager (  786): Phone:handler ( Com.android.internal.telephony.gsm.GSMPhone) {42522050}, name = GSM, state = Offhook-  on from:07.540 d/callmanager (  786):-Foreground:dialing Background : IDLE Ringing:idle

Dialing ...

07.560 :d/phoneglobals (  786): Displaycallscreen () ...
07.562 :d/at      (  559): at< OK

Returns the OK command.

07.569 :d/rilj (  786):  RIL (2 ): [0643

Returns the status being dialed

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.