Merge "Fix an accidentally reverted condition" into pi-dev

This commit is contained in:
Svetoslav Ganov
2018-05-10 01:02:17 +00:00
committed by Android (Google) Code Review

View File

@@ -620,9 +620,8 @@ public class PermissionManagerService {
enforcePermissionCapLocked(info, tree);
bp = new BasePermission(info.name, tree.getSourcePackageName(),
BasePermission.TYPE_DYNAMIC);
} else if (bp.isDynamic()) {
// TODO: switch this back to SecurityException
Slog.wtf(TAG, "Not allowed to modify non-dynamic permission "
} else if (!bp.isDynamic()) {
throw new SecurityException("Not allowed to modify non-dynamic permission "
+ info.name);
}
changed = bp.addToTree(fixedLevel, info, tree);