Skip to content

fix(selection): no other app's text action in the selection toolbar - #15

Merged
gitubpatrice merged 1 commit into
mainfrom
fix/no-other-apps-text-actions
Oct 31, 2026
Merged

gitubpatrice merged 1 commit into
mainfrom
fix/no-other-apps-text-actions

Conversation

@gitubpatrice

Copy link
Copy Markdown
Owner

Flutter fills the selection toolbar of every TextField and SelectableText — the OCR result among them — with the apps that declare an ACTION_PROCESS_TEXT action (the engine's ProcessTextPlugin). Any app may declare one, under any name, and one tap hands it the selected text.

  • Manifest: the <queries> for PROCESS_TEXT, inherited from the Flutter template and used by no code of the app, made them all visible — removed.
  • Not enough on its own: no package visibility before Android 11 (minSdk 24), and from 11 on it is granted per whole app — the remaining <queries> (SEND PDF, VIEW https, SENDTO mailto) make browsers, mail clients and PDF readers visible with all their text actions. configureFlutterEngine now sets, after the engine's own, a handler on FlutterEngine.processTextChannel that lists no action, on every version.

Kept: Cut, Copy, Paste, Select all. Lost: reading aloud from the toolbar (still reachable through its own accessibility shortcut). Android's text classifier ("Translate", fixed in the Kotlin apps) is not involved: Flutter draws its own text.

Not measured on a device — the same mechanism was measured on the Kotlin apps (probe app declaring PROCESS_TEXT). Security review of this diff: no critical or high finding; the engine's ProcessTextPlugin sets its handler in its constructor, before configureFlutterEngine.

🤖 Generated with Claude Code

Flutter fills the selection toolbar of every TextField and SelectableText
(an OCR result among them) with the apps that declare an
ACTION_PROCESS_TEXT action, which the engine's ProcessTextPlugin asks the
system for. Any app may declare one, under any name, and one tap hands
it the selected text.

- The <queries> for PROCESS_TEXT, inherited from the Flutter template and
  used by no code of the app, made them all visible: removed.
- That is not enough: before Android 11 there is no package visibility
  (minSdk is 24), and from 11 on it is granted per whole app — the other
  <queries> (SEND PDF, VIEW https, SENDTO mailto) make browsers, mail
  clients and PDF readers visible with all their text actions.
  configureFlutterEngine now sets, after the engine's own, a handler on
  the engine's ProcessTextChannel that lists no action, on every version.

Kept: Cut, Copy, Paste, Select all. Lost: reading aloud from the toolbar
(TalkBack's action), still reachable through its own accessibility
shortcut. Flutter draws its own text: Android's text classifier, whose
"Translate" the Kotlin apps had to turn off, is not involved here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gitubpatrice
gitubpatrice merged commit 76b4e10 into main Oct 31, 2026
5 checks passed
gitubpatrice added a commit that referenced this pull request Oct 31, 2026
- pubspec.yaml and AppInfo.version: 1.13.7.
- Changelogs EN/FR: the selection toolbar fix (#15) and the clarified legal
  texts (#13).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant