PhoneAccountHandle
class PhoneAccountHandle : Parcelable
The unique identifier for a PhoneAccount
. A PhoneAccountHandle
is made of two parts:
- The component name of the associated connection service.
- A string identifier that is unique across
PhoneAccountHandle
s with the same component name. Apps registering PhoneAccountHandle
s should ensure that the getId()
provided does not expose personally identifying information. A ConnectionService
should use an opaque token as the PhoneAccountHandle
identifier.
Note: This Class requires a non-null
ComponentName
and
UserHandle
to operate properly. Passing in invalid parameters will generate a log warning. See
PhoneAccount
,
TelecomManager
.
Summary
Inherited constants |
From class Parcelable
Int |
CONTENTS_FILE_DESCRIPTOR
Descriptor bit used with describeContents() : indicates that the Parcelable object's flattened representation includes a file descriptor.
|
Int |
PARCELABLE_WRITE_RETURN_VALUE
Flag for use with writeToParcel : the object being written is a return value, that is the result of a function such as "Parcelable someFunction() ", "void someFunction(out Parcelable) ", or "void someFunction(inout Parcelable) ". Some implementations may want to release resources at this point.
|
|
Public methods |
Int |
|
Boolean |
|
ComponentName! |
The ComponentName of the connection service which is responsible for making phone calls using this PhoneAccountHandle .
|
String! |
A string that uniquely distinguishes this particular PhoneAccountHandle from all the others supported by the connection service that created it.
|
UserHandle! |
|
Int |
|
String |
|
Unit |
|
Public constructors
Public methods
describeContents
fun describeContents(): Int
equals
fun equals(other: Any?): Boolean
Parameters |
obj |
the reference object with which to compare. |
Return |
Boolean |
true if this object is the same as the obj argument; false otherwise. |
getComponentName
fun getComponentName(): ComponentName!
The ComponentName
of the connection service which is responsible for making phone calls using this PhoneAccountHandle
.
getId
fun getId(): String!
A string that uniquely distinguishes this particular PhoneAccountHandle
from all the others supported by the connection service that created it.
A connection service must select identifiers that are stable for the lifetime of their users' relationship with their service, across many Android devices. The identifier should be a stable opaque token which uniquely identifies the user within the service. Depending on how a service chooses to operate, a bad set of identifiers might be an increasing series of integers (0
, 1
, 2
, ...) that are generated locally on each phone and could collide with values generated on other phones or after a data wipe of a given phone.
Important: A non-unique identifier could cause non-deterministic call-log backup/restore behavior.
Return |
String! |
A service-specific unique opaque identifier for this PhoneAccountHandle . |
hashCode
fun hashCode(): Int
Return |
Int |
a hash code value for this object. |
toString
fun toString(): String
Return |
String |
a string representation of the object. |
Properties