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
This commit is contained in:
@@ -90,17 +90,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.
|
||||
*/
|
||||
@@ -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) {
|
||||
@@ -216,19 +202,6 @@ public class PhoneAccount implements Parcelable {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
@@ -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(
|
||||
@@ -391,15 +361,6 @@ public class PhoneAccount implements Parcelable {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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}.
|
||||
*
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user