Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8a85a09a authored by Kweku Adams's avatar Kweku Adams Committed by Automerger Merge Worker
Browse files

Merge "Wait for unlock to start jobs." into sc-dev am: 339f0b26

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13690713

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9cea6e37a79d0e022d8e89056bcf516bd26633da
parents 783f21bd 339f0b26
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -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) {