Merge "Update EmergencyNumber API docs to indicate they can throw." am: 76db055e20 am: 4ddb5b7e1c

Change-Id: Ic6bcd32ab93a97a8d075e720acb5fc17612a3984
This commit is contained in:
Automerger Merge Worker
2020-02-27 19:34:58 +00:00

View File

@@ -11783,6 +11783,7 @@ public class TelephonyManager {
* subscription, the key is {@link SubscriptionManager#getDefaultSubscriptionId}) and the value
* as the list of {@link EmergencyNumber}; empty Map if this information is not available;
* or throw a SecurityException if the caller does not have the permission.
* @throws IllegalStateException if the Telephony process is not currently available.
*/
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
@NonNull
@@ -11830,6 +11831,7 @@ public class TelephonyManager {
* @param number - the number to look up
* @return {@code true} if the given number is an emergency number based on current locale,
* SIM card(s), Android database, modem, network or defaults; {@code false} otherwise.
* @throws IllegalStateException if the Telephony process is not currently available.
*/
public boolean isEmergencyNumber(@NonNull String number) {
try {
@@ -11865,7 +11867,7 @@ public class TelephonyManager {
* the same digits of any current emergency number based on current locale, sim, modem and
* network; {@code false} if it is not; or throw an SecurityException if the caller does not
* have the required permission/privileges
*
* @throws IllegalStateException if the Telephony process is not currently available.
* @hide
*/
@SystemApi