/**
* Broadcast Action: Sent when the credential-encrypted private storage has
* become unlocked for the target user. This is only sent to registered
* receivers, not manifest receivers.
*
* <p>
* <b>Note:</b> The user's actual state might have changed by the time the broadcast is
* received. For example, the user could have been removed, started or stopped already,
* regardless of which broadcast you receive. Because of that, receivers should always check
* the current state of the user.
*/
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
public static final String ACTION_USER_UNLOCKED = "android.intent.action.USER_UNLOCKED";
System boot:
java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
at com.android.server.am.UserController.unlockUserCleared(UserController.java:1761)
at com.android.server.am.UserController.maybeUnlockUser(UserController.java:1747)
at com.android.server.am.UserController.finishUserBoot(UserController.java:622)
at com.android.server.am.UserController.sendBootCompleted(UserController.java:2413)
at com.android.server.am.ActivityManagerService.finishBooting(ActivityManagerService.java:5183)
at com.android.server.am.ActivityManagerService.bootAnimationComplete(ActivityManagerService.java:5274)
at com.android.server.wm.WindowManagerService.performEnableScreen(WindowManagerService.java:3812)
at com.android.server.wm.WindowManagerService.-$$Nest$mperformEnableScreen(Unknown Source:0)
at com.android.server.wm.WindowManagerService$H.handleMessage(WindowManagerService.java:5451)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.os.HandlerThread.run(HandlerThread.java:67)
at com.android.server.ServiceThread.run(ServiceThread.java:44)
/**
* Attempt to unlock user without a secret. This typically succeeds when the
* device doesn't have credential-encrypted storage, or when the
* credential-encrypted storage isn't tied to a user-provided PIN or
* pattern.
*/
private boolean maybeUnlockUser(final @UserIdInt int userId) {
return unlockUserCleared(userId, null, null);
}
mStartedUsers.put(UserHandle.USER_SYSTEM, uss);
com.android.server.am.UserController#finishUserUnlocked send :
final Intent unlockedIntent = new Intent(Intent.ACTION_USER_UNLOCKED);
unlockedIntent.putExtra(Intent.EXTRA_USER_HANDLE, userId);
unlockedIntent.addFlags(
Intent.FLAG_RECEIVER_REGISTERED_ONLY | Intent.FLAG_RECEIVER_FOREGROUND);
isSystemUserStarted
com.android.server.am.UserController#finishUserUnlocking()
com.android.server.am.UserController#USER_UNLOCK_MSG
todo: SystemServiceManager
AppOpsService
ActivityManagerService.bootAnimationComplete