Make getPhoneNumber methods safer and faster
Make the getPhoneNumber() methods a little bit safer
and easier to work with by having both APIs call a
single internal utility method. This eliminates redundant
permissions checks that could all result from a single
method call to getPhoneNumber. In very rare cases, these
permissions checks could have resulted in inconsistent
results due to context switching.
Also fix an issue where DEFAULT_SUBSCRIPTION_ID had some
inconsistent behavior. It would work "correctly" for
PHONE_NUMBER_SOURCE_UICC but wouldn't for the other two
sources.
Bug: 317673478
Test: atest FrameworksTelephonyTests
Change-Id: I53fe0e7afefe1f2bc7d280fa74768b77962bc078
diff --git a/flags/subscription.aconfig b/flags/subscription.aconfig
index 60c0af1..32e8f2d 100644
--- a/flags/subscription.aconfig
+++ b/flags/subscription.aconfig
@@ -52,4 +52,16 @@
namespace: "telephony"
description: "Supports querying if a subscription is associated with the caller"
bug: "325045841"
-}
\ No newline at end of file
+}
+
+# OWNER=nharold TARGET=24Q3
+flag {
+ name: "safer_get_phone_number"
+ namespace: "telephony"
+ description: "Safety and performance improvements for getPhoneNumber()"
+ bug: "317673478"
+
+ metadata {
+ purpose: PURPOSE_BUGFIX
+ }
+}