Merge "Ensuring that the widget drag outline is padded by the default widget padding. (Bug 10881814)" into jb-ub-now-indigo-rose
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 455265a..201e583 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -3928,8 +3928,7 @@
mIntentsOnWorkspaceFromUpgradePath = null;
}
} else {
- if (!AppsCustomizePagedView.DISABLE_ALL_APPS &&
- mAppsCustomizeContent != null) {
+ if (mAppsCustomizeContent != null) {
mAppsCustomizeContent.setApps(apps);
}
}
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 37a1469..a23d7d0 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -338,7 +338,8 @@
ItemInfo itemInfo, boolean springLoaded) {
int[] size = new int[2];
if (getChildCount() > 0) {
- CellLayout cl = (CellLayout) mLauncher.getWorkspace().getChildAt(0);
+ // Use the first non-custom page to estimate the child position
+ CellLayout cl = (CellLayout) getChildAt(numCustomPages());
Rect r = estimateItemPosition(cl, itemInfo, 0, 0, hSpan, vSpan);
size[0] = r.width();
size[1] = r.height();