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

Commit 889fd847 authored by Jayachandran C's avatar Jayachandran C Committed by Android (Google) Code Review
Browse files

Merge "Guard isWpsCallNumber system API with feature flag" into main

parents 8b802d84 48894a50
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -44504,7 +44504,7 @@ package android.telephony {
    method public static final boolean isStartsPostDial(char);
    method public static boolean isVoiceMailNumber(String);
    method public static boolean isWellFormedSmsAddress(String);
    method public static boolean isWpsCallNumber(@Nullable String);
    method @FlaggedApi("com.android.internal.telephony.flags.enable_wps_check_api_flag") public static boolean isWpsCallNumber(@NonNull String);
    method public static byte[] networkPortionToCalledPartyBCD(String);
    method public static byte[] networkPortionToCalledPartyBCDWithLength(String);
    method public static String normalizeNumber(String);
+4 −1
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.telephony;

import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -43,6 +44,7 @@ import com.android.i18n.phonenumbers.NumberParseException;
import com.android.i18n.phonenumbers.PhoneNumberUtil;
import com.android.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberFormat;
import com.android.i18n.phonenumbers.Phonenumber.PhoneNumber;
import com.android.internal.telephony.flags.Flags;
import com.android.telephony.Rlog;

import java.lang.annotation.Retention;
@@ -2957,7 +2959,8 @@ public class PhoneNumberUtils {
     * @param number  The phone number used for WPS call.
     * @return {@code true} if number matches WPS pattern and {@code false} otherwise.
     */
    public static boolean isWpsCallNumber(@Nullable String number) {
    @FlaggedApi(Flags.FLAG_ENABLE_WPS_CHECK_API_FLAG)
    public static boolean isWpsCallNumber(@NonNull String number) {
        return (number != null) && (number.startsWith(PREFIX_WPS)
                || number.startsWith(PREFIX_WPS_CLIR_ACTIVATE)
                || number.startsWith(PREFIX_WPS_CLIR_DEACTIVATE));