diff options
| author | Abodunrinwa Toki <toki@google.com> | 2017-04-19 21:02:36 +0100 |
|---|---|---|
| committer | Abodunrinwa Toki <toki@google.com> | 2017-04-19 22:10:51 +0100 |
| commit | 54486c16bac3b31dc04074d2377fe8c63a2e4a0f (patch) | |
| tree | cbe16b3d870c3a62527c3e48459e1ba5a06aa26b /core/java/android/widget/TextViewMetrics.java | |
| parent | f3157e1692349d85ed6e7a3908b350fbcaeb176c (diff) | |
TRON: Log "textAssist" actions.
- Logs when the assist menu item appears in the text selection menu.
- Logs when the assist menu item is selected.
- Logs the the type of the assist menu item that was presented.
Test: Manually tested by looking at the logs. See: go/tron-howto
Bug: 32572232
Change-Id: Ibbbf59423b3f510ab6f2f072962a556c3d6e2f65
Diffstat (limited to 'core/java/android/widget/TextViewMetrics.java')
| -rw-r--r-- | core/java/android/widget/TextViewMetrics.java | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/core/java/android/widget/TextViewMetrics.java b/core/java/android/widget/TextViewMetrics.java index 0a14d3e8b466..96d17943bf09 100644 --- a/core/java/android/widget/TextViewMetrics.java +++ b/core/java/android/widget/TextViewMetrics.java @@ -21,20 +21,45 @@ package android.widget; * * @hide */ -final class TextViewMetrics { +public final class TextViewMetrics { private TextViewMetrics() {} /** * Long press on TextView - no special classification. */ - static final int SUBTYPE_LONG_PRESS_OTHER = 0; + public static final int SUBTYPE_LONG_PRESS_OTHER = 0; /** * Long press on TextView - selection started. */ - static final int SUBTYPE_LONG_PRESS_SELECTION = 1; + public static final int SUBTYPE_LONG_PRESS_SELECTION = 1; /** * Long press on TextView - drag and drop started. */ - static final int SUBTYPE_LONG_PRESS_DRAG_AND_DROP = 2; + public static final int SUBTYPE_LONG_PRESS_DRAG_AND_DROP = 2; + + /** + * Assist menu item (shown or clicked) - classification: other. + */ + public static final int SUBTYPE_ASSIST_MENU_ITEM_OTHER = 0; + + /** + * Assist menu item (shown or clicked) - classification: email. + */ + public static final int SUBTYPE_ASSIST_MENU_ITEM_EMAIL = 1; + + /** + * Assist menu item (shown or clicked) - classification: phone. + */ + public static final int SUBTYPE_ASSIST_MENU_ITEM_PHONE = 2; + + /** + * Assist menu item (shown or clicked) - classification: address. + */ + public static final int SUBTYPE_ASSIST_MENU_ITEM_ADDRESS = 3; + + /** + * Assist menu item (shown or clicked) - classification: url. + */ + public static final int SUBTYPE_ASSIST_MENU_ITEM_URL = 4; } |
