Use correct packageName for checking if it belongs to callingUid.
In AccountManagerService.getAccountsAsUser, we check if opPackageName belongs to calling uid by calling AppOpsManager.checkPackage. But when AccountManagerService.getAccountsAsUser is called from AccountManagerService.addSharedAccountsFromParentUser, we're using the opPackageName from system context instead of calling context. Bug: 35258008 Test: cts-tradefed run singleCommand cts-dev --module CtsMultiUserHostTestCases \ -t android.host.multiuser.CreateUsersPermissionTest#testCanCreateRestrictedUser Change-Id: I5c425d9314beb86f7c64a5b5c64b7d879711879a
Loading
Please register or sign in to comment