summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/model/ShortcutsChangedTask.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2016-11-21 16:02:39 +0530
committerSunny Goyal <sunnygoyal@google.com>2016-11-21 22:28:23 +0530
commitdde4fd971e825749686e7aa77379c65e410eea54 (patch)
treef23e94c8931b2052d910f0dcba1b0d87a36305f1 /src/com/android/launcher3/model/ShortcutsChangedTask.java
parentaa8a871e337fe42e9339b96833eaf37bf2b64b2f (diff)
downloadandroid_packages_apps_Trebuchet-dde4fd971e825749686e7aa77379c65e410eea54.tar.gz
android_packages_apps_Trebuchet-dde4fd971e825749686e7aa77379c65e410eea54.tar.bz2
android_packages_apps_Trebuchet-dde4fd971e825749686e7aa77379c65e410eea54.zip
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
Diffstat (limited to 'src/com/android/launcher3/model/ShortcutsChangedTask.java')
-rw-r--r--src/com/android/launcher3/model/ShortcutsChangedTask.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/launcher3/model/ShortcutsChangedTask.java b/src/com/android/launcher3/model/ShortcutsChangedTask.java
index 8f7c21db0..3314353b7 100644
--- a/src/com/android/launcher3/model/ShortcutsChangedTask.java
+++ b/src/com/android/launcher3/model/ShortcutsChangedTask.java
@@ -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.