summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSanket Padawe <sanketpadawe@google.com>2014-11-07 11:37:29 -0800
committerSanket Padawe <sanketpadawe@google.com>2014-11-07 11:37:29 -0800
commite1013f964dc4eeb28521ed860005e1e21907b0ff (patch)
tree424626ca2f8da067a66786a8ce6ceb4f7083f74b
parentf4d2c8eebd8113482b48e0b8f83deb4b2f1f9b22 (diff)
downloadframeworks_base-e1013f964dc4eeb28521ed860005e1e21907b0ff.zip
frameworks_base-e1013f964dc4eeb28521ed860005e1e21907b0ff.tar.gz
frameworks_base-e1013f964dc4eeb28521ed860005e1e21907b0ff.tar.bz2
API changes to add carrier name to subinforecord
API changes required to add carrier name of sim as a member of subinforecord. Change-Id: I08a7f53dc012967005f7b5abd1fbc08f2947da67
-rw-r--r--telephony/java/android/telephony/SubInfoRecord.java35
-rw-r--r--telephony/java/android/telephony/SubscriptionManager.java7
2 files changed, 37 insertions, 5 deletions
diff --git a/telephony/java/android/telephony/SubInfoRecord.java b/telephony/java/android/telephony/SubInfoRecord.java
index 8ab69cc..ed0441b 100644
--- a/telephony/java/android/telephony/SubInfoRecord.java
+++ b/telephony/java/android/telephony/SubInfoRecord.java
@@ -48,6 +48,11 @@ public class SubInfoRecord implements Parcelable {
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.
*/
@@ -90,6 +95,7 @@ public class SubInfoRecord implements Parcelable {
this.mIccId = "";
this.mSimSlotIndex = SubscriptionManager.INVALID_SLOT_ID;
this.mDisplayName = "";
+ this.mCarrierName = "";
this.mNameSource = 0;
this.mColor = 0;
this.mNumber = "";
@@ -104,12 +110,13 @@ public class SubInfoRecord implements Parcelable {
* @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;
@@ -156,6 +163,22 @@ public class SubInfoRecord implements Parcelable {
}
/**
+ * 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.
*/
@@ -223,6 +246,7 @@ public class SubInfoRecord implements Parcelable {
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();
@@ -232,8 +256,8 @@ public class SubInfoRecord implements Parcelable {
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
@@ -248,6 +272,7 @@ public class SubInfoRecord implements Parcelable {
dest.writeString(mIccId);
dest.writeInt(mSimSlotIndex);
dest.writeCharSequence(mDisplayName);
+ dest.writeCharSequence(mCarrierName);
dest.writeInt(mNameSource);
dest.writeInt(mColor);
dest.writeString(mNumber);
@@ -265,7 +290,7 @@ public class SubInfoRecord implements Parcelable {
@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 + "}";
}
diff --git a/telephony/java/android/telephony/SubscriptionManager.java b/telephony/java/android/telephony/SubscriptionManager.java
index 9cd533d..5643cb9 100644
--- a/telephony/java/android/telephony/SubscriptionManager.java
+++ b/telephony/java/android/telephony/SubscriptionManager.java
@@ -126,6 +126,13 @@ public class SubscriptionManager implements BaseColumns {
public static final String DISPLAY_NAME = "display_name";
/**
+ * TelephonyProvider column name for the service provider name for the SIM.
+ * <P>Type: TEXT (String)</P>
+ */
+ /** @hide */
+ public static final String CARRIER_NAME = "carrier_name";
+
+ /**
* Default name resource
* @hide
*/