Release persistable URI grants when file references are removed #20

Open
opened 2026-09-16 21:54:50 +02:00 by morten-olsen · 0 comments
Owner

FileReferenceAccess.takePersistableRead takes a long-lived read grant when the user picks a document, but nothing ever
releases it. Deleting the node, or the whole workflow, leaves the grant behind.

Releasing precisely needs a reconcile pass over every stored workflow to find which references are still live before
calling releasePersistableUriPermission, which is the same ownership-derived shape BackgroundResourceManager already
uses for platform registrations rather than a second inventory.

Consequences today are bounded: grants are per-document and Android caps how many an app may hold, so this is untidy
rather than harmful. Worth fixing before file references spread beyond audio.play.

`FileReferenceAccess.takePersistableRead` takes a long-lived read grant when the user picks a document, but nothing ever releases it. Deleting the node, or the whole workflow, leaves the grant behind. Releasing precisely needs a reconcile pass over every stored workflow to find which references are still live before calling `releasePersistableUriPermission`, which is the same ownership-derived shape `BackgroundResourceManager` already uses for platform registrations rather than a second inventory. Consequences today are bounded: grants are per-document and Android caps how many an app may hold, so this is untidy rather than harmful. Worth fixing before file references spread beyond `audio.play`.
Sign in to join this conversation.
No labels
bug
enhancement
feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
incubator/macros#20
No description provided.