summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/LauncherAppState.java
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2015-06-02 11:24:28 -0700
committerWinson Chung <winsonc@google.com>2015-06-05 10:52:57 -0700
commit7501adf4b71bb17d0785a5939efbcac4b39125c3 (patch)
treed2b135f6257d7693a926c20d17d5f46323843269 /src/com/android/launcher3/LauncherAppState.java
parent8d8c73b591bf58f93f8841938ad8ce92085f7105 (diff)
downloadandroid_packages_apps_Trebuchet-7501adf4b71bb17d0785a5939efbcac4b39125c3.tar.gz
android_packages_apps_Trebuchet-7501adf4b71bb17d0785a5939efbcac4b39125c3.tar.bz2
android_packages_apps_Trebuchet-7501adf4b71bb17d0785a5939efbcac4b39125c3.zip
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
Diffstat (limited to 'src/com/android/launcher3/LauncherAppState.java')
-rw-r--r--src/com/android/launcher3/LauncherAppState.java24
1 files changed, 5 insertions, 19 deletions
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<LauncherProvider> 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;
}