Incallscreen. Java/updatescreen () Analysis

Source: Internet
Author: User

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 ();

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.