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

Commit 5f62a995 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Add missing permission enforcement." into sc-dev am: 78896f98

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14772958

Change-Id: Ia9abc1dd9025c2ed5abc0478b1cb528b1e9145b9
parents b63615d0 78896f98
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -543,6 +543,9 @@ public abstract class PermissionControllerService extends Service {
            public void updateUserSensitiveForApp(int uid, @NonNull AndroidFuture callback) {
                Preconditions.checkNotNull(callback, "callback cannot be null");

                enforceSomePermissionsGrantedToCaller(
                        Manifest.permission.ADJUST_RUNTIME_PERMISSIONS_POLICY);

                try {
                    onUpdateUserSensitivePermissionFlags(uid, () -> callback.complete(null));
                } catch (Exception e) {
@@ -609,9 +612,7 @@ public abstract class PermissionControllerService extends Service {
                try {
                    Objects.requireNonNull(permissionGroupName);
                    Objects.requireNonNull(callback);
                    PermissionControllerService
                            .this
                            .onGetGroupOfPlatformPermission(
                    PermissionControllerService.this.onGetGroupOfPlatformPermission(
                            permissionGroupName, callback::complete);
                } catch (Throwable t) {
                    callback.completeExceptionally(t);