Macro-new project physical buttons not available

Source: Internet
Author: User

During these code porting times, we often found that the three physical buttons were ineffective, and later found that they were caused by a shortcut flashlight. The solution is simple, that is, to turn off the quick flashlight. There are two solutions:

1. Disable macros. This operation is a little troublesome, because after you turn off the macro, you must re-compile it, and because there may be patches, You need to close several macros.

1) Disable Macros in projectconfig. mk. Global.

[email protected]7817:~/PROJECT/PROJECT_V5/52_kk_qhd_k25$ cd mediatek/config/common/[email protected]-MS-7817:~/PROJECT/PROJECT_V5/52_kk_qhd_k25/mediatek/config/common$ lsaudio_policy.conf  autoconfig  configs  custom.conf  fstab  fstab.fat.nand  fstab.nand  media_codecs.xml  meta_init.rc  ProjectConfig.mk  ProjectConfig.mk.global[email protected]-MS-7817:~/PROJECT/PROJECT_V5/52_kk_qhd_k25/mediatek/config/common$ vim ProjectConfig.mk.global

Ling

######################################## ######################################## ######################################## ######################################## #### Vanzo default UI customize ################################ ######################################## ######################################## ######################################## ########### Signature = vanzo_beautyface_support # superuser for Signature = No # disable notpad featuremtk_notebook_support = No # Add funui Signature = Yes vanzo_camera_widget_support = Signature = yesvanzo_music_widget_support = yesvanzo_net_speed_support = yesvanzo_oos_browser_support = bytes = yesvanzo_putao_contacts_support = yes # set its value to no (disable)
Vanzo_quick_torch_support = No

2) input the patch, that is, execute

[email protected]7817:~/PROJECT/PROJECT_V5/52_kk_qhd_k25$ ./makeMtk listp

Then you can check whether there are operations on this macro In the patch. We found that there are two such records.

./config/vanzo6752_lwt_kk/ProjectConfig.mk:1706:VANZO_QUICK_TORCH_SUPPORT=yes./config/vanzo6752_lwt_kk/ProjectConfig.mk.global:188:VANZO_QUICK_TORCH_SUPPORT=no

That is to say, the macro is opened again in the patch. We manually disable them.

3) recompile

At this time, you can use./makemtk r Dr to quickly compile

 

2. There is another method

To close the macro, we can force it off in the code to close the flashlight.

[email protected]7817:~/PROJECT/PROJECT_V5/52_kk_qhd_k25$ cd frameworks/base/policy/src/com/android/internal/policy/impl/[email protected]-MS-7817:~/PROJECT/PROJECT_V5/52_kk_qhd_k25/frameworks/base/policy/src/com/android/internal/policy/impl$ lsBarController.java                  keyguard                OosGlobalActions.java           RecentApplicationsBackground.java        torch                      WindowOrientationListener.javaDrawGestureView.java                MainWindowView.java     package.html                    RecentApplicationsDialog.java            UnreadMessageView.java     WindowScrollLayout.javaEnableAccessibilityController.java  MissCallView.java       PhoneFallbackEventHandler.java  ShortcutManager.java                     WindowClockManager.java    YiYunMusicHelper.javaGlobalActions.java                  MusicHelper.java        PhoneLayoutInflater.java        SmallWindowView.java                     WindowClockView.javaGlobalKeyManager.java               MusicUtils.java         PhoneWindow.java                SmartWindowUtils.java                    WindowEventView.javaIconUtilities.java                  MusicView.java          PhoneWindowManager.java         SystemGesturesPointerEventListener.java  WindowGestureManager.javaImmersiveModeConfirmation.java      NotificationsView.java  Policy.java                     TimeDateView.java                        WindowGestureView.java[email protected]-MS-7817:~/PROJECT/PROJECT_V5/52_kk_qhd_k25/frameworks/base/policy/src/com/android/internal/policy/impl$ vim PhoneWindowManager.java 

Modify phonewindowmanager. Java code

If (featureoption. vanzo_quick_torch_support) {mwindowtorchmanager = new windowtorchmanager (context) ;}// change to If (false) {mwindowtorchmanager = new windowtorchmanager (context );}

That is, all places that use featureoption. vanzo_quick_torch_support are replaced with false.

3) Burning

Run

[email protected]7817:~/PROJECT/PROJECT_V5/52_kk_qhd_k25/frameworks/base/policy$ lsAndroid.mk  src[email protected]-MS-7817:~/PROJECT/PROJECT_V5/52_kk_qhd_k25/frameworks/base/policy$ cd ../../..[email protected]-MS-7817:~/PROJECT/PROJECT_V5/52_kk_qhd_k25$ ./makeMkt mm frameworks/base/policybash: ./makeMkt: No such file or directory[email protected]-MS-7817:~/PROJECT/PROJECT_V5/52_kk_qhd_k25$ ./makeMtk mm frameworks/base/policy

And then push it in.

[email protected]7817:~/PROJECT/PROJECT_V5/52_kk_qhd_k25$ adb push out/target/product/vanzo6752_lwt_kk/system/framework/android.policy.jar system/framework

 

Macro-new project physical buttons not available

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.