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

Commit 7461a557 authored by Ytai Ben-tsvi's avatar Ytai Ben-tsvi Committed by Android (Google) Code Review
Browse files

Merge "Fix permission checking in SoundTriggerService" into sc-dev

parents 146efcb5 b2d3d3ab
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) {