summaryrefslogtreecommitdiff
path: root/telephony
diff options
context:
space:
mode:
author Madhav <madhavadas@google.com> 2025-02-10 20:32:36 +0000
committer Madhav <madhavadas@google.com> 2025-03-11 19:52:29 +0000
commit3650f2c5051fe0489cf612e1ffe29dd3da4910e6 (patch)
tree8953c09899c4a025a6d1073e3a87a629e99cc626 /telephony
parent75dd4b653afd76eb61d7199a9e62470015dc00b0 (diff)
Update isEmergencyNumber() feature flag dependency
Given that isEmergencyNumber() functionality is utilized by both calling and messaging modules, and messaging can be enabled without calling, the function's access control should be based on FEATURE_TELEPHONY_CALLING or FEATURE_TELEPHONY_MESSAGING. Bug: 395178686 Flag: EXEMPT bug fix Test: atest CtsTelephonyTestCases --no-bazel-mode Change-Id: I7967ce12e817a35e7b5f57058232bc100bd16023
Diffstat (limited to 'telephony')
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 2983e4442a78..531fe1adcadb 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -15618,9 +15618,13 @@ public class TelephonyManager {
* SIM card(s), Android database, modem, network or defaults; {@code false} otherwise.
* @throws IllegalStateException if the Telephony process is not currently available.
* @throws UnsupportedOperationException If the device does not have
- * {@link PackageManager#FEATURE_TELEPHONY_CALLING}.
+ * {@link PackageManager#FEATURE_TELEPHONY_CALLING} or
+ * {@link PackageManager#FEATURE_TELEPHONY_MESSAGING}.
*/
- @RequiresFeature(PackageManager.FEATURE_TELEPHONY_CALLING)
+ @RequiresFeature(anyOf = {
+ PackageManager.FEATURE_TELEPHONY_CALLING,
+ PackageManager.FEATURE_TELEPHONY_MESSAGING
+ })
public boolean isEmergencyNumber(@NonNull String number) {
try {
ITelephony telephony = getITelephony();