am d227b4aa: Merge "API changes to add carrier name to subinforecord" into lmp-mr1-dev
* commit 'd227b4aa91b5db20d448d76a2c6f0d4d37f97363': API changes to add carrier name to subinforecord
This commit is contained in:
@@ -47,6 +47,11 @@ public class SubInfoRecord implements Parcelable {
|
|||||||
*/
|
*/
|
||||||
private CharSequence mDisplayName;
|
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,
|
* The source of the name, NAME_SOURCE_UNDEFINED, NAME_SOURCE_DEFAULT_SOURCE,
|
||||||
* NAME_SOURCE_SIM_SOURCE or NAME_SOURCE_USER_INPUT.
|
* NAME_SOURCE_SIM_SOURCE or NAME_SOURCE_USER_INPUT.
|
||||||
@@ -90,6 +95,7 @@ public class SubInfoRecord implements Parcelable {
|
|||||||
this.mIccId = "";
|
this.mIccId = "";
|
||||||
this.mSimSlotIndex = SubscriptionManager.INVALID_SLOT_ID;
|
this.mSimSlotIndex = SubscriptionManager.INVALID_SLOT_ID;
|
||||||
this.mDisplayName = "";
|
this.mDisplayName = "";
|
||||||
|
this.mCarrierName = "";
|
||||||
this.mNameSource = 0;
|
this.mNameSource = 0;
|
||||||
this.mColor = 0;
|
this.mColor = 0;
|
||||||
this.mNumber = "";
|
this.mNumber = "";
|
||||||
@@ -104,12 +110,13 @@ public class SubInfoRecord implements Parcelable {
|
|||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
public SubInfoRecord(int id, String iccId, int simSlotIndex, CharSequence displayName,
|
public SubInfoRecord(int id, String iccId, int simSlotIndex, CharSequence displayName,
|
||||||
int nameSource, int color, String number, int roaming, int[] iconRes, int mcc,
|
CharSequence carrierName, int nameSource, int color, String number, int roaming,
|
||||||
int mnc) {
|
int[] iconRes, int mcc, int mnc) {
|
||||||
this.mId = id;
|
this.mId = id;
|
||||||
this.mIccId = iccId;
|
this.mIccId = iccId;
|
||||||
this.mSimSlotIndex = simSlotIndex;
|
this.mSimSlotIndex = simSlotIndex;
|
||||||
this.mDisplayName = displayName;
|
this.mDisplayName = displayName;
|
||||||
|
this.mCarrierName = carrierName;
|
||||||
this.mNameSource = nameSource;
|
this.mNameSource = nameSource;
|
||||||
this.mColor = color;
|
this.mColor = color;
|
||||||
this.mNumber = number;
|
this.mNumber = number;
|
||||||
@@ -155,6 +162,22 @@ public class SubInfoRecord implements Parcelable {
|
|||||||
this.mDisplayName = name;
|
this.mDisplayName = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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,
|
* Return the source of the name, eg NAME_SOURCE_UNDEFINED, NAME_SOURCE_DEFAULT_SOURCE,
|
||||||
* NAME_SOURCE_SIM_SOURCE or NAME_SOURCE_USER_INPUT.
|
* NAME_SOURCE_SIM_SOURCE or NAME_SOURCE_USER_INPUT.
|
||||||
@@ -223,6 +246,7 @@ public class SubInfoRecord implements Parcelable {
|
|||||||
String iccId = source.readString();
|
String iccId = source.readString();
|
||||||
int simSlotIndex = source.readInt();
|
int simSlotIndex = source.readInt();
|
||||||
CharSequence displayName = source.readCharSequence();
|
CharSequence displayName = source.readCharSequence();
|
||||||
|
CharSequence carrierName = source.readCharSequence();
|
||||||
int nameSource = source.readInt();
|
int nameSource = source.readInt();
|
||||||
int color = source.readInt();
|
int color = source.readInt();
|
||||||
String number = source.readString();
|
String number = source.readString();
|
||||||
@@ -232,8 +256,8 @@ public class SubInfoRecord implements Parcelable {
|
|||||||
int mcc = source.readInt();
|
int mcc = source.readInt();
|
||||||
int mnc = source.readInt();
|
int mnc = source.readInt();
|
||||||
|
|
||||||
return new SubInfoRecord(id, iccId, simSlotIndex, displayName, nameSource, color, number,
|
return new SubInfoRecord(id, iccId, simSlotIndex, displayName, carrierName,
|
||||||
dataRoaming, iconRes, mcc, mnc);
|
nameSource, color, number, dataRoaming, iconRes, mcc, mnc);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -248,6 +272,7 @@ public class SubInfoRecord implements Parcelable {
|
|||||||
dest.writeString(mIccId);
|
dest.writeString(mIccId);
|
||||||
dest.writeInt(mSimSlotIndex);
|
dest.writeInt(mSimSlotIndex);
|
||||||
dest.writeCharSequence(mDisplayName);
|
dest.writeCharSequence(mDisplayName);
|
||||||
|
dest.writeCharSequence(mCarrierName);
|
||||||
dest.writeInt(mNameSource);
|
dest.writeInt(mNameSource);
|
||||||
dest.writeInt(mColor);
|
dest.writeInt(mColor);
|
||||||
dest.writeString(mNumber);
|
dest.writeString(mNumber);
|
||||||
@@ -265,7 +290,7 @@ public class SubInfoRecord implements Parcelable {
|
|||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "{id=" + mId + ", iccId=" + mIccId + " simSlotIndex=" + mSimSlotIndex
|
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
|
+ " number=" + mNumber + " dataRoaming=" + mDataRoaming + " simIconRes=" + mSimIconRes
|
||||||
+ " mcc " + mMcc + " mnc " + mMnc + "}";
|
+ " mcc " + mMcc + " mnc " + mMnc + "}";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -125,6 +125,13 @@ public class SubscriptionManager implements BaseColumns {
|
|||||||
/** @hide */
|
/** @hide */
|
||||||
public static final String DISPLAY_NAME = "display_name";
|
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
|
* Default name resource
|
||||||
* @hide
|
* @hide
|
||||||
|
|||||||
Reference in New Issue
Block a user