第一次做流程图,做的不太规范,见谅,见谅。
具体的流程介绍,可以参看这篇文章。 Android8.1 SystemUI Keyguard之启动流程
有一点需要补充一下,系统首次开机是不显示锁屏界面的。
原因应该是下面部分:(KeyguardViewMediator.java)
中文是我自己的备注,结合源码的英文备注,应该没错。 =)
private void handleSystemReady() {
synchronized (this) {
if (DEBUG) Log.d(TAG, "onSystemReady");
mSystemReady = true;
doKeyguardLocked(null);
mUpdateMonitor.registerCallback(mUpdateCallback);
}
// Most services aren't available until the system reaches the ready state, so we
// send it here when the device first boots.
//第一次开机,跳过锁屏
maybeSendUserPresentBroadcast();
}
<