Check phone or system process in PMS with multiple-user-aware way

This CL checks phone or system process by the help of
TelephonyPermission.isSystemOrPhone which works not only for system user
but also secondary users in which 1000/1001 is the app id instead of
UID.

Bug: 328511085
Test: atest PackageManagerServiceTest
Flag: com.android.internal.telephony.flags.support_phone_uid_check_for_multiuser
Change-Id: I936c16b63924452cd68b4a38a8ce3369c7913d87
2 files changed