PhoneAccountSuggestion
class PhoneAccountSuggestion : Parcelable
kotlin.Any | |
↳ | android.telecom.PhoneAccountSuggestion |
Summary
Constants | |
---|---|
static Int |
Indicates that the |
static Int |
Indicates that the |
static Int |
Indicates that this account is not suggested for use, but is still available. |
static Int |
Indicates that the |
static Int |
Indicates that the |
Inherited constants | |
---|---|
Public constructors | |
---|---|
PhoneAccountSuggestion(handle: PhoneAccountHandle, reason: Int, shouldAutoSelect: Boolean) Creates a new instance of |
Public methods | |
---|---|
Int | |
Boolean | |
PhoneAccountHandle | |
Int | |
Int |
hashCode() |
Boolean |
Suggests whether the dialer should automatically place the call using this account without user interaction. |
Unit |
writeToParcel(dest: Parcel, flags: Int) |
Properties | |
---|---|
static Parcelable.Creator<PhoneAccountSuggestion!> |
Constants
REASON_FREQUENT
static val REASON_FREQUENT: Int
Indicates that the PhoneAccountHandle
is suggested because the user uses it frequently for the number that we are calling.
Value: 2
REASON_INTRA_CARRIER
static val REASON_INTRA_CARRIER: Int
Indicates that the PhoneAccountHandle
is suggested because the number we're calling is on the same carrier, and therefore may have lower rates.
Value: 1
REASON_NONE
static val REASON_NONE: Int
Indicates that this account is not suggested for use, but is still available.
Value: 0
REASON_OTHER
static val REASON_OTHER: Int
Indicates that the PhoneAccountHandle
is suggested for a reason not otherwise enumerated here.
Value: 4
REASON_USER_SET
static val REASON_USER_SET: Int
Indicates that the PhoneAccountHandle
is suggested because the user explicitly specified that it be used for the number we are calling.
Value: 3
Public constructors
PhoneAccountSuggestion
PhoneAccountSuggestion(
handle: PhoneAccountHandle,
reason: Int,
shouldAutoSelect: Boolean)
Creates a new instance of PhoneAccountSuggestion
. This constructor is intended for use by apps implementing a PhoneAccountSuggestionService
, and generally should not be used by dialer apps other than for testing purposes.
Parameters | |
---|---|
handle |
PhoneAccountHandle: The PhoneAccountHandle for this suggestion. This value cannot be null . |
reason |
Int: The reason for this suggestion Value is android.telecom.PhoneAccountSuggestion#REASON_NONE , android.telecom.PhoneAccountSuggestion#REASON_INTRA_CARRIER , android.telecom.PhoneAccountSuggestion#REASON_FREQUENT , android.telecom.PhoneAccountSuggestion#REASON_USER_SET , or android.telecom.PhoneAccountSuggestion#REASON_OTHER |
shouldAutoSelect |
Boolean: Whether the dialer should automatically place the call using this account. See shouldAutoSelect() . |
Public methods
describeContents
fun describeContents(): Int
Return | |
---|---|
Int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR |
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. |
getPhoneAccountHandle
fun getPhoneAccountHandle(): PhoneAccountHandle
Return | |
---|---|
PhoneAccountHandle |
The PhoneAccountHandle for this suggestion. This value cannot be null . |
getReason
fun getReason(): Int
shouldAutoSelect
fun shouldAutoSelect(): Boolean
Suggests whether the dialer should automatically place the call using this account without user interaction. This may be set on multiple PhoneAccountSuggestion
s, and the dialer is free to choose which one to use.
Return | |
---|---|
Boolean |
true if the hint is to auto-select, false otherwise. |
writeToParcel
fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
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_WRITE_RETURN_VALUE . Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE , and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES |