理解了**锁屏流程**,再来看一看解锁流程。
1、上滑解锁流程:
由于锁屏界面是灭屏时构建并显示的,所以亮屏后就能直接看到锁屏界面啦。
按照流程图跟下去,一般是能看懂的。
这里着重分析一下KeyguardSecurityContainer 的 showNextSecurityScreenOrFinish 方法:
/**
* Shows the next security screen if there is one.
* @param authenticated true if the user entered the correct authentication
* @param targetUserId a user that needs to be the foreground user at the finish (if called)
* completion.
* @return true if keyguard is done
*/
boolean showNextSecurityScreenOrFinish(boolean authenticated, int targetUserId) {
if (DEBUG) Log.d(TAG, "showNextSecurityScreenOrFinish(" + authenticated + ")");
boolean finish = false;