1# Keyguard (aka Lockscreen) 2 3Keyguard is responsible for: 4 51. Handling authentication to allow the user to unlock the device, via biometrics or [KeyguardBouncer][1] 62. Displaying informational content such as the time, notifications, and smartspace 73. Always-on Display (AOD) 8 9Keyguard is the first screen available when turning on the device, as long as the user has not specified a security method of NONE. 10 11## Critical User Journeys 12 13The journeys below generally refer to Keyguard's portion of the overall flow, especially regarding use of the power button. Power button key interpretation (short press, long press, very long press, multi press) is done in [PhoneWindowManager][4], with calls to [PowerManagerService][2] to sleep or wake up, if needed. 14 15### Power On - AOD enabled or disabled 16 17Begins with the device in low power mode, with the display active for [AOD][3] or inactive. [PowerManagerService][2] can be directed to wake up on various user-configurable signals, such as lift to wake, screen taps, among others. [AOD][2], whether visibly enabled or not, handles these signals to transition AOD to full Lockscreen content. See more in [AOD][3]. 18 19### Power Off 20 21An indication to power off the device most likely comes from one of two signals: the user presses the power button or the screen timeout has passed. This may [lock the device](#How-the-device-locks) 22 23#### On Lockscreen 24 25#### On Lockscreen, occluded by an activity 26 27#### Device unlocked, Keyguard has gone away 28 29### Pulsing (Incoming notifications while dozing) 30 31### How the device locks 32 33More coming 34* Screen timeout 35* Smart lock 36* Device policy 37* Power button instantly locks setting 38* Lock timeout after screen timeout setting 39 40 41[1]: /frameworks/base/packages/SystemUI/docs/keyguard/bouncer.md 42[2]: /frameworks/base/services/core/java/com/android/server/power/PowerManagerService.java 43[3]: /frameworks/base/packages/SystemUI/docs/keyguard/aod.md 44[4]: /frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java 45 46 47