Associate a UserHandle with each PhoneAccountHandle

This needs to be tracked so that connections get directed to the
correct user. This is not a public API; rather, it will be populated
and read only by the Telecom service.

Expose a new capability, CAPABILITY_MULTI_USER which can be used by
system-privileged apps to indicate that this PhoneAccount may be
used by any user on the device.

Bug: 17421902
Bug: 17421044
Change-Id: I673904a7ae038c88688bba62642e93174e55c308
This commit is contained in:
Evan Charlton
2014-11-25 14:12:57 -08:00
parent 7792b714b6
commit 134dd68ff9
2 changed files with 47 additions and 7 deletions

View File

@@ -104,6 +104,15 @@ public class PhoneAccount implements Parcelable {
*/
public static final int CAPABILITY_PLACE_EMERGENCY_CALLS = 0x10;
/**
* Flag indicating that this {@code PhoneAccount} is capable of being used by all users. This
* should only be used by system apps (and will be ignored for all other apps trying to use it).
* <p>
* See {@link #getCapabilities}
* @hide
*/
public static final int CAPABILITY_MULTI_USER = 0x20;
/**
* URI scheme for telephone number URIs.
*/
@@ -193,6 +202,12 @@ public class PhoneAccount implements Parcelable {
mSupportedUriSchemes.addAll(phoneAccount.getSupportedUriSchemes());
}
/** @hide */
public Builder setAccountHandle(PhoneAccountHandle accountHandle) {
mAccountHandle = accountHandle;
return this;
}
/**
* Sets the address. See {@link PhoneAccount#getAddress}.
*