On CPS rebind, check if package is allowed

Test: cts test
Change-Id: If24b91f20cd5f2074223c2857add1879b76cb383
Fixes: 113634185
This commit is contained in:
Beverly
2018-09-07 13:38:21 -04:00
parent 77e36b7ba7
commit 2d783fc167

View File

@@ -694,7 +694,8 @@ abstract public class ManagedServices {
for (int userId : userIds) {
if (enabled) {
if (isPackageOrComponentAllowed(component.toString(), userId)) {
if (isPackageOrComponentAllowed(component.toString(), userId)
|| isPackageOrComponentAllowed(component.getPackageName(), userId)) {
registerServiceLocked(component, userId);
} else {
Slog.d(TAG, component + " no longer has permission to be bound");