mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-02 17:06:49 +00:00
Removing global state from DeepShortcutManager
This makes DeepShortcutManager thread-safe and avoids any locks Change-Id: If4593b3541da6259591ff7a607efa58158006481
This commit is contained in:
@@ -37,7 +37,6 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Task to handle changing of lock state of the user
|
||||
@@ -58,9 +57,9 @@ public class UserLockStateChangedTask extends BaseModelUpdateTask {
|
||||
|
||||
HashMap<ShortcutKey, ShortcutInfo> pinnedShortcuts = new HashMap<>();
|
||||
if (isUserUnlocked) {
|
||||
List<ShortcutInfo> shortcuts =
|
||||
DeepShortcutManager.QueryResult shortcuts =
|
||||
deepShortcutManager.queryForPinnedShortcuts(null, mUser);
|
||||
if (deepShortcutManager.wasLastCallSuccess()) {
|
||||
if (shortcuts.wasSuccess()) {
|
||||
for (ShortcutInfo shortcut : shortcuts) {
|
||||
pinnedShortcuts.put(ShortcutKey.fromInfo(shortcut), shortcut);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user