Commit 7b3fa2a
fix(install): point the staged parse at the staged copies
Staging the APKs was not enough: the install kept reading the source anyway.
confirmInstall takes its URIs from apkInfo.splitEntries whenever there are
any, and only falls back to pendingApkUris otherwise. Stashing put the staged
copies in pendingApkUris but handed back an apkInfo whose splitEntries still
pointed at the file the other app gave us — and every package has at least
one split entry, including a plain single APK. So the staged copies were
never touched and the install read the source URI exactly as before.
Whether that fails depends on who the source is, which is why it looked
fixed. A MediaStore URI stays readable through our media access, so opening
from the system file list worked. A URI from another app's FileProvider —
ZArchiver's, in the report — carries a one-shot grant that dies with the
activity, and the install hit "Permission Denial: opening provider
ru.zdevs.zarchiver.provider.FileProvider ... not exported". Same code path,
opposite outcome, so testing through MediaStore proved nothing.
The stashed parse is now rewritten to reference the copies. Every split is
staged rather than only the selected ones: opening the dialog from the
notification can change the selection afterwards, and an unselected split
still pointing at the dead source would fail the moment it was ticked.
Not yet verified on device — the phone dropped off adb before this build
could be installed, and it needs testing from ZArchiver specifically, not
from a MediaStore URI.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 64cc88b commit 7b3fa2a
1 file changed
Lines changed: 30 additions & 12 deletions
Lines changed: 30 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
563 | 563 | | |
564 | 564 | | |
565 | 565 | | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
| 566 | + | |
572 | 567 | | |
573 | 568 | | |
574 | | - | |
575 | | - | |
576 | | - | |
577 | | - | |
578 | | - | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
579 | 597 | | |
580 | 598 | | |
581 | 599 | | |
| |||
587 | 605 | | |
588 | 606 | | |
589 | 607 | | |
590 | | - | |
| 608 | + | |
591 | 609 | | |
592 | 610 | | |
593 | 611 | | |
| |||
0 commit comments