Replacing exception with a log, when uninstalling an app leads to an illegal state

Bug: 22491055
Change-Id: Iaf5fe20b717102bdb0a5442dcc33efea30c50d47
This commit is contained in:
Sunny Goyal
2015-08-03 19:09:55 -07:00
parent 6eeab68fd4
commit 912bdfcffa

View File

@@ -3768,7 +3768,11 @@ public class Workspace extends PagedView
if (parentCell != null) {
parentCell.removeView(v);
} else if (LauncherAppState.isDogfoodBuild()) {
throw new NullPointerException("mDragInfo.cell has null parent");
// When an app is uninstalled using the drop target, we wait until resume to remove
// the icon. We also remove all the corresponding items from the workspace at
// {@link Launcher#bindComponentsRemoved}. That call can come before or after
// {@link Launcher#mOnResumeCallbacks} depending on how busy the worker thread is.
Log.e(TAG, "mDragInfo.cell has null parent");
}
if (v instanceof DropTarget) {
mDragController.removeDropTarget((DropTarget) v);