summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/widget
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2015-05-26 18:56:52 -0700
committerSunny Goyal <sunnygoyal@google.com>2015-05-27 17:50:35 -0700
commit58376925f9596c23f5c9ffa6c99630dfddcfce9c (patch)
tree5b6fe453a297c568648d48a0d1d15a73503ad2f6 /src/com/android/launcher3/widget
parent5cc7af12f10c4bd97bd732305398c7ad6a7fa4ca (diff)
downloadandroid_packages_apps_Trebuchet-58376925f9596c23f5c9ffa6c99630dfddcfce9c.tar.gz
android_packages_apps_Trebuchet-58376925f9596c23f5c9ffa6c99630dfddcfce9c.tar.bz2
android_packages_apps_Trebuchet-58376925f9596c23f5c9ffa6c99630dfddcfce9c.zip
Fixing page background not displayed when dragging from all apps
> Adding empty page synchronously, instead of waiting for a frame > Changing launcher state from widgets screen in the same frame, similar to all apps > Removing DragEnforcer, and moving that logic in side the workspace, disabled by a flag > Using first page to get page bounds in drag layer, as last page may not have been measured Change-Id: I172ba4e5ce44648ac55402d49994542c6e10f101
Diffstat (limited to 'src/com/android/launcher3/widget')
-rw-r--r--src/com/android/launcher3/widget/WidgetsContainerView.java21
1 files changed, 6 insertions, 15 deletions
diff --git a/src/com/android/launcher3/widget/WidgetsContainerView.java b/src/com/android/launcher3/widget/WidgetsContainerView.java
index 05e842e71..778cf9ef1 100644
--- a/src/com/android/launcher3/widget/WidgetsContainerView.java
+++ b/src/com/android/launcher3/widget/WidgetsContainerView.java
@@ -35,7 +35,6 @@ import com.android.launcher3.DeviceProfile;
import com.android.launcher3.DragController;
import com.android.launcher3.DragSource;
import com.android.launcher3.DropTarget.DragObject;
-import com.android.launcher3.model.WidgetsModel;
import com.android.launcher3.Folder;
import com.android.launcher3.IconCache;
import com.android.launcher3.ItemInfo;
@@ -46,6 +45,7 @@ import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.WidgetPreviewLoader;
import com.android.launcher3.Workspace;
+import com.android.launcher3.model.WidgetsModel;
/**
* The widgets list view container.
@@ -56,8 +56,6 @@ public class WidgetsContainerView extends BaseContainerView
private static final String TAG = "WidgetsContainerView";
private static final boolean DEBUG = false;
- private static final int SPRING_MODE_DELAY_MS = 150;
-
/* Coefficient multiplied to the screen height for preloading widgets. */
private static final int PRELOAD_SCREEN_HEIGHT_MULTIPLE = 1;
@@ -186,18 +184,11 @@ public class WidgetsContainerView extends BaseContainerView
Log.e(TAG, "Unexpected dragging view: " + v);
}
- // We delay entering spring-loaded mode slightly to make sure the UI
- // thread is free of any work.
- postDelayed(new Runnable() {
- @Override
- public void run() {
- // We don't enter spring-loaded mode if the drag has been cancelled
- if (mLauncher.getDragController().isDragging()) {
- // Go into spring loaded mode (must happen before we startDrag())
- mLauncher.enterSpringLoadedDragMode();
- }
- }
- }, SPRING_MODE_DELAY_MS);
+ // We don't enter spring-loaded mode if the drag has been cancelled
+ if (mLauncher.getDragController().isDragging()) {
+ // Go into spring loaded mode (must happen before we startDrag())
+ mLauncher.enterSpringLoadedDragMode();
+ }
return true;
}