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
This commit is contained in:
Hai Zhang
2019-02-15 18:06:51 -08:00
parent f7ecba9f15
commit a5d8632a13

View File

@@ -196,7 +196,7 @@ public class RoleManagerService extends SystemService implements RoleUserState.C
}
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,