OSDN Git Service

Send onUnlockUser() before PRE_BOOT broadcasts.
authorJeff Sharkey <jsharkey@android.com>
Wed, 6 Apr 2016 20:07:09 +0000 (14:07 -0600)
committerJeff Sharkey <jsharkey@android.com>
Wed, 6 Apr 2016 20:07:11 +0000 (14:07 -0600)
commit083807d61cd87f0e7d531612c7d6a139901b1078
treebcab2e8e64584555c896bd1eb35e94e4cec89b1e
parent3855e9ce494fcbd27291f0ea5872d00daf10d3f2
Send onUnlockUser() before PRE_BOOT broadcasts.

Before this change, a PRE_BOOT_COMPLETED receiver could try calling
back into the system to ask for AccountManager details, only to be
told the user wasn't unlocked yet.  If the broadcast code was probing
in a loop, it would force us to wait around for the 60-second ANR
timeout.  Since typical devices have ~7 PRE_BOOT receivers, this
would delay BOOT_COMPLETED and other operations, like mounting the
SD card, for up to 7 minutes.

Bug: 28024024

Change-Id: Ibf8611e6fe94b0deb5ae5715c86f897ff6779088
services/core/java/com/android/server/am/UserController.java