public static class PhoneAccount.Builder extends Object
PhoneAccount
.Constructor and Description |
---|
Builder(PhoneAccount phoneAccount)
Creates an instance of the
PhoneAccount.Builder from an existing
PhoneAccount . |
Builder(PhoneAccountHandle accountHandle,
CharSequence label)
Creates a builder with the specified
PhoneAccountHandle and label. |
Modifier and Type | Method and Description |
---|---|
PhoneAccount.Builder |
addSupportedUriScheme(String uriScheme)
Specifies an additional URI scheme supported by the
PhoneAccount . |
PhoneAccount |
build()
Creates an instance of a
PhoneAccount based on the current builder settings. |
PhoneAccount.Builder |
setAddress(Uri value)
Sets the address.
|
PhoneAccount.Builder |
setCapabilities(int value)
Sets the capabilities.
|
PhoneAccount.Builder |
setExtras(Bundle extras)
Specifies the extras associated with the
PhoneAccount . |
PhoneAccount.Builder |
setGroupId(String groupId)
Sets the group Id of the
PhoneAccount . |
PhoneAccount.Builder |
setHighlightColor(int value)
Sets the highlight color.
|
PhoneAccount.Builder |
setIcon(Icon icon)
Sets the icon.
|
PhoneAccount.Builder |
setIsEnabled(boolean isEnabled)
Sets the enabled state of the phone account.
|
PhoneAccount.Builder |
setShortDescription(CharSequence value)
Sets the short description.
|
PhoneAccount.Builder |
setSubscriptionAddress(Uri value)
Sets the subscription address.
|
PhoneAccount.Builder |
setSupportedUriSchemes(List<String> uriSchemes)
Specifies the URI schemes supported by the
PhoneAccount . |
public Builder(PhoneAccountHandle accountHandle, CharSequence label)
PhoneAccountHandle
and label.public Builder(PhoneAccount phoneAccount)
PhoneAccount.Builder
from an existing
PhoneAccount
.phoneAccount
- The PhoneAccount
used to initialize the builder.public PhoneAccount.Builder setAddress(Uri value)
PhoneAccount.getAddress()
.value
- The address of the phone account.public PhoneAccount.Builder setSubscriptionAddress(Uri value)
PhoneAccount.getSubscriptionAddress()
.value
- The subscription address.public PhoneAccount.Builder setCapabilities(int value)
PhoneAccount.getCapabilities()
.value
- The capabilities to set.public PhoneAccount.Builder setIcon(Icon icon)
PhoneAccount.getIcon()
.icon
- The icon to set.public PhoneAccount.Builder setHighlightColor(int value)
PhoneAccount.getHighlightColor()
.value
- The highlight color.public PhoneAccount.Builder setShortDescription(CharSequence value)
PhoneAccount.getShortDescription()
.value
- The short description.public PhoneAccount.Builder addSupportedUriScheme(String uriScheme)
PhoneAccount
.uriScheme
- The URI scheme.public PhoneAccount.Builder setSupportedUriSchemes(List<String> uriSchemes)
PhoneAccount
.uriSchemes
- The URI schemes.public PhoneAccount.Builder setExtras(Bundle extras)
PhoneAccount
.
PhoneAccount
s only support extra values of type: String
, Integer
,
and Boolean
. Extras which are not of these types are ignored.
extras
- public PhoneAccount.Builder setIsEnabled(boolean isEnabled)
isEnabled
- The enabled state.public PhoneAccount.Builder setGroupId(String groupId)
PhoneAccount
. When a new PhoneAccount
is
registered to Telecom, it will replace another PhoneAccount
that is already
registered in Telecom and take on the current user defaults and enabled status. There can
only be one PhoneAccount
with a non-empty group number registered to Telecom at a
time. By default, there is no group Id for a PhoneAccount
(an empty String). Only
grouped PhoneAccount
s with the same ConnectionService
can be replaced.groupId
- The group Id of the PhoneAccount
that will replace any other
registered PhoneAccount
in Telecom with the same Group Id.public PhoneAccount build()
PhoneAccount
based on the current builder settings.PhoneAccount
.