Check system and phone UID in multiple-user-aware way
This CL calls TelephonyPermissions.isSystemOrPhone 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 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 TelephonyProviderTests
Flag: com.android.internal.telephony.flags.support_phone_uid_check_for_multiuser
Change-Id: I3eed0eecafb888c41f3acda2787fc9ba15c3d9be
1 file changed