In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
This article focuses on "how to eliminate screen locks in Android". Friends who are interested may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to eliminate screen locks in Android.
The real unlocking screen implementation has a handlehide method, and the real unlocking screen implements the handleshow method:
Private void handleShow () {synchronized (KeyguardViewMediator.this) {if (DEBUG) Log.d (TAG, "handleShow"); if (! mSystemReady) return; playSounds (true); mKeyguardViewManager.show (); / / display the window corresponding to the lock screen interface mShowing = true; / / lock screen status, that is, display the lock screen adjustUserActivityLocked (); / / cancel the control of the user Activity adjustStatusBarLocked () / / remove control of the status bar try {ActivityManagerNative.getDefault () .closeSystemDialogs ("lock");} catch (RemoteException e) {} mShowKeyguardWakeLock.release ();}}
As long as we comment out the statement commented above, the execution will be empty, and then the real unlocking screen implementation will be canceled.
Similarly, the handlehide method only needs to be annotated
MKeyguardViewManager.hide (); mShowing = false;adjustUserActivityLocked (); AdjustStatusBarLocked ()
You can cancel the real to hide the lock screen implementation.
However, after doing this, there is still a Bug (problem), that is, after waking up the screen, the screen will change from bright to dim within a specified period of time, and we also need to make the following changes: when pressing the power key, release the Bug of the screen from bright to dim.
Comment out under the handleWakeWhenReady (int keyCode) method
PokeWakelock (); / / release the screen from bright to dim Bug when the power key is pressed
The effect can be achieved.
Finally, another way is to have a variable mExternallyEnabled in KeyguardViewMediator.java, which can be achieved as long as it is initially changed to false, and the display interface (doKeyguard ()) will not continue to be displayed.
At this point, I believe you have a deeper understanding of "how to eliminate screen locks in Android". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.