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

Commit 065b241e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Reduce WTF for user-still-locked case"

parents 06d0a060 dc801c81
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -1200,12 +1200,20 @@ public class ShortcutService extends IShortcutService.Stub {
        return mUsers.get(userId) != null;
    }

    private int mLastLockedUser = -1;

    /** Return the per-user state. */
    @GuardedBy("mLock")
    @NonNull
    ShortcutUser getUserShortcutsLocked(@UserIdInt int userId) {
        if (!isUserUnlockedL(userId)) {
            // Only do wtf once for each user. (until the user is unlocked)
            if (userId != mLastLockedUser) {
                wtf("User still locked");
                mLastLockedUser = userId;
            }
        } else {
            mLastLockedUser = -1;
        }

        ShortcutUser userPackages = mUsers.get(userId);