UserController Intent.ACTION_USER_UNLOCKED


    /**
     * 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

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值