Introduce utility methods to check system/phone process for multi-user

Telephony components have multiple user cases to check if the current
process is a system/phone process, or root/shell process.

The utility methods correctly take muliti-user cases into account and
help to reduce the duplication.

Bug: 328511085
Test: atest framewoksTelephonyTests
Flag: com.android.internal.telephony.flags.support_phone_uid_check_for_multiuser
Change-Id: I880262d637e55b1cc0aa6c95f487585dc935d731
1 file changed