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

Public APIs for "trashing" media.

The "delete" operation is immediate and permanent, and users may wish
to instead mark content as being "trashed", so they can recover
accidentally trashed items before they're permanently deleted.

The default trash timeout is 48 hours, which should be enough time
to recover items the user cares about.  Apps can also use a custom
timeout if desired.

This is implemented by recording an "expiration" time for trashed
items, and deleting expired items during the next idle maintenance
pass.  Also use this expiration time to clean up pending items that
haven't been published; by default apps have a day to publish
pending items.

Bug: 121227045
Test: atest MediaProviderTests
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I2e371b308dc135ad5363709a6f5385e4456bcb96
parent 7b148d7a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment