Commit 0752dc2
fix(install): stage APKs before the grant dies, and let the prompt alert
Two faults in the notification install path, both found on device.
The install failed with "Permission Denial: opening provider
ru.zdevs.zarchiver.provider.FileProvider ... that is not exported". The
staging comment claimed parsing leaves cached copies in pendingApkUris — that
is only true for archives, which get extracted. A plain APK keeps the
caller's own URI, whose read grant dies with the activity that received the
intent, so the install read it too late and was denied. Copies are now made
explicitly while the grant is alive, exposed through our own FileProvider so
every install backend can open them, and swept after an hour so an
unanswered prompt does not cost disk forever. A partial copy returns null
rather than installing an incomplete split set.
The prompt also sat silently in the shade instead of arriving. Its channel
was IMPORTANCE_DEFAULT, which only earns a shade row — a notification that
asks a question has to interrupt. Now HIGH, under a new channel id because
Android ignores importance changes to a channel that already exists.
Verified on device: the notification arrives with Install / Cancel, and
Install now reaches the system confirmation with no SecurityException.
Heads-up is still suppressed while Do Not Disturb is on, which is the
device's call to make, not ours.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 08657eb commit 0752dc2
2 files changed
Lines changed: 66 additions & 5 deletions
File tree
- app/src/main/java/app/pwhs/universalinstaller/presentation/install
Lines changed: 12 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
69 | 72 | | |
70 | | - | |
| 73 | + | |
| 74 | + | |
71 | 75 | | |
72 | 76 | | |
73 | 77 | | |
| |||
147 | 151 | | |
148 | 152 | | |
149 | 153 | | |
150 | | - | |
| 154 | + | |
151 | 155 | | |
152 | 156 | | |
153 | 157 | | |
| |||
157 | 161 | | |
158 | 162 | | |
159 | 163 | | |
160 | | - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
161 | 169 | | |
162 | 170 | | |
163 | 171 | | |
Lines changed: 54 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
571 | 571 | | |
572 | 572 | | |
573 | 573 | | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
574 | 580 | | |
575 | | - | |
| 581 | + | |
576 | 582 | | |
577 | 583 | | |
578 | 584 | | |
| |||
593 | 599 | | |
594 | 600 | | |
595 | 601 | | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
596 | 643 | | |
597 | 644 | | |
598 | 645 | | |
| |||
1258 | 1305 | | |
1259 | 1306 | | |
1260 | 1307 | | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
1261 | 1314 | | |
1262 | 1315 | | |
1263 | 1316 | | |
| |||
0 commit comments