QueryLocationException


public final class QueryLocationException
extends RuntimeException implements Parcelable

java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ java.lang.RuntimeException
         ↳ android.telecom.QueryLocationException


This class represents a set of exceptions that can occur when requesting a Connection#queryLocationForEmergency(long, String, Executor, OutcomeReceiver)

Summary

Constants

int ERROR_NOT_ALLOWED_FOR_NON_EMERGENCY_CONNECTIONS

The operation has failed due to a location query being requested for a non-emergency connection.

int ERROR_NOT_PERMITTED

The operation has failed because it is not permitted.

int ERROR_PREVIOUS_REQUEST_EXISTS

The operation was rejected due to an existing request.

int ERROR_REQUEST_TIME_OUT

The operation was not completed on time.

int ERROR_SERVICE_UNAVAILABLE

The operation has failed due to the service is not available.

int ERROR_UNSPECIFIED

The operation has failed due to an unknown or unspecified error.

Inherited constants

Fields

public static final Creator<QueryLocationException> CREATOR

Responsible for creating QueryLocationException objects for deserialized Parcels.

Public constructors

QueryLocationException(String message)
QueryLocationException(String message, int code)
QueryLocationException(String message, int code, Throwable cause)

Public methods

int describeContents()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

int getCode()
void writeToParcel(Parcel dest, int flags)

Flatten this object in to a Parcel.

Inherited methods

Constants

ERROR_NOT_ALLOWED_FOR_NON_EMERGENCY_CONNECTIONS

Added in API level 34
public static final int ERROR_NOT_ALLOWED_FOR_NON_EMERGENCY_CONNECTIONS

The operation has failed due to a location query being requested for a non-emergency connection.

Constant Value: 4 (0x00000004)

ERROR_NOT_PERMITTED

Added in API level 34
public static final int ERROR_NOT_PERMITTED

The operation has failed because it is not permitted.

Constant Value: 3 (0x00000003)

ERROR_PREVIOUS_REQUEST_EXISTS

Added in API level 34
public static final int ERROR_PREVIOUS_REQUEST_EXISTS

The operation was rejected due to an existing request.

Constant Value: 2 (0x00000002)

ERROR_REQUEST_TIME_OUT

Added in API level 34
public static final int ERROR_REQUEST_TIME_OUT

The operation was not completed on time.

Constant Value: 1 (0x00000001)

ERROR_SERVICE_UNAVAILABLE

Added in API level 34
public static final int ERROR_SERVICE_UNAVAILABLE

The operation has failed due to the service is not available.

Constant Value: 5 (0x00000005)

ERROR_UNSPECIFIED

Added in API level 34
public static final int ERROR_UNSPECIFIED

The operation has failed due to an unknown or unspecified error.

Constant Value: 6 (0x00000006)

Fields

CREATOR

Added in API level 34
public static final Creator<QueryLocationException> CREATOR

Responsible for creating QueryLocationException objects for deserialized Parcels.

Public constructors

QueryLocationException

Added in API level 34
public QueryLocationException (String message)

Parameters
message String: This value may be null.

QueryLocationException

Added in API level 34
public QueryLocationException (String message, 
                int code)

Parameters
message String: This value may be null.

code int: Value is ERROR_REQUEST_TIME_OUT, ERROR_PREVIOUS_REQUEST_EXISTS, ERROR_NOT_PERMITTED, ERROR_NOT_ALLOWED_FOR_NON_EMERGENCY_CONNECTIONS, ERROR_SERVICE_UNAVAILABLE, or ERROR_UNSPECIFIED

QueryLocationException

Added in API level 34
public QueryLocationException (String message, 
                int code, 
                Throwable cause)

Parameters
message String: This value may be null.

code int: Value is ERROR_REQUEST_TIME_OUT, ERROR_PREVIOUS_REQUEST_EXISTS, ERROR_NOT_PERMITTED, ERROR_NOT_ALLOWED_FOR_NON_EMERGENCY_CONNECTIONS, ERROR_SERVICE_UNAVAILABLE, or ERROR_UNSPECIFIED

cause Throwable: This value may be null.

Public methods

describeContents

Added in API level 34
public int describeContents ()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(android.os.Parcel, int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.

Returns
int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or CONTENTS_FILE_DESCRIPTOR

writeToParcel

Added in API level 34
public void writeToParcel (Parcel dest, 
                int flags)

Flatten this object in to a Parcel.

Parameters
dest Parcel: The Parcel in which the object should be written. This value cannot be null.

flags int: Additional flags about how the object should be written. May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of Parcelable.PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES