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: I6001db062359eda8a7a9cd701315cd7d54d45f84
2 files changed