Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c846c39c authored by Madhav's avatar Madhav
Browse files

Update isPotentialEmergencyNumber() feature flag dependency

Given that  isPotentialEmergencyNumber() 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 either FEATURE_TELEPHONY_CALLING or
FEATURE_TELEPHONY_MESSAGING.

Bug: 395178686
Flag: EXEMPT bug fix
Test: atest CtsTelephonyTestCases --no-bazel-mode
Change-Id: I7cd4ba3eda86f4fa277b04495419b934985fe968
parent 06580ed2
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -15669,7 +15669,8 @@ public class TelephonyManager {
     * have the required permission/privileges
     * @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}.
     *
     * @deprecated Please use {@link TelephonyManager#isEmergencyNumber(String)} instead.
     * @hide
@@ -15677,7 +15678,10 @@ public class TelephonyManager {
    @Deprecated
    @SystemApi
    @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
    @RequiresFeature(PackageManager.FEATURE_TELEPHONY_CALLING)
    @RequiresFeature(anyOf = {
        PackageManager.FEATURE_TELEPHONY_CALLING,
        PackageManager.FEATURE_TELEPHONY_MESSAGING
    })
    public boolean isPotentialEmergencyNumber(@NonNull String number) {
        try {
            ITelephony telephony = getITelephony();