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

Commit ce4a4349 authored by Hai Zhang's avatar Hai Zhang Committed by Gerrit Code Review
Browse files

Merge "Fix odm privapp permissions" into main

parents 0c668d12 95a86edf
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3379,7 +3379,7 @@ public class PermissionManagerServiceImpl implements PermissionManagerServiceInt
        final PermissionAllowlist permissionAllowlist =
                SystemConfig.getInstance().getPermissionAllowlist();
        final String packageName = packageState.getPackageName();
        if (packageState.isVendor()) {
        if (packageState.isVendor() || packageState.isOdm()) {
            return permissionAllowlist.getVendorPrivilegedAppAllowlistState(packageName,
                    permissionName);
        } else if (packageState.isProduct()) {
@@ -3474,7 +3474,7 @@ public class PermissionManagerServiceImpl implements PermissionManagerServiceInt
            // the permission's protectionLevel does not have the extra 'vendorPrivileged'
            // flag.
            if (allowed && isPrivilegedPermission && !bp.isVendorPrivileged()
                    && pkgSetting.isVendor()) {
                    && (pkgSetting.isVendor() || pkgSetting.isOdm())) {
                Slog.w(TAG, "Permission " + permissionName
                        + " cannot be granted to privileged vendor apk " + pkg.getPackageName()
                        + " because it isn't a 'vendorPrivileged' permission.");