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

Commit d85d8539 authored by Daniel Nishi's avatar Daniel Nishi
Browse files

Fix a near instant stats permission check false negative.

The MODE_DEFAULT enforcePermission behavior fell through to
the switch default case, even if the calling permission was
granted.

Bug: 34258237
Test: Manual
Change-Id: I823fb4dc3657c15eb1fa3d12d4f4c7e1e9e21cd5
parent 6f773a0d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -86,6 +86,7 @@ public class StorageStatsService extends IStorageStatsManager.Stub {
            case AppOpsManager.MODE_DEFAULT:
                mContext.enforceCallingPermission(
                        android.Manifest.permission.PACKAGE_USAGE_STATS, TAG);
                return;
            default:
                throw new SecurityException("Blocked by mode " + mode);
        }