|
18 | 18 | * {@link ProcessTextChannel} is a platform channel that is used by the framework to initiate text |
19 | 19 | * processing feature in the embedding and for the embedding to send back the results. |
20 | 20 | * |
21 | | - * <p>When there is new a text context menu to display, the framework will send to the embedding the |
22 | | - * message {@code ProcessText.queryTextActions}. In response, the {@link |
23 | | - * io.flutter.plugin.text.ProcessTextPlugin} will return a map of all activities that can be |
24 | | - * performed to process text. The map keys are generated IDs and the values are the activities |
25 | | - * labels. On the first request, the {@link io.flutter.plugin.text.ProcessTextPlugin} will make a |
26 | | - * call to Android's package manager to query all activities that can be performed for the {@code |
27 | | - * Intent.ACTION_PROCESS_TEXT} intent. |
| 21 | + * <p>When the framework needs to query the list of text processing actions (for instance to expose |
| 22 | + * them in the selected text context menu), it will send to the embedding the message {@code |
| 23 | + * ProcessText.queryTextActions}. In response, the {@link io.flutter.plugin.text.ProcessTextPlugin} |
| 24 | + * will return a map of all activities that can process text. The map keys are generated IDs and the |
| 25 | + * values are the activities labels. On the first request, the {@link |
| 26 | + * io.flutter.plugin.text.ProcessTextPlugin} will make a call to Android's package manager to query |
| 27 | + * all activities that can be performed for the {@code Intent.ACTION_PROCESS_TEXT} intent. |
28 | 28 | * |
29 | | - * <p>When an text processing action has to be executed, the framework will send to the embedding |
30 | | - * the message {@code ProcessText.processTextAction} with the {@code int id} of the choosen text |
31 | | - * action and the {@code String} of text to process as arguments. In response, the {@link |
| 29 | + * <p>When a text processing action has to be executed, the framework will send to the embedding the |
| 30 | + * message {@code ProcessText.processTextAction} with the {@code int id} of the choosen text action |
| 31 | + * and the {@code String} of text to process as arguments. In response, the {@link |
32 | 32 | * io.flutter.plugin.text.ProcessTextPlugin} will make a call to the Android application activity to |
33 | | - * start the activity exposing the text action and it will return the processed text, or null if the |
34 | | - * activity did not return a value. |
| 33 | + * start the activity exposing the text action. The {@link io.flutter.plugin.text.ProcessTextPlugin} |
| 34 | + * will return the processed text if there is one, or null if the activity did not return a |
| 35 | + * transformed text. |
35 | 36 | * |
36 | 37 | * <p>{@link io.flutter.plugin.text.ProcessTextPlugin} implements {@link ProcessTextMethodHandler} |
37 | 38 | * that parses incoming messages from Flutter. |
@@ -99,15 +100,13 @@ public void setMethodHandler(@Nullable ProcessTextMethodHandler processTextMetho |
99 | 100 | } |
100 | 101 |
|
101 | 102 | public interface ProcessTextMethodHandler { |
102 | | - /** |
103 | | - * Requests the list of text actions. Each text action has a unique id and a localized label. |
104 | | - */ |
| 103 | + /** Requests the map of text actions. Each text action has a unique id and a localized label. */ |
105 | 104 | Map<Integer, String> queryTextActions(); |
106 | 105 |
|
107 | 106 | /** |
108 | 107 | * Requests to run a text action on a given input text. |
109 | 108 | * |
110 | | - * @param id The ID of the text action returned by queryTextActions. |
| 109 | + * @param id The ID of the text action returned by {@code ProcessText.queryTextActions}. |
111 | 110 | * @param input The text to be processed. |
112 | 111 | * @param readOnly Indicates to the activity if the processed text will be used as read-only. |
113 | 112 | * see |
|
0 commit comments