Move permission enforcement to be dynamic.

The new storage model can be enabled with a feature flag, so we need
to enforce the old/new storage model dynamically in code, instead of
relying on static <path-permission> manifest tags.

Bug: 120623196
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I1444564a51fe3acda7572134ef7541fe281f34d9
2 files changed