Clarify hasSelection description

It's unintuitive that hasSelection() can return false, while
getSelectionStart() and getSelectionEnd() return meaningful non -1
values.

Test: TreeHugger

Change-Id: Iea2157f4b3b2c13c74547ba31eb4131496f939cc
This commit is contained in:
Hans Boehm
2019-03-07 13:08:15 -08:00
parent 8ced10ec23
commit fd7a3cf9ce

View File

@@ -9420,7 +9420,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
}
/**
* Return true iff there is a selection inside this text view.
* Return true iff there is a selection of nonzero length inside this text view.
*/
public boolean hasSelection() {
final int selectionStart = getSelectionStart();