Merge "Update EmergencyNumber API docs to indicate they can throw." am: 76db055e20
Change-Id: I1e34df3e17c249e26ac7d3cd813430e39bafaae9
This commit is contained in:
@@ -11605,6 +11605,7 @@ public class TelephonyManager {
|
|||||||
* subscription, the key is {@link SubscriptionManager#getDefaultSubscriptionId}) and the value
|
* subscription, the key is {@link SubscriptionManager#getDefaultSubscriptionId}) and the value
|
||||||
* as the list of {@link EmergencyNumber}; empty Map if this information is not available;
|
* 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.
|
* 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)
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
||||||
@NonNull
|
@NonNull
|
||||||
@@ -11652,6 +11653,7 @@ public class TelephonyManager {
|
|||||||
* @param number - the number to look up
|
* @param number - the number to look up
|
||||||
* @return {@code true} if the given number is an emergency number based on current locale,
|
* @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.
|
* 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) {
|
public boolean isEmergencyNumber(@NonNull String number) {
|
||||||
try {
|
try {
|
||||||
@@ -11687,7 +11689,7 @@ public class TelephonyManager {
|
|||||||
* the same digits of any current emergency number based on current locale, sim, modem and
|
* 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
|
* network; {@code false} if it is not; or throw an SecurityException if the caller does not
|
||||||
* have the required permission/privileges
|
* have the required permission/privileges
|
||||||
*
|
* @throws IllegalStateException if the Telephony process is not currently available.
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
@SystemApi
|
@SystemApi
|
||||||
|
|||||||
Reference in New Issue
Block a user