Fix default grant running for secondary user.
USER_SYSTEM is the same thing as the primary user, so we need to pass
USER_ALL to listen to package changes for all users.
Bug: 124452117
Bug: 124401873
Test: manual
Change-Id: Iab8469deb0e1ac3e7c286aba7fe2573187eb76f7
diff --git a/services/core/java/com/android/server/role/RoleManagerService.java b/services/core/java/com/android/server/role/RoleManagerService.java
index d853121..c145a22 100644
--- a/services/core/java/com/android/server/role/RoleManagerService.java
+++ b/services/core/java/com/android/server/role/RoleManagerService.java
@@ -196,7 +196,7 @@
}
performInitialGrantsIfNecessary(userId);
}
- }, UserHandle.SYSTEM, intentFilter, null /* broadcastPermission */, null /* handler */);
+ }, UserHandle.ALL, intentFilter, null, null);
getContext().getContentResolver().registerContentObserver(
Settings.Global.getUriFor(Settings.Global.SMS_ACCESS_RESTRICTION_ENABLED), false,