Skip to content

Commit f94c04a

Browse files
Gilles DebunneAndroid (Google) Code Review
authored andcommitted
Merge "Fix for NPE when dragging on TextView"
2 parents a65fb11 + e7769bc commit f94c04a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/java/android/widget/TextView.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8619,7 +8619,7 @@ private boolean isPositionOnText(float x, float y) {
86198619
public boolean onDragEvent(DragEvent event) {
86208620
switch (event.getAction()) {
86218621
case DragEvent.ACTION_DRAG_STARTED:
8622-
return hasInsertionController();
8622+
return mEditor != null && hasInsertionController();
86238623

86248624
case DragEvent.ACTION_DRAG_ENTERED:
86258625
TextView.this.requestFocus();

0 commit comments

Comments
 (0)