Android Keyguard has not changed much since Android L. Prior to Android L, Keyguard had its own independent process, and Keyguardservice started and was resident since boot. Android L after to Android P,keyguard and Systemui share a process. The process ID is com.android.systemui, and Keyguard can be seen as a Lib libr
As a result of Android KK Boot Press power key can not extinguish screen, must be later to extinguish screen problems looked under the KK Keyguard code, KK version of the Keyguard has been independent for a keyguard.apk, the specific process analysis, has long been the Great God blog;http://blog.csdn.net/aaa2832/article/details/22181505 Process Analysis is very detailed, accurate, clear;http://blog.csdn.net
Keywords: Android keyguard lock screen cannot be displayed in full screen. The unlock page becomes smaller.
Platform: s5pc110 s5pv210
System: android2.3 android2.3.4
Problem description:
After the Board is burned for the first time (updated with the SD card), it cannot be displayed in full screen, but it is displayed in full screen after restart. After reading the screen on the Internet, the problem is as follows: Android lock screen program (framewo
Android Keyguard 4.1 lock screen in the/frameworks/base/policy/src/com/android/internal/policy/impl, the first full module reading framework, there are many can not understand, I hope you can advise!
1.accountunlockscreen.java
When the user forgets their password, it calls the function to unlock it using their account password and reset the phone lock, which is very simple. The final Judgment success method is: Postoncheckpasswordresult ();
2.biome
) { if (mkeyguardhost! = null) { mkeyguardhost.savehierarchystate (Mstatecontainer); } if (mkeyguardhost = = null) { if (DEBUG) log.d (TAG, "Keyguard host is null, creating it ..."); nbsp; Here in red code throughMviewmanager.addview (mkeyguardhost, LP);Add the Mkeyguardhost (empty view) of the initial session to the window by Windowmanager.addviewAnd then in the passInflatekeyguardview (options);method to add the real keyguardhostview to the mkeyg
1. Lock Screen mode
There are two lock modes:
/** * Either a lock screen (an informational keyguard screen), or an unlock * screen (a means for unlocking the device) is shown at any given time. */ enum Mode { LockScreen, UnlockScreen }
Lockscreen is the default unlock method, which is generally called the "unlock" interface; unlockscreen is generally called the "unlock" interface.They are in a parallel relationship, t
When the Image Library plays a slide, press the power key to disable the screen and then highlight the screen. The slides continue to play and no keyguard is displayed. How to display the unlock page after the screen is highlighted.
The modification method is to remove the FLAG_SHOW_WHEN_LOCKED flag. The modification positions on ICS2, JB, and JB2 are slightly different.
1. In ICS2 and JB versions, modify SCREEN_ON_FLAGS in the Gallery2 \ src \ co
changed, so I spent a lot of effort pulling google's latest source code. In android 4.4, the changes to this module are huge, and I will make a little bit of work here.1. File directory:
A. The lock screen proxy is under Frameworks/base/policy/src/com/android/internal/policy/impl/keyguard:
B. The architecture and functions of the entire project are similar to those of systemUI in framework/package:
C. keyguard's external interface Frameworks/base/c
intermediary makes the objects do not need to be explicitly referenced to each other, so that the coupling is loose and the interaction between them can be changed independently. The structure of the intermediary mode is as follows:
In the ANDROID system, keyguard uses the intermediary mode to mediate keyguard-related requests, including querying the keyguard
needs to be displayed: LockScreen or UnLockScreen stores a unique instance of the object to report the situation to the control interface.
Path: frameworks \ base \ policy \ src \ com \ android \ internal \ policy \ impl \ KeyguardScreenCallback. java
The source code is interpreted as follows:
/** Within a keyguard, there may be several screens that need a callback * to the host keyguard view. */public int
permission requires a system signature, so we cannot get permission.
Type_phone
/**
* Window type:phone. These are non-application windows providing
* user interaction with the phone (in particular incoming).
* These windows are normally placed above all applications, but behind
* the status bar.
* In multiuser systems shows to all users ' windows.
* * Public
static final int Type_phone = first_system_window+2;
TYPE_PHONEThe type of window can be displayed on top of ot
/com/android/internal/policy/impl/keyguardviewmediator.javaOne of the variables in the file is defined as follows:[Java]View Plaincopy
/**
* External apps (like the phone app) can tell us to disable the Keygaurd.
*/
Private Boolean mexternallyenabled = true
Mexternallyenabled is the key to managing whether a screen lock is turned on. The default is to open the screen lock, according to the note can know he is want the application to modify thisValue, we can change this
false.Sometimes we don't want to modify this initial value, so let's see if this class provides the corresponding method for external modification of this value. As we can't expect, let's look at the following code:
[Java: showcolumns: firstline [1] View plaincopy
··· · 50 ······· · 90 ····· · 140 · 150
/**
* Same semantics as {@ link windowmanagerpolicy # enablekeyguard}; Provide
* A way for external stuff to override normal keyguard b
Lockscreen.java, and then the track, finally found the position that can set the lock screen function switch. The code is located at:Frameworks/policies/base/phone/com/android/internal/policy/impl/keyguardviewmediator.javaOne of the variables in the file is defined as follows:/*** External apps (like the phone app) can tell us to disable the Keygaurd.*/Private Boolean mexternallyenabled = true;Mexternallyenabled is the key to managing whether a screen lock is turned on. The default value is to
The state of the Keyguard, is the input restricted? * Input is restricted when the keyguard are showing, or when the Keyguard * were suppressed by a app that disabled the Keyguard or we haven ' t been provisioned yet. */Public Boolean isinputrestricted () { log.d (TAG, "jscese display mshowing = =" +
When an android alarm is triggered, press the power key to lock the screen. Two screen locks are played.Two locks are triggered because Keyguard is locked when the screen is hidden, and then keyguard is automatically unlocked because FLAG_DISMISS_KEYGUARD windowsParam is set in alarm activity, this is the design of Google AOSP, and there will be two sides to the phone of Google AOSP, so the suggestions do n
mmaximumscreenofftimeoutfromdeviceadmin;Return Math.max (timeout, minimum_screen_off_timeout), 2, remove the lock screen function./frameworks/base/packages/keyguard/src/com/android /keyguard/keyguardviewmediator.javaprivate Boolean mexternallyenabled = True to change the mexternallyenabled to false. But this just changed the boot default value, the user can still use Disablekeyguard/enablekeyguard to start
ringing incoming call .");} Else {Launchhomefromhotkey ();}} Else {Log. I (TAG, "ignoring home; event canceled .");}}}Return true;}// First we always handle the Home key here, So applications// Can never break it, although if keyguard is on, we do let// It handle it, because that gives us the correct 5 second// Timeout.If (code = keyevent. keycode_home ){// If a system window has focus, then it doesn't make sense// Right now to interact with applicat
1, please modify the Frameworks/base/policy/src/com/android/internal/policy/impl/keyguard/keyguardhostview.java, will In the Onfinishinflate () methodAdddefaultwidgets ();This line of code commented out;2. Please modify frameworks/base/policy/src/com/android/internal/policy/impl/keyguard/ Keyguardhostview.java, modify the mswitchpagerunnable to read as follows:Runnable mswitchpagerunnable = new Runnable ()
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.