Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5518cf58 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

No permissions needed for static disk attributes.

Detecting if a storage device has quota or resgid support isn't
sensitive, so we're okay letting anyone ask about it.

Bug: 112175169
Test: atest android.appsecurity.cts.StorageHostTest#testFullDisk
Change-Id: I1e45eeade0d0d8ea242afca274b45a68972e6b57
parent be3a75cb
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -155,8 +155,6 @@ public class StorageStatsService extends IStorageStatsManager.Stub {

    @Override
    public boolean isQuotaSupported(String volumeUuid, String callingPackage) {
        enforcePermission(Binder.getCallingUid(), callingPackage);

        try {
            return mInstaller.isQuotaSupported(volumeUuid);
        } catch (InstallerException e) {
@@ -166,8 +164,6 @@ public class StorageStatsService extends IStorageStatsManager.Stub {

    @Override
    public boolean isReservedSupported(String volumeUuid, String callingPackage) {
        enforcePermission(Binder.getCallingUid(), callingPackage);

        if (volumeUuid == StorageManager.UUID_PRIVATE_INTERNAL) {
            return SystemProperties.getBoolean(StorageManager.PROP_HAS_RESERVED, false);
        } else {