From 7501adf4b71bb17d0785a5939efbcac4b39125c3 Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Tue, 2 Jun 2015 11:24:28 -0700 Subject: Ensure that we use the system long press duration when dragging from AllApps. - Removing some old code out of LauncherAppState Bug: 21559400 Change-Id: I3c586094efb7ad8a17d2169bc8aaccf6b0df40a2 --- src/com/android/launcher3/LauncherAppState.java | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) (limited to 'src/com/android/launcher3/LauncherAppState.java') diff --git a/src/com/android/launcher3/LauncherAppState.java b/src/com/android/launcher3/LauncherAppState.java index afa09ec83..81d595aaf 100644 --- a/src/com/android/launcher3/LauncherAppState.java +++ b/src/com/android/launcher3/LauncherAppState.java @@ -25,6 +25,7 @@ import android.content.res.Configuration; import android.content.res.Resources; import android.util.Log; +import android.view.ViewConfiguration; import com.android.launcher3.accessibility.LauncherAccessibilityDelegate; import com.android.launcher3.compat.LauncherAppsCompat; import com.android.launcher3.compat.PackageInstallerCompat; @@ -40,9 +41,6 @@ public class LauncherAppState { private final IconCache mIconCache; private final WidgetPreviewLoader mWidgetCache; - private final boolean mIsScreenLarge; - private final int mLongPressTimeout = 300; - private boolean mWallpaperChangedSinceLastCheck; private static WeakReference sLauncherProvider; @@ -86,8 +84,6 @@ public class LauncherAppState { MemoryTracker.startTrackingMe(sContext, "L"); } - // set sIsScreenXLarge and mScreenDensity *before* creating icon cache - mIsScreenLarge = isScreenLarge(sContext.getResources()); mInvariantDeviceProfile = new InvariantDeviceProfile(sContext); mIconCache = new IconCache(sContext, mInvariantDeviceProfile); mWidgetCache = new WidgetPreviewLoader(sContext, mInvariantDeviceProfile, mIconCache); @@ -149,6 +145,9 @@ public class LauncherAppState { return mModel; } + /** + * TODO(winsonc, hyunyoungs): We need to respect this + */ boolean shouldShowAppOrWidgetProvider(ComponentName componentName) { return mAppFilter == null || mAppFilter.shouldShowApp(componentName); } @@ -168,20 +167,7 @@ public class LauncherAppState { public WidgetPreviewLoader getWidgetCache() { return mWidgetCache; } - - public boolean isScreenLarge() { - return mIsScreenLarge; - } - - // Need a version that doesn't require an instance of LauncherAppState for the wallpaper picker - public static boolean isScreenLarge(Resources res) { - return res.getBoolean(R.bool.is_large_tablet); - } - - public int getLongPressTimeout() { - return mLongPressTimeout; - } - + public void onWallpaperChanged() { mWallpaperChangedSinceLastCheck = true; } -- cgit v1.2.3