mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 23:36:47 +00:00
Removing workspaceLoaded check from loadDeepShortcuts()
loadDeepShortcuts() is called after loadWorkspace() which already clears the shortcutMap. So if loader runs twice, during the second run, workspaceLoaded is true, but the shortcutMap had already been cleared in loadWorkspace(). Bug: 38384071 Change-Id: I40f0faf88376617e56819aef02620488e528dfb2
This commit is contained in:
@@ -1763,17 +1763,15 @@ public class LauncherModel extends BroadcastReceiver
|
||||
}
|
||||
|
||||
private void loadDeepShortcuts() {
|
||||
if (!mModelLoaded) {
|
||||
sBgDataModel.deepShortcutMap.clear();
|
||||
DeepShortcutManager shortcutManager = DeepShortcutManager.getInstance(mContext);
|
||||
mHasShortcutHostPermission = shortcutManager.hasHostPermission();
|
||||
if (mHasShortcutHostPermission) {
|
||||
for (UserHandle user : mUserManager.getUserProfiles()) {
|
||||
if (mUserManager.isUserUnlocked(user)) {
|
||||
List<ShortcutInfoCompat> shortcuts =
|
||||
shortcutManager.queryForAllShortcuts(user);
|
||||
sBgDataModel.updateDeepShortcutMap(null, user, shortcuts);
|
||||
}
|
||||
sBgDataModel.deepShortcutMap.clear();
|
||||
DeepShortcutManager shortcutManager = DeepShortcutManager.getInstance(mContext);
|
||||
mHasShortcutHostPermission = shortcutManager.hasHostPermission();
|
||||
if (mHasShortcutHostPermission) {
|
||||
for (UserHandle user : mUserManager.getUserProfiles()) {
|
||||
if (mUserManager.isUserUnlocked(user)) {
|
||||
List<ShortcutInfoCompat> shortcuts =
|
||||
shortcutManager.queryForAllShortcuts(user);
|
||||
sBgDataModel.updateDeepShortcutMap(null, user, shortcuts);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user