Loading services/core/java/com/android/server/am/PreBootBroadcaster.java +4 −2 Original line number Original line Diff line number Diff line Loading @@ -57,7 +57,7 @@ public abstract class PreBootBroadcaster extends IIntentReceiver.Stub { private int mIndex = 0; private int mIndex = 0; public PreBootBroadcaster(ActivityManagerService service, int userId, public PreBootBroadcaster(ActivityManagerService service, int userId, ProgressReporter progress) { ProgressReporter progress, boolean quiet) { mService = service; mService = service; mUserId = userId; mUserId = userId; mProgress = progress; mProgress = progress; Loading @@ -68,8 +68,10 @@ public abstract class PreBootBroadcaster extends IIntentReceiver.Stub { mTargets = mService.mContext.getPackageManager().queryBroadcastReceiversAsUser(mIntent, mTargets = mService.mContext.getPackageManager().queryBroadcastReceiversAsUser(mIntent, MATCH_SYSTEM_ONLY, UserHandle.of(userId)); MATCH_SYSTEM_ONLY, UserHandle.of(userId)); if (!quiet) { mHandler.obtainMessage(MSG_SHOW).sendToTarget(); mHandler.obtainMessage(MSG_SHOW).sendToTarget(); } } } public void sendNext() { public void sendNext() { if (mIndex >= mTargets.size()) { if (mIndex >= mTargets.size()) { Loading services/core/java/com/android/server/am/UserController.java +6 −1 Original line number Original line Diff line number Diff line Loading @@ -351,7 +351,11 @@ final class UserController { // PRE_BOOT receivers are finished to avoid ANR'ing apps // PRE_BOOT receivers are finished to avoid ANR'ing apps final UserInfo info = getUserInfo(userId); final UserInfo info = getUserInfo(userId); if (!Objects.equals(info.lastLoggedInFingerprint, Build.FINGERPRINT)) { if (!Objects.equals(info.lastLoggedInFingerprint, Build.FINGERPRINT)) { new PreBootBroadcaster(mService, userId, null) { // Suppress double notifications for managed profiles that // were unlocked automatically (no challenge token required) // as part of their parent user being unlocked. final boolean quiet = info.isManagedProfile() && !uss.tokenProvided; new PreBootBroadcaster(mService, userId, null, quiet) { @Override @Override public void onFinished() { public void onFinished() { finishUserUnlockedCompleted(uss); finishUserUnlockedCompleted(uss); Loading Loading @@ -972,6 +976,7 @@ final class UserController { return false; return false; } else { } else { uss.mUnlockProgress.addListener(listener); uss.mUnlockProgress.addListener(listener); uss.tokenProvided = (token != null); } } finishUserUnlocking(uss); finishUserUnlocking(uss); Loading services/core/java/com/android/server/am/UserState.java +1 −0 Original line number Original line Diff line number Diff line Loading @@ -54,6 +54,7 @@ public final class UserState { public int state = STATE_BOOTING; public int state = STATE_BOOTING; public int lastState = STATE_BOOTING; public int lastState = STATE_BOOTING; public boolean switching; public boolean switching; public boolean tokenProvided; /** /** * The last time that a provider was reported to usage stats as being brought to important * The last time that a provider was reported to usage stats as being brought to important Loading Loading
services/core/java/com/android/server/am/PreBootBroadcaster.java +4 −2 Original line number Original line Diff line number Diff line Loading @@ -57,7 +57,7 @@ public abstract class PreBootBroadcaster extends IIntentReceiver.Stub { private int mIndex = 0; private int mIndex = 0; public PreBootBroadcaster(ActivityManagerService service, int userId, public PreBootBroadcaster(ActivityManagerService service, int userId, ProgressReporter progress) { ProgressReporter progress, boolean quiet) { mService = service; mService = service; mUserId = userId; mUserId = userId; mProgress = progress; mProgress = progress; Loading @@ -68,8 +68,10 @@ public abstract class PreBootBroadcaster extends IIntentReceiver.Stub { mTargets = mService.mContext.getPackageManager().queryBroadcastReceiversAsUser(mIntent, mTargets = mService.mContext.getPackageManager().queryBroadcastReceiversAsUser(mIntent, MATCH_SYSTEM_ONLY, UserHandle.of(userId)); MATCH_SYSTEM_ONLY, UserHandle.of(userId)); if (!quiet) { mHandler.obtainMessage(MSG_SHOW).sendToTarget(); mHandler.obtainMessage(MSG_SHOW).sendToTarget(); } } } public void sendNext() { public void sendNext() { if (mIndex >= mTargets.size()) { if (mIndex >= mTargets.size()) { Loading
services/core/java/com/android/server/am/UserController.java +6 −1 Original line number Original line Diff line number Diff line Loading @@ -351,7 +351,11 @@ final class UserController { // PRE_BOOT receivers are finished to avoid ANR'ing apps // PRE_BOOT receivers are finished to avoid ANR'ing apps final UserInfo info = getUserInfo(userId); final UserInfo info = getUserInfo(userId); if (!Objects.equals(info.lastLoggedInFingerprint, Build.FINGERPRINT)) { if (!Objects.equals(info.lastLoggedInFingerprint, Build.FINGERPRINT)) { new PreBootBroadcaster(mService, userId, null) { // Suppress double notifications for managed profiles that // were unlocked automatically (no challenge token required) // as part of their parent user being unlocked. final boolean quiet = info.isManagedProfile() && !uss.tokenProvided; new PreBootBroadcaster(mService, userId, null, quiet) { @Override @Override public void onFinished() { public void onFinished() { finishUserUnlockedCompleted(uss); finishUserUnlockedCompleted(uss); Loading Loading @@ -972,6 +976,7 @@ final class UserController { return false; return false; } else { } else { uss.mUnlockProgress.addListener(listener); uss.mUnlockProgress.addListener(listener); uss.tokenProvided = (token != null); } } finishUserUnlocking(uss); finishUserUnlocking(uss); Loading
services/core/java/com/android/server/am/UserState.java +1 −0 Original line number Original line Diff line number Diff line Loading @@ -54,6 +54,7 @@ public final class UserState { public int state = STATE_BOOTING; public int state = STATE_BOOTING; public int lastState = STATE_BOOTING; public int lastState = STATE_BOOTING; public boolean switching; public boolean switching; public boolean tokenProvided; /** /** * The last time that a provider was reported to usage stats as being brought to important * The last time that a provider was reported to usage stats as being brought to important Loading