Make error message readable.

Add space after "permission" to separate the word from the actual permission name.

Bug: 217770322
Test: N/A
Change-Id: Ib17497c7ce7580e9d866d2c4ca16b335055947f5
(cherry picked from commit 0f65507394)
Merged-In: Ib17497c7ce7580e9d866d2c4ca16b335055947f5
This commit is contained in:
Kweku Adams
2022-03-02 17:34:11 +00:00
committed by Cherrypicker Worker
parent ea151cdacd
commit 2bb81c1575

View File

@@ -1403,7 +1403,7 @@ public class PermissionManagerServiceImpl implements PermissionManagerServiceInt
}
} else {
if (ps.getUserStateOrDefault(userId).isInstantApp() && !bp.isInstant()) {
throw new SecurityException("Cannot grant non-ephemeral permission" + permName
throw new SecurityException("Cannot grant non-ephemeral permission " + permName
+ " for package " + packageName);
}
@@ -3532,8 +3532,9 @@ public class PermissionManagerServiceImpl implements PermissionManagerServiceInt
final Boolean granted =
SystemConfig.getInstance().getOemPermissions(pkg.getPackageName()).get(permission);
if (granted == null) {
throw new IllegalStateException("OEM permission" + permission + " requested by package "
+ pkg.getPackageName() + " must be explicitly declared granted or not");
throw new IllegalStateException("OEM permission " + permission
+ " requested by package " + pkg.getPackageName()
+ " must be explicitly declared granted or not");
}
return Boolean.TRUE == granted;
}