Respond to API feedback for directory names.

We have public APIs to set "primary" and "secondary" directory names
when contributing new media, but we don't have a way to read out that
information once an app targets Q.  So define columns to provide API
symmetry.

Also, since these are called "primary" and "secondary", it's
confusing to have a "secondary bucket ID" defined, so rename that to
be a "group ID" instead.

Since this is a major schema change, recalculate all columns that
are derived from file paths.

Fix bugs where we tried dropping SQLite internals when wiping the
schema of a database, which would have always failed.

Bug: 115377970
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: I7b7b7e03bfdae6f94a1d70ac1d9e80776a2171b8
2 files changed