Skip to content
Commit dd819242 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Methods to streamline bulk media operations.

The new storage model being built in Android Q and R means that most
apps will now be limited to read access to most media items on the
device.  This change adds a way for developers to request a user to
grant narrow access to specific media items.

This supports operations like requesting write access, trash/untrash,
favorite/unfavorite, and outright delete.  Once the user confirms the
action in the dialog, the action is carried out with no further
action needed by the caller.

We transport the set of Uris through a ClipData to pave the way for
shifting to ParceledListSlice in a future release.

Since there's many permutations of strings needed, generate them
with a simple Python script to ensure they stay consistent.

Bug: 141911164
Test: atest --test-mapping packages/apps/MediaProvider
Test: atest CtsAppSecurityHostTestCases:android.appsecurity.cts.ExternalStorageHostTest#testMediaEscalation
Change-Id: I2eb3775550ed27c2863af1edc362471e4cb48643
parent 7ba8ed19
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment