Separate checks for different types of permission checks

Separate checks for app-op permissions, runtime permissions and app-op
only.

1. MANAGE_EXTERNAL_STORAGE is an app-op permission.
2. READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE are runtime
   permissions.
3. {READ/WRITE}_MEDIA_{IMAGES/AUDIO/VIDEO} are restricted by app-op
only.

Bug: 155515541
Test: atest android.appsecurity.cts.ExternalStorageHostTest#testExternalStorageRead29
Test: atest ExternalStorageHostTest (count of pass/fail tests other than
read29 is constant)
Test: atest FuseDaemonHostTest MediaProviderTest CtsProviderTestCases

Change-Id: I07b44108fa4ce1311836610e27cbffedb815963d
1 file changed