Get userId from stored CallingUid when calling identity is cleared

Test: atest ContextCrossProfileHostTest -c
Bug: 279006975
Change-Id: I524797994218fee720a9168960b510a76a2f38ac
This commit is contained in:
Nikhil Kumar
2023-04-25 18:23:04 +01:00
parent 0f74f7d7d2
commit 0edb20374c

View File

@@ -3866,7 +3866,7 @@ public final class ActiveServices {
if (UserHandle.isCore(callingUid)) {
return;
}
final int callingUserId = UserHandle.getCallingUserId();
final int callingUserId = UserHandle.getUserId(callingUid);
if (callingUserId == userId
|| !mAm.mUserController.isSameProfileGroup(callingUserId, userId)) {
return;