Merge "Fix preserveLegacyExternalStorage logic" into rvc-dev am: 9ffa70c415 am: 6369ea993b am: a6d6d4e485 am: 17166b13c6

Change-Id: Id70a8c08f8c591ba3de58b87fada82eca26b2117
This commit is contained in:
TreeHugger Robot
2020-03-20 20:06:35 +00:00
committed by Automerger Merge Worker

View File

@@ -163,7 +163,7 @@ public abstract class SoftRestrictedPermissionPolicy {
}
@Override
public boolean mayAllowExtraAppOp() {
return !shouldApplyRestriction && targetSDK <= Build.VERSION_CODES.Q
return !shouldApplyRestriction
&& (hasRequestedLegacyExternalStorage
|| hasWriteMediaStorageGrantedForUid
|| shouldPreserveLegacyExternalStorage);