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

Commit dc801c81 authored by Makoto Onuki's avatar Makoto Onuki
Browse files

Reduce WTF for user-still-locked case

Test: boot, launch some app shortcuts
Change-Id: I8b1d604e12be3da9ebd6797828c8927a027f894e
Fix: 64939202
parent ffa0a6f4
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);