summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorJan Althaus <jalt@google.com>2017-09-14 20:27:14 +0200
committerJan Althaus <jalt@google.com>2017-09-14 20:27:14 +0200
commit423c07f3ff3439bb61893f90c7ded4917a9af0aa (patch)
tree1f03884edda2bbe973d2ca1df96170c0042a823c /core/java/android
parente44481f7e00cd1cc48eeb890dd55fb6ac78d97ac (diff)
Change default smart select range for logging to [0,0]
Bug: 64914512 Test: Manually tested that logs are correct. Will follow up with automated tests. Change-Id: I2ea3010345588d15d615bd923476d7a9f9eac48f
Diffstat (limited to 'core/java/android')
-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) {