Relax checks on dynamic permissions.

We'll have to circle back to enforce this once we do more
investigation.

Test: none
Bug: 67371907
Change-Id: Ib2f73b6e52d56cf080f3a6f224ab4bf452d91a48
This commit is contained in:
Jeff Sharkey
2017-10-17 15:29:41 -06:00
parent 0b57d2f561
commit 4dc50527d8

View File

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