9edef25ede
The new MediaProvider design has an internal dynamic security model based on the value stored in OWNER_PACKAGE_NAME, so the OS always needs to consult the provider when resolving Uri permission grants. Blocking calls from the system process like this are typically discouraged, but this is the best we can do with the limited time left, and there is existing precident with getType(). For now, use "forceUriPermissions" as a proxy for determining when we need to consult the provider directly. Bug: 115619667 Test: atest --test-mapping packages/providers/MediaProvider Test: atest android.appsecurity.cts.ExternalStorageHostTest Change-Id: I1d54feeec93fbb4cf5ff55240ef4eae3a35ed068