Merge "Fix preserveLegacyExternalStorage logic" into rvc-dev

This commit is contained in:
TreeHugger Robot
2020-03-20 18:59:59 +00:00
committed by Android (Google) Code Review

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);