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
This commit is contained in:
1 parent
5cc7af12f1
commit
58376925f9
7 files changed
+53
-76
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user