mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Changing DeepShortcutManager to have a singleton contructor instead
of getting it from LauncherAppState This follows the design of other managers and makes it easier to access it from other processes and non-ui thread. Bug: 33032833 Change-Id: I8ad82ae5b6cc47bae885f9896985675c7dd0d5b8
This commit is contained in:
@@ -51,7 +51,8 @@ public class ShortcutsChangedTask extends ExtendedModelTask {
|
||||
|
||||
@Override
|
||||
public void execute(LauncherAppState app, BgDataModel dataModel, AllAppsList apps) {
|
||||
DeepShortcutManager deepShortcutManager = app.getShortcutManager();
|
||||
final Context context = app.getContext();
|
||||
DeepShortcutManager deepShortcutManager = DeepShortcutManager.getInstance(context);
|
||||
deepShortcutManager.onShortcutsChanged(mShortcuts);
|
||||
|
||||
// Find ShortcutInfo's that have changed on the workspace.
|
||||
@@ -67,7 +68,6 @@ public class ShortcutsChangedTask extends ExtendedModelTask {
|
||||
}
|
||||
}
|
||||
|
||||
final Context context = LauncherAppState.getInstance().getContext();
|
||||
final ArrayList<ShortcutInfo> updatedShortcutInfos = new ArrayList<>();
|
||||
if (!idsToWorkspaceShortcutInfos.isEmpty()) {
|
||||
// Update the workspace to reflect the changes to updated shortcuts residing on it.
|
||||
|
||||
Reference in New Issue
Block a user