MediaStore should reflect state on disk.

It's an index of data scanned from disk, and it's been misleading to
let people mutate that data directly in MediaStore, since those
edits aren't durable in any way.  We never updated the metadata in
the underlying files, so any changes would be lost when moving
between devices.

This change moves to always re-scan files after they've been edited,
to ensure we pick up metadata changes.  It also ignores direct edit
attempts from apps.

Bug: 120711487
Test: atest android.media.cts.MediaScannerTest
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I4cc3ae24d6c6b5f01fe4bb47610ccf162c81ce83
2 files changed