Skip to content

Commit e7769bc

Browse files
author
Gilles Debunne
committed
Fix for NPE when dragging on TextView
Bug 6076166 Change-Id: I52b1e2edc451f0601b71af50e6056dcbe69add43
1 parent 35ae6e2 commit e7769bc

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)