Merge "Fixing widget overlapping another widget (issue 6475997)" into jb-dev
This commit is contained in:
@@ -566,7 +566,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
|
||||
mLauncher.getWorkspace().beginDragShared(v, this);
|
||||
}
|
||||
|
||||
private void loadWidgetInBackground(final PendingAddWidgetInfo info) {
|
||||
private void preloadWidget(final PendingAddWidgetInfo info) {
|
||||
final AppWidgetProviderInfo pInfo = info.info;
|
||||
if (pInfo.configure != null) {
|
||||
return;
|
||||
@@ -613,7 +613,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
|
||||
// We are anticipating a long press, and we use this time to load bind and instantiate
|
||||
// the widget. This will need to be cleaned up if it turns out no long press occurs.
|
||||
mCreateWidgetInfo = new PendingAddWidgetInfo((PendingAddWidgetInfo) v.getTag());
|
||||
loadWidgetInBackground(mCreateWidgetInfo);
|
||||
preloadWidget(mCreateWidgetInfo);
|
||||
}
|
||||
|
||||
private void cleanupWidgetPreloading() {
|
||||
|
||||
@@ -2244,6 +2244,8 @@ public class Workspace extends SmoothPagedView
|
||||
CellLayout.LayoutParams lp = (CellLayout.LayoutParams) cell.getLayoutParams();
|
||||
mTargetCell[0] = lp.cellX;
|
||||
mTargetCell[1] = lp.cellY;
|
||||
CellLayout layout = (CellLayout) cell.getParent().getParent();
|
||||
layout.markCellsAsOccupiedForView(cell);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user