private CharSequence mDisplayName;
/**
+ * The string displayed to the user that identifies Subscription Provider Name
+ */
+ private CharSequence mCarrierName;
+
+ /**
* The source of the name, NAME_SOURCE_UNDEFINED, NAME_SOURCE_DEFAULT_SOURCE,
* NAME_SOURCE_SIM_SOURCE or NAME_SOURCE_USER_INPUT.
*/
this.mIccId = "";
this.mSimSlotIndex = SubscriptionManager.INVALID_SLOT_ID;
this.mDisplayName = "";
+ this.mCarrierName = "";
this.mNameSource = 0;
this.mColor = 0;
this.mNumber = "";
* @hide
*/
public SubInfoRecord(int id, String iccId, int simSlotIndex, CharSequence displayName,
- int nameSource, int color, String number, int roaming, int[] iconRes, int mcc,
- int mnc) {
+ CharSequence carrierName, int nameSource, int color, String number, int roaming,
+ int[] iconRes, int mcc, int mnc) {
this.mId = id;
this.mIccId = iccId;
this.mSimSlotIndex = simSlotIndex;
this.mDisplayName = displayName;
+ this.mCarrierName = carrierName;
this.mNameSource = nameSource;
this.mColor = color;
this.mNumber = number;
}
/**
+ * Returns the name displayed to the user that identifies Subscription provider name
+ * @hide
+ */
+ public CharSequence getCarrierName() {
+ return this.mCarrierName;
+ }
+
+ /**
+ * Sets the name displayed to the user that identifies Subscription provider name
+ * @hide
+ */
+ public void setCarrierName(CharSequence name) {
+ this.mCarrierName = name;
+ }
+
+ /**
* Return the source of the name, eg NAME_SOURCE_UNDEFINED, NAME_SOURCE_DEFAULT_SOURCE,
* NAME_SOURCE_SIM_SOURCE or NAME_SOURCE_USER_INPUT.
*/
String iccId = source.readString();
int simSlotIndex = source.readInt();
CharSequence displayName = source.readCharSequence();
+ CharSequence carrierName = source.readCharSequence();
int nameSource = source.readInt();
int color = source.readInt();
String number = source.readString();
int mcc = source.readInt();
int mnc = source.readInt();
- return new SubInfoRecord(id, iccId, simSlotIndex, displayName, nameSource, color, number,
- dataRoaming, iconRes, mcc, mnc);
+ return new SubInfoRecord(id, iccId, simSlotIndex, displayName, carrierName,
+ nameSource, color, number, dataRoaming, iconRes, mcc, mnc);
}
@Override
dest.writeString(mIccId);
dest.writeInt(mSimSlotIndex);
dest.writeCharSequence(mDisplayName);
+ dest.writeCharSequence(mCarrierName);
dest.writeInt(mNameSource);
dest.writeInt(mColor);
dest.writeString(mNumber);
@Override
public String toString() {
return "{id=" + mId + ", iccId=" + mIccId + " simSlotIndex=" + mSimSlotIndex
- + " displayName=" + mDisplayName + " nameSource=" + mNameSource + " color=" + mColor
+ + " displayName=" + mDisplayName + " carrierName=" + mCarrierName + " nameSource=" + mNameSource + " color=" + mColor
+ " number=" + mNumber + " dataRoaming=" + mDataRoaming + " simIconRes=" + mSimIconRes
+ " mcc " + mMcc + " mnc " + mMnc + "}";
}