diff options
| author | Nikita Dubrovsky <dubrovsky@google.com> | 2020-04-15 14:34:47 -0700 |
|---|---|---|
| committer | Nikita Dubrovsky <dubrovsky@google.com> | 2020-04-19 22:55:37 -0700 |
| commit | bc495089fdd87afaa3a7fb8d93aed714d4d29918 (patch) | |
| tree | 79410097fefa1092f8038beb7576be1267194073 /core/java/android/widget/RichContentReceiver.java | |
| parent | a4c47c98dc09e7dc65f0cf23a3ad329275dbcd5b (diff) | |
Rename RichContentReceiver.SOURCE_MENU to SOURCE_CLIPBOARD
Using "menu" was ambiguous since ACTION_PROCESS_TEXT is also triggered
via the menu but has its own enum value.
Bug: 152068298
Bug: 154151141
Test: ran tests
atest CtsWidgetTestCases:TextViewRichContentReceiverTest
Change-Id: I3805577e9d7bbf55d40339d37820cd7f510da37e
Diffstat (limited to 'core/java/android/widget/RichContentReceiver.java')
| -rw-r--r-- | core/java/android/widget/RichContentReceiver.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/java/android/widget/RichContentReceiver.java b/core/java/android/widget/RichContentReceiver.java index 2e4a243ab6f3..9497f013bcc4 100644 --- a/core/java/android/widget/RichContentReceiver.java +++ b/core/java/android/widget/RichContentReceiver.java @@ -74,16 +74,16 @@ public interface RichContentReceiver<T extends View> { * * @hide */ - @IntDef(prefix = {"SOURCE_"}, value = {SOURCE_MENU, SOURCE_INPUT_METHOD, SOURCE_DRAG_AND_DROP, - SOURCE_AUTOFILL, SOURCE_PROCESS_TEXT}) + @IntDef(prefix = {"SOURCE_"}, value = {SOURCE_CLIPBOARD, SOURCE_INPUT_METHOD, + SOURCE_DRAG_AND_DROP, SOURCE_AUTOFILL, SOURCE_PROCESS_TEXT}) @Retention(RetentionPolicy.SOURCE) @interface Source {} /** - * Specifies that the operation was triggered from the insertion/selection menu ("Paste" or - * "Paste as plain text" action). + * Specifies that the operation was triggered by a paste from the clipboard (e.g. "Paste" or + * "Paste as plain text" action in the insertion/selection menu). */ - int SOURCE_MENU = 0; + int SOURCE_CLIPBOARD = 0; /** * Specifies that the operation was triggered from the soft keyboard (also known as input method @@ -131,7 +131,7 @@ public interface RichContentReceiver<T extends View> { * <p>For editable {@link TextView} components, this function will be invoked for the * following scenarios: * <ol> - * <li>Paste from the clipboard ("Paste" and "Paste as plain text" actions in the + * <li>Paste from the clipboard (e.g. "Paste" or "Paste as plain text" action in the * insertion/selection menu) * <li>Content insertion from the keyboard ({@link InputConnection#commitContent}) * <li>Drag and drop ({@link View#onDragEvent}) |
