summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author helencheuk <helencheuk@google.com> 2025-03-13 15:15:54 +0000
committer helencheuk <helencheuk@google.com> 2025-03-13 15:21:11 +0000
commitde869b3624f07f2b17bf6f2ac8c840b9da4dc573 (patch)
tree4a252bcd16f1441a2f0c09d3223b6d2747899f28 /src
parent69193807f7853a385b130c228889d3b38e39ed6b (diff)
Check null when getting drop view in DragController
When the flag is on, there are some cases dropTarget is null: TaplTestsTaskbar.testOpenMenu_fromTaskbarAllApps TaplTestsTaskbar.testLaunchShortcutInSplitscreen TaplTestsTaskbar.testLaunchShortcut Add logic to check null before getting drop view and calling drop complete. Bug: 343650193 Test: TaplTestsTaskbar.testOpenMenu_fromTaskbarAllApps Test: TaplTestsTaskbar.testLaunchShortcutInSplitscreen Test: TaplTestsTaskbar.testLaunchShortcut Flag: com.android.launcher3.remove_apps_refresh_on_right_click Change-Id: If8ce93bd6f7d0506e2272ca17dd7c19666549cfa
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/dragndrop/DragController.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/android/launcher3/dragndrop/DragController.java b/src/com/android/launcher3/dragndrop/DragController.java
index 284faba9da..415a2c6230 100644
--- a/src/com/android/launcher3/dragndrop/DragController.java
+++ b/src/com/android/launcher3/dragndrop/DragController.java
@@ -544,9 +544,10 @@ public abstract class DragController<T extends ActivityContext>
}
accepted = true;
}
+
+ final View dropTargetAsView = dropTarget.getDropView();
+ dispatchDropComplete(dropTargetAsView, accepted);
}
- final View dropTargetAsView = dropTarget.getDropView();
- dispatchDropComplete(dropTargetAsView, accepted);
}
private DropTarget findDropTarget(final int x, final int y) {