fix(android): vendor saf_util with a sound pendingResult lifecycle

saf_util 2.0.0 leaves an already-answered MethodChannel.Result behind
in pendingResult: unrelated activity request codes consume (and answer)
the pending picker, and a failed picker launch replies without clearing
the pending state. The next delivery for request 1001 then replies a
second time — IllegalStateException "Reply already submitted" in
MainActivity.onActivityResult, crashing the process.

Vendored at packages/saf_util (BSD-3) with take-and-clear reply
ownership, request codes scoped to the plugin's own pickers, and a
guarded reply on the teardown race.
This commit is contained in:
edde746
2026-07-05 14:16:05 +02:00
parent d9130cd932
commit 173117602a
17 changed files with 2103 additions and 5 deletions
+4 -1
View File
@@ -50,7 +50,10 @@ dependencies:
crypto: ^3.0.7
cryptography: ^2.9.0
file_picker: ^10.3.10
saf_util: ^2.0.0
saf_util:
# Vendored 2.0.0 with a pendingResult lifecycle fix (see its CHANGELOG) —
# upstream double-replies MethodChannel results and crashes the activity.
path: packages/saf_util
saf_stream: ^2.0.0
material_symbols_icons: ^4.2906.0
web_socket_channel: ^3.0.1