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

Commit 32f39d97 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 am: 5f62a995

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

Change-Id: I7648f4e8f08f20c0d2cbc95e8bb1fa6f02ff5afe
parents d616fbe9 5f62a995
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);