summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/LauncherAppState.java
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2016-06-22 20:35:30 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2016-06-22 20:35:31 +0000
commitec1b1c542ca0648747b3b0bc3fd45922caa8ddaa (patch)
treefa66aad52a372f49721795662123ef48df261d46 /src/com/android/launcher3/LauncherAppState.java
parent8e6a8004808fbbf782812a6cd75324a7008cc610 (diff)
parentbfbf7f9f4a0b300613f0ff27a4eb592d88c08325 (diff)
downloadandroid_packages_apps_Trebuchet-ec1b1c542ca0648747b3b0bc3fd45922caa8ddaa.tar.gz
android_packages_apps_Trebuchet-ec1b1c542ca0648747b3b0bc3fd45922caa8ddaa.tar.bz2
android_packages_apps_Trebuchet-ec1b1c542ca0648747b3b0bc3fd45922caa8ddaa.zip
Merge "Add support for launcher shortcuts." into ub-launcher3-calgary
Diffstat (limited to 'src/com/android/launcher3/LauncherAppState.java')
-rw-r--r--src/com/android/launcher3/LauncherAppState.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/com/android/launcher3/LauncherAppState.java b/src/com/android/launcher3/LauncherAppState.java
index fe65b31fb..4bc76fb15 100644
--- a/src/com/android/launcher3/LauncherAppState.java
+++ b/src/com/android/launcher3/LauncherAppState.java
@@ -28,6 +28,8 @@ import com.android.launcher3.compat.UserManagerCompat;
import com.android.launcher3.config.ProviderConfig;
import com.android.launcher3.dynamicui.ExtractionUtils;
import com.android.launcher3.logging.FileLog;
+import com.android.launcher3.shortcuts.DeepShortcutManager;
+import com.android.launcher3.shortcuts.ShortcutCache;
import com.android.launcher3.util.ConfigMonitor;
import com.android.launcher3.util.TestingUtils;
import com.android.launcher3.util.Thunk;
@@ -42,6 +44,7 @@ public class LauncherAppState {
@Thunk final LauncherModel mModel;
private final IconCache mIconCache;
private final WidgetPreviewLoader mWidgetCache;
+ private final DeepShortcutManager mDeepShortcutManager;
@Thunk boolean mWallpaperChangedSinceLastCheck;
@@ -95,9 +98,10 @@ public class LauncherAppState {
mInvariantDeviceProfile = new InvariantDeviceProfile(sContext);
mIconCache = new IconCache(sContext, mInvariantDeviceProfile);
mWidgetCache = new WidgetPreviewLoader(sContext, mIconCache);
+ mDeepShortcutManager = new DeepShortcutManager(sContext, new ShortcutCache());
mAppFilter = AppFilter.loadByName(sContext.getString(R.string.app_filter_class));
- mModel = new LauncherModel(this, mIconCache, mAppFilter);
+ mModel = new LauncherModel(this, mIconCache, mAppFilter, mDeepShortcutManager);
LauncherAppsCompat.getInstance(sContext).addOnAppsChangedCallback(mModel);
@@ -168,6 +172,10 @@ public class LauncherAppState {
return mWidgetCache;
}
+ public DeepShortcutManager getShortcutManager() {
+ return mDeepShortcutManager;
+ }
+
public boolean hasWallpaperChangedSinceLastCheck() {
boolean result = mWallpaperChangedSinceLastCheck;
mWallpaperChangedSinceLastCheck = false;