The function updates the screen when the call status changes.
1. First, determine whether a call menu can appear.
1. If the phone is idle, the menu cannot appear.
2. If there is a call
2.1 if there is no waiting call currently, the call menu is displayed.
2.2 otherwise, the menu cannot be displayed
2. If the meeting mode is used, update the meeting Panel.
3. Update the callcard according to the current call status, that is, the Avatar shown in the middle of the screen.
4. Whether to display the DTMF Panel (the dial-up panel during the call, for example, the panel for you to manually enter numbers when checking the phone bill)
1. If the current alarm is in the ring status, do not close the dial-up panel, but clear the number of the previous call.
2. If the current screen is in portrait mode and in the call status, the dial-up Panel can be displayed.
5. Update the waiting for answer interface. If there is a call, go to the waiting for answer interface (that is, the interface at the time of the call)
6. Update menubuttonhint and define <string name = "menubuttonhint" msgid = "4853215496220101699"> "call options by pressing menu in string. xml. "</String>
Some code is as follows:
If (mincallmenu! = NULL ){
// Todo: do this only if the menu is visible!
If (vdbg) log ("-updatescreen: updating menu items ...");
Boolean oktoshowmenu = mincallmenu. updateitems (mphone );
If (! Oktoshowmenu ){
// Uh oh: We were only trying to update the state of
// Menu items, but the logic in incallmenu. updateitems ()
// Just decided the menu shouldn't be visible at all!
// (That's probably means that the call ended
// Asynchronously while the menu was up .)
//
// So take the menu down asap.
If (vdbg) log ("-updatescreen: tried to update menu; now need to dismiss! ");
// Dismissmenu () has no effect if the menu is already closed.
Dismissmenu (true); // dismissimmediate = true
}
}
If (mincallscreenmode = incallscreenmode. manage_conference ){
If (vdbg) log ("-updatescreen: manage conference mode (not updating in-call UI )...");
Updatemanageconferencepanelifnecessary ();
Return;
} Else if (mincallscreenmode = incallscreenmode. call_ended ){
If (vdbg) log ("-updatescreen: Call ended state (not updating in-call UI )...");
Return;
}
If (vdbg) log ("-updatescreen: Updating the in-call ui ...");
Mcallcard. updatestate (mphone );
Updatedialpadvisibility ();
Updateonscreenanswerui ();
Updatemenubuttonhint ();