Android Qualcomm 4.4.4 source code how to shield the Home Key, android4.4.4

Source: Internet
Author: User

Android Qualcomm 4.4.4 source code how to shield the Home Key, android4.4.4

If you want to shield the home key from the Qualcomm 4.4.4 source code so that it does not respond, it is useless to modify it at the application layer.

View framework Layer Code

 

NamePhoneWindowManager. javaSource File

 

Go to nameInterceptKeyBeforeDispatchingFunctions

From the function name, we can know that this function is intercepted before the key event is distributed.

 

View the processing of the KEYCODE_HOME key

The key code is as follows:

When the incoming call rings, return-1; block the home Key

Therefore, we need to block the home key. Here we can write the condition return-1 for processing.

The return-1 event is intercepted and will not be distributed to the upper layer.

 

Otherwise, the launcher is returned in response to the home Key.

 

Related Article

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.