Add unit test cases to cover utility methods
UT covers the methods below:
- TelephonyPermission.isSystemOrPhone
- TelephonyPermission.isRootOrShell
The CL also introduces aconfig flag to guard the fix.
Bug: 328511085
Test: atest TelephonyPermissionsTest
Flag: com.android.internal.telephony.flags.support_phone_uid_check_for_multiuser
Change-Id: I52d638815901c8325ac49dcce13a000d47543f37
diff --git a/flags/misc.aconfig b/flags/misc.aconfig
index 9d5cbd6..4fe925c 100644
--- a/flags/misc.aconfig
+++ b/flags/misc.aconfig
@@ -217,3 +217,14 @@
purpose: PURPOSE_BUGFIX
}
}
+
+# OWNER=rambowang TARGET=24Q4
+flag {
+ name: "support_phone_uid_check_for_multiuser"
+ namespace: "telephony"
+ description: "Check phone/system processes from UID with multiuser-aware way"
+ bug:"328511085"
+ metadata {
+ purpose: PURPOSE_BUGFIX
+ }
+}