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

Commit 736badef authored by Ytai Ben-tsvi's avatar Ytai Ben-tsvi Committed by Automerger Merge Worker
Browse files

Merge "Fix permission checking in SoundTriggerService" into sc-dev am: 7461a557

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

Change-Id: I74ee5a20150e0538d109832af44bb9e1a251fd4a
parents 3a7f358f 7461a557
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -863,7 +863,12 @@ public class SoundTriggerService extends SystemService {
        }

        private void enforceCallingPermission(String permission) {
            PermissionUtil.checkPermissionForPreflight(mContext, mOriginatorIdentity, permission);
            if (PermissionUtil.checkPermissionForPreflight(mContext, mOriginatorIdentity,
                    permission) != PackageManager.PERMISSION_GRANTED) {
                throw new SecurityException(
                        "Identity " + mOriginatorIdentity + " does not have permission "
                                + permission);
            }
        }

        private void enforceDetectionPermissions(ComponentName detectionService) {