summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramFragmentFixedFunction.java
diff options
context:
space:
mode:
authorMartijn Coenen <maco@google.com>2020-10-06 12:30:58 +0200
committerMartijn Coenen <maco@google.com>2020-11-23 14:44:22 +0000
commitc57e3455ff29b0a15a8781a34c19c6ded196f69e (patch)
tree382961c60698f712d597279c3caa2e14a5ebefdf /rs/java/android/renderscript/ProgramFragmentFixedFunction.java
parent3acf806a9e9b22f3d31b39e7c971e52b49c770ea (diff)
Make sure we preserve preserveLegacyExternalStorage.
This could be lost after a reboot, due to the following sequence of events: 1) App targets SDK 29 and has LEGACY_STORAGE 2) App updates to a version with targetSdk30 and preserveLegacyExternalStorage 3) App maintains LEGACY_STORAGE, because we currently have it and preserve was requested 4) We reboot 5) When evaluating the READ_EXTERNAL_STORAGE permission, we check whether we should grant the LEGACY_STORAGE extra app-op by calling mayAllowExtraAppOp(); this call returns false, because there's a check whether the app *currently* has LEGACY_STORAGE, which isn't true. 6) We then check whether we should deny LEGACY_STORAGE if it was previously granted; this returns true, because it was implemented as the inverse of 5) 7) LEGACY_STORAGE is denied Fix this by more explicitly coding what allows us to get the appop, and how it can be removed once we already have it. Bug: 169943139 Test: atest RestrictedStoragePermissionTest Test: atest PreserveLegacyStorageHostTest Change-Id: Ic24372348118ad9ed818a28f377e0decc78b9ecc
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions