Gracefully handle invalid volumes for older apps.

Older apps have been asking for invalid volume names, so quietly
ignore those requests until the apps update to target Q.

Remove manual database corruption recovery logic, since it's now
handled by DefaultDatabaseErrorHandler deeper inside the OS.

Open transactions on all relevant databases during batch operations.

Bug: 123296788
Test: atest MediaProviderTests
Test: atest cts/tests/tests/media/src/android/media/cts/MediaScanner*
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: Ib6e7ff52aff8ce5402c1ea0a126bfc7cb8af81a6
1 file changed