Commit d93fe23
authored
[Android] Add support for text processing actions (flutter#44579)
## Description
This Android related PR adds a channel buffer and a plugin to interact with Android 'process text' feature. It makes it possible to query text processing actions and to run those actions (for instance 'calling' Google translate).
Text actions that outputs a processed text are supported.
The implementation is based on the great sample provided by @gualse , see flutter/flutter#107603 (comment).
In order to return a non empty list of text actions, the implementation will require adding a section to the Android manifest file (see flutter/flutter#107603 (comment)).
Adding this section automatically to new or existing Flutter apps is not part of this PR but will be tackled in a future PR.
## Related Issue
Android engine side for flutter/flutter#107603
## Tests
Adds 3 tests.1 parent d28fdb0 commit d93fe23
File tree
7 files changed
+566
-0
lines changed- ci/licenses_golden
- shell/platform/android
- io/flutter
- embedding/engine
- systemchannels
- plugin/text
- test/io/flutter/plugin/text
7 files changed
+566
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3091 | 3091 | | |
3092 | 3092 | | |
3093 | 3093 | | |
| 3094 | + | |
3094 | 3095 | | |
3095 | 3096 | | |
3096 | 3097 | | |
| |||
3133 | 3134 | | |
3134 | 3135 | | |
3135 | 3136 | | |
| 3137 | + | |
3136 | 3138 | | |
3137 | 3139 | | |
3138 | 3140 | | |
| |||
5861 | 5863 | | |
5862 | 5864 | | |
5863 | 5865 | | |
| 5866 | + | |
5864 | 5867 | | |
5865 | 5868 | | |
5866 | 5869 | | |
| |||
5908 | 5911 | | |
5909 | 5912 | | |
5910 | 5913 | | |
| 5914 | + | |
5911 | 5915 | | |
5912 | 5916 | | |
5913 | 5917 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
27 | 35 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
| 268 | + | |
268 | 269 | | |
269 | 270 | | |
270 | 271 | | |
| |||
312 | 313 | | |
313 | 314 | | |
314 | 315 | | |
| 316 | + | |
315 | 317 | | |
316 | 318 | | |
317 | 319 | | |
| |||
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| 42 | + | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
| |||
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
| 100 | + | |
98 | 101 | | |
99 | 102 | | |
100 | 103 | | |
| |||
329 | 332 | | |
330 | 333 | | |
331 | 334 | | |
| 335 | + | |
332 | 336 | | |
333 | 337 | | |
334 | 338 | | |
| |||
384 | 388 | | |
385 | 389 | | |
386 | 390 | | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
387 | 394 | | |
388 | 395 | | |
389 | 396 | | |
| |||
545 | 552 | | |
546 | 553 | | |
547 | 554 | | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
548 | 561 | | |
549 | 562 | | |
550 | 563 | | |
| |||
Lines changed: 122 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
0 commit comments