}
public class PhoneAccountMetadata implements android.os.Parcelable {
- ctor public PhoneAccountMetadata(android.telecomm.PhoneAccount, android.net.Uri, int, int, java.lang.String, java.lang.String, boolean);
+ ctor public PhoneAccountMetadata(android.telecomm.PhoneAccount, android.net.Uri, java.lang.String, int, int, java.lang.String, java.lang.String, boolean);
method public int describeContents();
method public android.telecomm.PhoneAccount getAccount();
method public int getCapabilities();
method public int getIconResId();
method public java.lang.String getLabel();
method public java.lang.String getShortDescription();
+ method public java.lang.String getSubscriptionNumber();
method public boolean isVideoCallingSupported();
method public void writeToParcel(android.os.Parcel, int);
field public static final int CAPABILITY_CALL_PROVIDER = 2; // 0x2
field public static final java.lang.String ACTION_INCOMING_CALL = "android.intent.action.INCOMING_CALL";
field public static final char DTMF_CHARACTER_PAUSE = 44; // 0x002c ','
field public static final char DTMF_CHARACTER_WAIT = 59; // 0x003b ';'
+ field public static final java.lang.String EXTRA_CALL_BACK_NUMBER = "android.telecomm.extra.CALL_BACK_NUMBER";
field public static final java.lang.String EXTRA_CALL_DISCONNECT_CAUSE = "android.telecomm.extra.CALL_DISCONNECT_CAUSE";
field public static final java.lang.String EXTRA_CALL_DISCONNECT_MESSAGE = "android.telecomm.extra.CALL_DISCONNECT_MESSAGE";
field public static final java.lang.String EXTRA_CONNECTION_SERVICE = "android.telecomm.extra.CONNECTION_SERVICE";
- field public static final java.lang.String EXTRA_EMERGENCY_CALL_BACK_NUMBER = "android.telecomm.extra.EMERGENCY_CALL_BACK_NUMBER";
field public static final java.lang.String EXTRA_INCOMING_CALL_EXTRAS = "android.intent.extra.INCOMING_CALL_EXTRAS";
field public static final java.lang.String EXTRA_PHONE_ACCOUNT = "android.intent.extra.PHONE_ACCOUNT";
field public static final java.lang.String EXTRA_START_CALL_WITH_SPEAKERPHONE = "android.intent.extra.START_CALL_WITH_SPEAKERPHONE";
return new StringBuilder().append(mComponentName)
.append(", ")
.append(mId)
- .append(", ")
- .append(", ")
.toString();
}
private final PhoneAccount mAccount;
private final Uri mHandle;
+ private final String mSubscriptionNumber;
private final int mCapabilities;
private final int mIconResId;
private final String mLabel;
public PhoneAccountMetadata(
PhoneAccount account,
Uri handle,
+ String subscriptionNumber,
int capabilities,
int iconResId,
String label,
boolean supportsVideoCalling) {
mAccount = account;
mHandle = handle;
+ mSubscriptionNumber = subscriptionNumber;
mCapabilities = capabilities;
mIconResId = iconResId;
mLabel = label;
}
/**
+ * The subscription number associated with the underlying transport. This may differ from the
+ * {@link #getHandle()} number; for example, if the number used to talk to the network is not
+ * the same number that will be on the remote party's caller ID display.
+ *
+ * @return The subscription number, suitable for display to the user.
+ */
+ public String getSubscriptionNumber() {
+ return mSubscriptionNumber;
+ }
+
+ /**
* The capabilities of this {@code PhoneAccount}.
*
* @return A bit field of flags describing this {@code PhoneAccount}'s capabilities.
public void writeToParcel(Parcel out, int flags) {
out.writeParcelable(mAccount, 0);
out.writeParcelable(mHandle, 0);
+ out.writeString(mSubscriptionNumber);
out.writeInt(mCapabilities);
out.writeInt(mIconResId);
out.writeString(mLabel);
private PhoneAccountMetadata(Parcel in) {
mAccount = in.readParcelable(getClass().getClassLoader());
mHandle = in.readParcelable(getClass().getClassLoader());
+ mSubscriptionNumber = in.readString();
mCapabilities = in.readInt();
mIconResId = in.readInt();
mLabel = in.readString();
"android.telecomm.extra.CONNECTION_SERVICE";
/**
- * The number which emergency services will use to return calls, if necessary. The in-call UI
- * will take care of displaying this to the user.
+ * The number which the party on the other side of the line will see (and use to return the
+ * call).
* <p>
- * Note that this should only be populated for emergency numbers, and if the number emergency
- * services will see is different than the user's known phone number.
+ * {@link android.telecomm.ConnectionService}s which interact with
+ * {@link android.telecomm.RemoteConnection}s should only populate this if the
+ * {@link android.telephony.TelephonyManager#getLine1Number()} value, as that is the user's
+ * expected caller ID.
*/
- public static final String EXTRA_EMERGENCY_CALL_BACK_NUMBER =
- "android.telecomm.extra.EMERGENCY_CALL_BACK_NUMBER";
+ public static final String EXTRA_CALL_BACK_NUMBER = "android.telecomm.extra.CALL_BACK_NUMBER";
/**
* The dual tone multi-frequency signaling character sent to indicate the dialing system should