Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 199a542c authored by rambowang's avatar rambowang Committed by Rambo Wang
Browse files

Check system and phone UID in multiple-user-aware way

This CL calls UserHandle.isSameApp to make sure the UID check with
Process.SYSTEM_UID and PHONE_UID are multiple-user-aware.

The logic to directly compare UID with PROCESS.XXX_UID only works for
system user. For secondary users, system/phone processes may run with
UID prefixed with user id.

UserHandle.isSameApp helps to correctly detect the system/phone process
by comparing only the App id part.

Bug: 328511085
Test: atest PackageManagerServiceTest LocationAccessPolicyTest
Flag: com.android.internal.telephony.flags.support_phone_uid_check_for_multiuser
Change-Id: I99b6979ed7775f9aad0e9b241f10d8b50c468167
parent b283f3d3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment