Add a documentation in EmergencyNumber#getNumber
If the number starts with a carrier prefix, the
carrier prefix is configured in
{@link CarrierConfigManager#KEY_EMERGENCY_NUMBER_PREFIX_STRING_ARRAY}.
This is important because it provides a solid reference for Apps to
strip the prefix, which they may not prefer to display.
Bug: 137225076
Test: Treehugger
Change-Id: I1f6bd74f1d6eb86fe3326246e0ddb08b9cf7ac11
This commit is contained in:
@@ -22,6 +22,7 @@ import android.hardware.radio.V1_4.EmergencyNumberSource;
|
|||||||
import android.hardware.radio.V1_4.EmergencyServiceCategory;
|
import android.hardware.radio.V1_4.EmergencyServiceCategory;
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
|
import android.telephony.CarrierConfigManager;
|
||||||
import android.telephony.PhoneNumberUtils;
|
import android.telephony.PhoneNumberUtils;
|
||||||
import android.telephony.Rlog;
|
import android.telephony.Rlog;
|
||||||
|
|
||||||
@@ -301,6 +302,9 @@ public final class EmergencyNumber implements Parcelable, Comparable<EmergencyNu
|
|||||||
* The character in the number string is only the dial pad
|
* The character in the number string is only the dial pad
|
||||||
* character('0'-'9', '*', '+', or '#'). For example: 911.
|
* character('0'-'9', '*', '+', or '#'). For example: 911.
|
||||||
*
|
*
|
||||||
|
* If the number starts with carrier prefix, the carrier prefix is configured in
|
||||||
|
* {@link CarrierConfigManager#KEY_EMERGENCY_NUMBER_PREFIX_STRING_ARRAY}.
|
||||||
|
*
|
||||||
* @return the dialing number.
|
* @return the dialing number.
|
||||||
*/
|
*/
|
||||||
public @NonNull String getNumber() {
|
public @NonNull String getNumber() {
|
||||||
|
|||||||
Reference in New Issue
Block a user