Merge "Don't reset default launcher if the user is not loaded"

This commit is contained in:
Mehdi Alizadeh
2020-12-14 18:34:52 +00:00
committed by Android (Google) Code Review

View File

@@ -537,7 +537,9 @@ public class ShortcutService extends IShortcutService.Stub {
synchronized (mLock) {
// Clear the launcher cache for this user. It will be set again next time the default
// launcher is read from RoleManager.
getUserShortcutsLocked(userId).setCachedLauncher(null);
if (isUserLoadedLocked(userId)) {
getUserShortcutsLocked(userId).setCachedLauncher(null);
}
}
}