diff options
author | Nancy Chen <nancychen@google.com> | 2014-09-15 17:58:42 -0700 |
---|---|---|
committer | Nancy Chen <nancychen@google.com> | 2014-09-16 10:52:48 -0700 |
commit | 210ef039fbceced2485b89ae30e6d7da62f204f4 (patch) | |
tree | 124f40664f607102ac01cd7e16ccb341b0c2b65b /telecomm/java/android/telecom/PhoneAccount.java | |
parent | a2f945e227d8059e3ff9c41676146b057cd7ddbe (diff) | |
download | frameworks_base-210ef039fbceced2485b89ae30e6d7da62f204f4.zip frameworks_base-210ef039fbceced2485b89ae30e6d7da62f204f4.tar.gz frameworks_base-210ef039fbceced2485b89ae30e6d7da62f204f4.tar.bz2 |
Remove ability to enable/disable phoneaccounts (1/6)
Enabling/disabling of phone accounts was only used for SIP accounts and
is no longer necessary for the purpose it was put in.
- Remove all references to enabling/disabling phone accounts
+ Rename getEnabledPhoneAccounts -> getCallCapablePhoneAccounts
Bug: 17510811
Change-Id: Id805daae3cc698c75f5e747b6a6107ab0bd3afa0
Diffstat (limited to 'telecomm/java/android/telecom/PhoneAccount.java')
-rw-r--r-- | telecomm/java/android/telecom/PhoneAccount.java | 45 |
1 files changed, 2 insertions, 43 deletions
diff --git a/telecomm/java/android/telecom/PhoneAccount.java b/telecomm/java/android/telecom/PhoneAccount.java index 0c233eb..4b059b24 100644 --- a/telecomm/java/android/telecom/PhoneAccount.java +++ b/telecomm/java/android/telecom/PhoneAccount.java @@ -91,17 +91,6 @@ public class PhoneAccount implements Parcelable { public static final int CAPABILITY_PLACE_EMERGENCY_CALLS = 0x10; /** - * Flag indicating that this {@code PhoneAccount} is always enabled and cannot be disabled by - * the user. - * This capability is reserved for important {@code PhoneAccount}s such as the emergency calling - * only {@code PhoneAccount}. - * <p> - * See {@link #getCapabilities} - * @hide - */ - public static final int CAPABILITY_ALWAYS_ENABLED = 0x20; - - /** * URI scheme for telephone number URIs. */ public static final String SCHEME_TEL = "tel"; @@ -124,7 +113,6 @@ public class PhoneAccount implements Parcelable { private final CharSequence mLabel; private final CharSequence mShortDescription; private final List<String> mSupportedUriSchemes; - private final boolean mIsEnabled; public static class Builder { private PhoneAccountHandle mAccountHandle; @@ -135,7 +123,6 @@ public class PhoneAccount implements Parcelable { private CharSequence mLabel; private CharSequence mShortDescription; private List<String> mSupportedUriSchemes = new ArrayList<String>(); - private boolean mIsEnabled = false; public Builder(PhoneAccountHandle accountHandle, CharSequence label) { this.mAccountHandle = accountHandle; @@ -157,7 +144,6 @@ public class PhoneAccount implements Parcelable { mLabel = phoneAccount.getLabel(); mShortDescription = phoneAccount.getShortDescription(); mSupportedUriSchemes.addAll(phoneAccount.getSupportedUriSchemes()); - mIsEnabled = phoneAccount.isEnabled(); } public Builder setAddress(Uri value) { @@ -217,19 +203,6 @@ public class PhoneAccount implements Parcelable { } /** - * Specifies whether the {@link PhoneAccount} is enabled or not. {@link PhoneAccount}s are - * by default not enabled. - * - * @param value {@code True} if the {@link PhoneAccount} is enabled. - * @return The Builder. - * @hide - */ - public Builder setEnabled(boolean value) { - this.mIsEnabled = value; - return this; - } - - /** * Creates an instance of a {@link PhoneAccount} based on the current builder settings. * * @return The {@link PhoneAccount}. @@ -248,8 +221,7 @@ public class PhoneAccount implements Parcelable { mIconResId, mLabel, mShortDescription, - mSupportedUriSchemes, - mIsEnabled); + mSupportedUriSchemes); } } @@ -261,8 +233,7 @@ public class PhoneAccount implements Parcelable { int iconResId, CharSequence label, CharSequence shortDescription, - List<String> supportedUriSchemes, - boolean enabled) { + List<String> supportedUriSchemes) { mAccountHandle = account; mAddress = address; mSubscriptionAddress = subscriptionAddress; @@ -271,7 +242,6 @@ public class PhoneAccount implements Parcelable { mLabel = label; mShortDescription = shortDescription; mSupportedUriSchemes = Collections.unmodifiableList(supportedUriSchemes); - mIsEnabled = enabled; } public static Builder builder( @@ -392,15 +362,6 @@ public class PhoneAccount implements Parcelable { } /** - * Determines whether this {@code PhoneAccount} is enabled. - * - * @return {@code True} if this {@code PhoneAccount} is enabled.. - */ - public boolean isEnabled() { - return mIsEnabled; - } - - /** * The icon resource ID for the icon of this {@code PhoneAccount}. * * @return A resource ID. @@ -455,7 +416,6 @@ public class PhoneAccount implements Parcelable { out.writeCharSequence(mLabel); out.writeCharSequence(mShortDescription); out.writeList(mSupportedUriSchemes); - out.writeInt(mIsEnabled ? 1 : 0); } public static final Creator<PhoneAccount> CREATOR @@ -485,6 +445,5 @@ public class PhoneAccount implements Parcelable { List<String> supportedUriSchemes = new ArrayList<>(); in.readList(supportedUriSchemes, classLoader); mSupportedUriSchemes = Collections.unmodifiableList(supportedUriSchemes); - mIsEnabled = in.readInt() == 1; } } |