PhoneAccountHandlepublic class PhoneAccountHandle extends Object implements android.os.ParcelableThe unique identifier for a {@link PhoneAccount}. A {@code PhoneAccountHandle} is made of two
parts:
- The component name of the associated {@link ConnectionService}.
- A string identifier that is unique across {@code PhoneAccountHandle}s with the same
component name.
See {@link PhoneAccount},
{@link TelecomManager#registerPhoneAccount TelecomManager.registerPhoneAccount}. |
Fields Summary |
---|
private final android.content.ComponentName | mComponentName | private final String | mId | private final android.os.UserHandle | mUserHandle | public static final Creator | CREATOR |
Methods Summary |
---|
public int | describeContents()
return 0;
| public boolean | equals(java.lang.Object other)
return other != null &&
other instanceof PhoneAccountHandle &&
Objects.equals(((PhoneAccountHandle) other).getComponentName(),
getComponentName()) &&
Objects.equals(((PhoneAccountHandle) other).getId(), getId()) &&
Objects.equals(((PhoneAccountHandle) other).getUserHandle(), getUserHandle());
| public android.content.ComponentName | getComponentName()The {@code ComponentName} of the {@link android.telecom.ConnectionService} which is
responsible for making phone calls using this {@code PhoneAccountHandle}.
return mComponentName;
| public java.lang.String | getId()A string that uniquely distinguishes this particular {@code PhoneAccountHandle} from all the
others supported by the {@link ConnectionService} that created it.
A {@code ConnectionService} must select identifiers that are stable for the lifetime of
their users' relationship with their service, across many Android devices. For example, a
good set of identifiers might be the email addresses with which with users registered for
their accounts with a particular service. Depending on how a service chooses to operate,
a bad set of identifiers might be an increasing series of integers
({@code 0}, {@code 1}, {@code 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.
return mId;
| public android.os.UserHandle | getUserHandle()
return mUserHandle;
| public int | hashCode()
return Objects.hash(mComponentName, mId, mUserHandle);
| public java.lang.String | toString()
// Note: Log.pii called for mId as it can contain personally identifying phone account
// information such as SIP account IDs.
return new StringBuilder().append(mComponentName)
.append(", ")
.append(Log.pii(mId))
.append(", ")
.append(mUserHandle)
.toString();
| public void | writeToParcel(android.os.Parcel out, int flags)
mComponentName.writeToParcel(out, flags);
out.writeString(mId);
mUserHandle.writeToParcel(out, flags);
|
|