Don't require WRITE_EXTERNAL_STORAGE for non-legacy apps

MediaProvider requires W_E_S for certain write operations that have to
do with media (audio, images, video), even for non-legacy apps. Since
we're deprecating W_E_S, we don't expect any upgraded apps to have that
permission, and instead it should be suffecient for them to have the
WRITE_MEDIA_... app-ops. Therefore it makes sense to relax the
WRITE_EXTERNAL_STORAGE requirement for those apps and keep it only for
legacy apps.

This CL changes PermissionUtils methods that check write media app-ops
(WRITE_MEDIA_{AUDIO,IMAGES,VIDEO}) to not require W_E_S for non-legacy
apps.

Test: atest --test-mapping
Change-Id: Iecac749859af17e6c78eebe7d59792d9e1bf5181
1 file changed