summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/android/view/textclassifier/logging/SmartSelectionEventTracker.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/java/android/view/textclassifier/logging/SmartSelectionEventTracker.java b/core/java/android/view/textclassifier/logging/SmartSelectionEventTracker.java
index 77aea2345304..d9fb4cc7a3f5 100644
--- a/core/java/android/view/textclassifier/logging/SmartSelectionEventTracker.java
+++ b/core/java/android/view/textclassifier/logging/SmartSelectionEventTracker.java
@@ -211,8 +211,9 @@ public final class SmartSelectionEventTracker {
return (clamp(mSmartIndices[0] - mOrigStart) << 16)
| (clamp(mSmartIndices[1] - mOrigStart) & 0xffff);
}
- // If no smart selection, return start selection indices (i.e. [0, 1])
- return /* (0 << 16) | */ (1 & 0xffff);
+ // If the smart selection model was not run, return invalid selection indices [0,0]. This
+ // allows us to tell from the terminal event alone whether the model was run.
+ return 0;
}
private int getEventDelta(SelectionEvent event) {