Insight into Android Keyguard

Source: Internet
Author: User

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 library of Systemui. Can be expressed as follows:

The Keyguard architecture has changed significantly, while the Keyguard UI interface has changed a lot, including two main interfaces, one showing notification's main interface, called Notification Keyguard, The other is the interface that the user enters the password to unlock when the system lock screen is the security lock, called the Bouncer interface. As shown (pictured below is the notification Keyguard interface, sliding up into the second interface, the Bouncer interface).

One, System boot Create keyguard Flow

Keyguardservice in the system boot ready to start bind, while the user set the lock screen to create corresponding Keyguard, lock screen can be divided into none (no, that is, no lock screen), Swipe (sliding, that is, sliding to unlock), Pattern (pattern, input pattern unlock, password length of at least four points), Password (password, enter password unlock, password is composed of number and letter combination, password length is at least 4), PIN (PIN, password contains only numbers, password length is at least 4). The System boot create Keyguard flow is as follows:

The following log is the key log for flow, which phase can be run from log check create flow to quickly debug problems.

Second, the system to eliminate the screen when create Keyguard Flow

When the system is out of screen, will also go to create Keyguard, by default after the Power key off screen will go to create keyguard immediately, but if not checked "power key immediately lock screen", or a timeout to eliminate the screen (that is, the system does not operate, After a period of time after the auto-extinguish screen), the default will be after the screen after 5s to create Keyguard. Kill screen to create Keyguard flow and boot to create keyguard flow, just the trigger conditions are different, as follows:

The following log is the key log that corresponds to the kill screen create Keyguard flow.

Third, Power key on-screen flow

When the system is illuminated, it will wait for the keyguard to be painted well after the screen (if the user has set Keyguard words), that is, when the screen will be keyguard block, etc. keyguard after the painting will notify powermanagerservice to light screen. The light flow is relatively simple, as follows:

The following log is the key log that corresponds to the power key on-screen flow.

iv. Dismiss keyguard Flow

Then, in addition to create keyguard, another important flow is unlocked, the user swipe or enter the password will be unlocked. Since Keyguard and Systemui belong to the same process and share a window relationship with StatusBar, unlocking flow is a little more complicated than before. The following is a cases urealyticum lock flow chart with the pattern Lock:

The following log is the key log that corresponds to the pattern lock screen to unlock flow.

At this point, keyguard a few important flow has been introduced, in addition to conventional lock screen mode, Android also support face unlock, voice unlock, fingerprint unlock. These biometric unlocking methods also need to be keyguard to complete, Android manufacturers to develop their own keyguard, do not use the Android default Keyguard, when access to these biometric unlocking mode, Some changes need to be made to fit with your keyguard. Keyguard, Hardware, kernel, HAL, and so on.

Insight into Android Keyguard

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.