OSDN Git Service

[DO NOT MERGE] Split access-media-storage from read-external-storage
authorPhilip P. Moltmann <moltmann@google.com>
Fri, 13 Sep 2019 22:12:34 +0000 (15:12 -0700)
committerHarrison Lingren <hlingren@google.com>
Thu, 24 Oct 2019 16:02:01 +0000 (16:02 +0000)
commitf3ff750f2998f43124ab59a3c0926b37b2a50dbd
treed49087388ddbe1a3a7b30d513bd0776263a2d226
parent0823f1b5088bc53259415a2bd6bb93549ee1c8fe
[DO NOT MERGE] Split access-media-storage from read-external-storage

And also pre-grant it to all apps that currently get any storage
permission pre-granted

Test: atest SplitPermissionTest
      m -j gts && gts-tradefed run commandAndExit gts-dev -m GtsPermissionTestCases --test=com.google.android.permission.gts.DefaultPermissionGrantPolicyTest#testDefaultGrantsWithRemoteExceptions
      Manual testing:
         All combinations of
           - App targetSdk = 28 and 29 (and 22 for extra credit)
           - App having the <uses-permission> tag for
             ACCESS_MEDIA_LOCATION or not
           - Upgrade from P->Q-QPR and from vanilla Q->Q-QPR
         Further upgrade of targetSdk from 28->29 while on Q-QPR
         ==> All permission behavior should make sense. Sometimes there
             are weird, but expected behaviors. Hence we need to
             collect the results and then look at the unexpected ones.
             See SplitPermissionTest for some tests I added for the
             location-background permission which was split from
             the fine/coarse-location permissions
Fixes: 141048840,140961754
Change-Id: Ib9f50d25c002036f13cf2d42fc4d1b214f20920c
(cherry picked from commit ac7b10c135bb148edcad1aad8e19c733d333f769)
core/java/android/app/AppOpsManager.java
data/etc/platform.xml
services/core/java/com/android/server/pm/permission/DefaultPermissionGrantPolicy.java