summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3')
-rw-r--r--src/com/android/launcher3/LauncherAppState.java4
-rw-r--r--src/com/android/launcher3/Workspace.java8
2 files changed, 11 insertions, 1 deletions
diff --git a/src/com/android/launcher3/LauncherAppState.java b/src/com/android/launcher3/LauncherAppState.java
index c0da25e89..af1cdf588 100644
--- a/src/com/android/launcher3/LauncherAppState.java
+++ b/src/com/android/launcher3/LauncherAppState.java
@@ -259,4 +259,8 @@ public class LauncherAppState implements DeviceProfile.DeviceProfileCallbacks {
return getInstance().mBuildInfo.isDogfoodBuild() &&
Launcher.isPropertyEnabled(Launcher.DISABLE_ALL_APPS_PROPERTY);
}
+
+ public static boolean isDogfoodBuild() {
+ return getInstance().mBuildInfo.isDogfoodBuild();
+ }
}
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 690cd1e08..0d0e5af0e 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -4210,7 +4210,13 @@ public class Workspace extends SmoothPagedView
} else {
cellLayout = getScreenWithId(mDragInfo.screenId);
}
- cellLayout.onDropChild(mDragInfo.cell);
+ if (cellLayout == null && LauncherAppState.isDogfoodBuild()) {
+ throw new RuntimeException("Invalid state: cellLayout == null in "
+ + "Workspace#onDropCompleted. Please file a bug. ");
+ }
+ if (cellLayout != null) {
+ cellLayout.onDropChild(mDragInfo.cell);
+ }
}
if ((d.cancelled || target instanceof InfoDropTarget || (beingCalledAfterUninstall && !mUninstallSuccessful))
&& mDragInfo.cell != null) {