Merge "Wait for unlock to start jobs." into sc-dev

This commit is contained in:
Kweku Adams
2021-02-25 20:45:21 +00:00
committed by Android (Google) Code Review

View File

@@ -887,20 +887,16 @@ public class JobSchedulerService extends com.android.server.SystemService
}
@Override
public void onUserStarting(@NonNull TargetUser user) {
public void onUserUnlocked(@NonNull TargetUser user) {
synchronized (mLock) {
// Note that the user has started after its unlocked instead of when the user
// actually starts because the storage won't be decrypted until unlock.
mStartedUsers = ArrayUtils.appendInt(mStartedUsers, user.getUserIdentifier());
}
// Let's kick any outstanding jobs for this user.
mHandler.obtainMessage(MSG_CHECK_JOB).sendToTarget();
}
@Override
public void onUserUnlocking(@NonNull TargetUser user) {
// Let's kick any outstanding jobs for this user.
mHandler.obtainMessage(MSG_CHECK_JOB).sendToTarget();
}
@Override
public void onUserStopping(@NonNull TargetUser user) {
synchronized (mLock) {