summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanesh Mondegarian <daneshm90@gmail.com>2014-04-02 04:16:39 (GMT)
committerDanesh M <daneshm90@gmail.com>2014-04-02 04:21:57 (GMT)
commit0f6b4eb9aef14224acea878799c7207b4e3aafed (patch)
treeaba3b7144b73aed8c8286843817c2582ecb039e1
parentb16d27faa1100687bf026398b70090925926526c (diff)
downloadandroid_packages_apps_Trebuchet-0f6b4eb9aef14224acea878799c7207b4e3aafed.zip
android_packages_apps_Trebuchet-0f6b4eb9aef14224acea878799c7207b4e3aafed.tar.gz
android_packages_apps_Trebuchet-0f6b4eb9aef14224acea878799c7207b4e3aafed.tar.bz2
Trebuchet : Check if target is null for cancelled events
If a drag is cancelled on the workspace, ensure not to reference it in onDropCompleted since it will be null as per what DragController passes in. Reproduction steps : Long press a hotseat icon While dragging it, turn off screen. Change-Id: If587e7c9c37ea2e24b7f9cc85db8249ab34dd19f
-rw-r--r--src/com/android/launcher3/Workspace.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index c99a0a5..43994d7 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -3960,7 +3960,7 @@ public class Workspace extends SmoothPagedView
// be done post drop animation.
stripEmptyScreens();
}
- } else if (mDragInfo != null && (!(target instanceof InfoDropTarget))) {
+ } else if (mDragInfo != null && target != null && (!(target instanceof InfoDropTarget))) {
CellLayout cellLayout;
if (mLauncher.isHotseatLayout(target)) {
cellLayout = mLauncher.getHotseat().getLayout();