Skip to content

Investigate if MediaStore.trashFile() can be backported for R+ #2

@nift4

Description

@nift4

Only possible for managers because we can't trash a folder's ID otherwise.

Though I do wonder if we can 1. empty a folder, 2. rename the folder to .trashed-<expiry>-<name> using FUSE, 3. add files back in?

This depends on figuring out how markIsTrashedStatus and folders behave in general. The glaring question is mostly: can the file expiry mechanism delete a folder with content? If not (and it sure seems like it can't), how does Android 17's trashFile mark a folder trashed recursively? How can we untrash a folder and keep the hierarchy? (If the expiry mechanism can't do that, we shouldn't support folders with markIsTrashedStatus and not even with MediaStore.trashFile() I suppose.)

Does it even make sense if markIsTrashedStatus has folder support, as it would just be a wrapper which queries the folder ID and doesn't need to check for permissions (maybe it would simply because we call silently fall back to platform API)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions