Added in API level 29

PhoneAccountSuggestion


class PhoneAccountSuggestion : Parcelable
kotlin.Any
   ↳ android.telecom.PhoneAccountSuggestion

Summary

Constants
static Int

Indicates that the PhoneAccountHandle is suggested because the user uses it frequently for the number that we are calling.

static Int

Indicates that the PhoneAccountHandle is suggested because the number we're calling is on the same carrier, and therefore may have lower rates.

static Int

Indicates that this account is not suggested for use, but is still available.

static Int

Indicates that the PhoneAccountHandle is suggested for a reason not otherwise enumerated here.

static Int

Indicates that the PhoneAccountHandle is suggested because the user explicitly specified that it be used for the number we are calling.

Inherited constants
Public constructors
PhoneAccountSuggestion(handle: PhoneAccountHandle, reason: Int, shouldAutoSelect: Boolean)

Creates a new instance of PhoneAccountSuggestion.

Public methods
Int

Boolean
equals(other: Any?)

PhoneAccountHandle

Int

Int

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

Added in API level 29
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

Added in API level 29
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

Added in API level 29
static val REASON_NONE: Int

Indicates that this account is not suggested for use, but is still available.

Value: 0

REASON_OTHER

Added in API level 29
static val REASON_OTHER: Int

Indicates that the PhoneAccountHandle is suggested for a reason not otherwise enumerated here.

Value: 4

REASON_USER_SET

Added in API level 29
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

Added in API level 29
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

Added in API level 29
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

Added in API level 29
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

Added in API level 29
fun getPhoneAccountHandle(): PhoneAccountHandle
Return
PhoneAccountHandle The PhoneAccountHandle for this suggestion. This value cannot be null.

hashCode

Added in API level 29
fun hashCode(): Int
Return
Int a hash code value for this object.

shouldAutoSelect

Added in API level 29
fun shouldAutoSelect(): Boolean

Suggests whether the dialer should automatically place the call using this account without user interaction. This may be set on multiple PhoneAccountSuggestions, and the dialer is free to choose which one to use.

Return
Boolean true if the hint is to auto-select, false otherwise.

writeToParcel

Added in API level 29
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

Properties

CREATOR

Added in API level 29
static val CREATOR: Parcelable.Creator<PhoneAccountSuggestion!>