From 912bdfcffa04f8917ff56cc4e059208c13cbe29c Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Mon, 3 Aug 2015 19:09:55 -0700 Subject: [PATCH] Replacing exception with a log, when uninstalling an app leads to an illegal state Bug: 22491055 Change-Id: Iaf5fe20b717102bdb0a5442dcc33efea30c50d47 --- src/com/android/launcher3/Workspace.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index 086934773f..662eabc7c1 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -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);