Merge "add carrierid in subscriptionInfo"
This commit is contained in:
@@ -42862,6 +42862,7 @@ package android.telephony {
|
|||||||
public class SubscriptionInfo implements android.os.Parcelable {
|
public class SubscriptionInfo implements android.os.Parcelable {
|
||||||
method public android.graphics.Bitmap createIconBitmap(android.content.Context);
|
method public android.graphics.Bitmap createIconBitmap(android.content.Context);
|
||||||
method public int describeContents();
|
method public int describeContents();
|
||||||
|
method public int getCarrierId();
|
||||||
method public java.lang.CharSequence getCarrierName();
|
method public java.lang.CharSequence getCarrierName();
|
||||||
method public java.lang.String getCountryIso();
|
method public java.lang.String getCountryIso();
|
||||||
method public int getDataRoaming();
|
method public int getDataRoaming();
|
||||||
|
|||||||
@@ -79,6 +79,12 @@ public class SubscriptionInfo implements Parcelable {
|
|||||||
*/
|
*/
|
||||||
private CharSequence mCarrierName;
|
private CharSequence mCarrierName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The subscription carrier id.
|
||||||
|
* @see TelephonyManager#getSimCarrierId()
|
||||||
|
*/
|
||||||
|
private int mCarrierId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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.
|
||||||
@@ -171,7 +177,7 @@ public class SubscriptionInfo implements Parcelable {
|
|||||||
@Nullable UiccAccessRule[] accessRules, String cardId) {
|
@Nullable UiccAccessRule[] accessRules, String cardId) {
|
||||||
this(id, iccId, simSlotIndex, displayName, carrierName, nameSource, iconTint, number,
|
this(id, iccId, simSlotIndex, displayName, carrierName, nameSource, iconTint, number,
|
||||||
roaming, icon, mcc, mnc, countryIso, isEmbedded, accessRules, cardId,
|
roaming, icon, mcc, mnc, countryIso, isEmbedded, accessRules, cardId,
|
||||||
false, null, true);
|
false, null, true, TelephonyManager.UNKNOWN_CARRIER_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -181,10 +187,10 @@ public class SubscriptionInfo implements Parcelable {
|
|||||||
CharSequence carrierName, int nameSource, int iconTint, String number, int roaming,
|
CharSequence carrierName, int nameSource, int iconTint, String number, int roaming,
|
||||||
Bitmap icon, String mcc, String mnc, String countryIso, boolean isEmbedded,
|
Bitmap icon, String mcc, String mnc, String countryIso, boolean isEmbedded,
|
||||||
@Nullable UiccAccessRule[] accessRules, String cardId, boolean isOpportunistic,
|
@Nullable UiccAccessRule[] accessRules, String cardId, boolean isOpportunistic,
|
||||||
@Nullable String groupUUID, boolean isMetered) {
|
@Nullable String groupUUID, boolean isMetered, int carrierId) {
|
||||||
this(id, iccId, simSlotIndex, displayName, carrierName, nameSource, iconTint, number,
|
this(id, iccId, simSlotIndex, displayName, carrierName, nameSource, iconTint, number,
|
||||||
roaming, icon, mcc, mnc, countryIso, isEmbedded, accessRules, cardId,
|
roaming, icon, mcc, mnc, countryIso, isEmbedded, accessRules, cardId,
|
||||||
isOpportunistic, groupUUID, isMetered, false);
|
isOpportunistic, groupUUID, isMetered, false, carrierId);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @hide
|
* @hide
|
||||||
@@ -193,7 +199,7 @@ public class SubscriptionInfo implements Parcelable {
|
|||||||
CharSequence carrierName, int nameSource, int iconTint, String number, int roaming,
|
CharSequence carrierName, int nameSource, int iconTint, String number, int roaming,
|
||||||
Bitmap icon, String mcc, String mnc, String countryIso, boolean isEmbedded,
|
Bitmap icon, String mcc, String mnc, String countryIso, boolean isEmbedded,
|
||||||
@Nullable UiccAccessRule[] accessRules, String cardId, boolean isOpportunistic,
|
@Nullable UiccAccessRule[] accessRules, String cardId, boolean isOpportunistic,
|
||||||
@Nullable String groupUUID, boolean isMetered, boolean isGroupDisabled) {
|
@Nullable String groupUUID, boolean isMetered, boolean isGroupDisabled, int carrierid) {
|
||||||
this.mId = id;
|
this.mId = id;
|
||||||
this.mIccId = iccId;
|
this.mIccId = iccId;
|
||||||
this.mSimSlotIndex = simSlotIndex;
|
this.mSimSlotIndex = simSlotIndex;
|
||||||
@@ -214,6 +220,7 @@ public class SubscriptionInfo implements Parcelable {
|
|||||||
this.mGroupUUID = groupUUID;
|
this.mGroupUUID = groupUUID;
|
||||||
this.mIsMetered = isMetered;
|
this.mIsMetered = isMetered;
|
||||||
this.mIsGroupDisabled = isGroupDisabled;
|
this.mIsGroupDisabled = isGroupDisabled;
|
||||||
|
this.mCarrierId = carrierid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -238,6 +245,14 @@ public class SubscriptionInfo implements Parcelable {
|
|||||||
return this.mSimSlotIndex;
|
return this.mSimSlotIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the carrier id of this Subscription carrier.
|
||||||
|
* @see TelephonyManager#getSimCarrierId()
|
||||||
|
*/
|
||||||
|
public int getCarrierId() {
|
||||||
|
return this.mCarrierId;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the name displayed to the user that identifies this subscription
|
* @return the name displayed to the user that identifies this subscription
|
||||||
*/
|
*/
|
||||||
@@ -554,11 +569,12 @@ public class SubscriptionInfo implements Parcelable {
|
|||||||
String groupUUID = source.readString();
|
String groupUUID = source.readString();
|
||||||
boolean isMetered = source.readBoolean();
|
boolean isMetered = source.readBoolean();
|
||||||
boolean isGroupDisabled = source.readBoolean();
|
boolean isGroupDisabled = source.readBoolean();
|
||||||
|
int carrierid = source.readInt();
|
||||||
|
|
||||||
return new SubscriptionInfo(id, iccId, simSlotIndex, displayName, carrierName,
|
return new SubscriptionInfo(id, iccId, simSlotIndex, displayName, carrierName,
|
||||||
nameSource, iconTint, number, dataRoaming, iconBitmap, mcc, mnc, countryIso,
|
nameSource, iconTint, number, dataRoaming, iconBitmap, mcc, mnc, countryIso,
|
||||||
isEmbedded, accessRules, cardId, isOpportunistic, groupUUID, isMetered,
|
isEmbedded, accessRules, cardId, isOpportunistic, groupUUID, isMetered,
|
||||||
isGroupDisabled);
|
isGroupDisabled, carrierid);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -589,6 +605,7 @@ public class SubscriptionInfo implements Parcelable {
|
|||||||
dest.writeString(mGroupUUID);
|
dest.writeString(mGroupUUID);
|
||||||
dest.writeBoolean(mIsMetered);
|
dest.writeBoolean(mIsMetered);
|
||||||
dest.writeBoolean(mIsGroupDisabled);
|
dest.writeBoolean(mIsGroupDisabled);
|
||||||
|
dest.writeInt(mCarrierId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -616,8 +633,9 @@ public class SubscriptionInfo implements Parcelable {
|
|||||||
String iccIdToPrint = givePrintableIccid(mIccId);
|
String iccIdToPrint = givePrintableIccid(mIccId);
|
||||||
String cardIdToPrint = givePrintableIccid(mCardId);
|
String cardIdToPrint = givePrintableIccid(mCardId);
|
||||||
return "{id=" + mId + ", iccId=" + iccIdToPrint + " simSlotIndex=" + mSimSlotIndex
|
return "{id=" + mId + ", iccId=" + iccIdToPrint + " simSlotIndex=" + mSimSlotIndex
|
||||||
+ " displayName=" + mDisplayName + " carrierName=" + mCarrierName
|
+ " carrierId=" + mCarrierId + " displayName=" + mDisplayName
|
||||||
+ " nameSource=" + mNameSource + " iconTint=" + mIconTint + " mNumber=" + mNumber
|
+ " carrierName=" + mCarrierName + " nameSource=" + mNameSource
|
||||||
|
+ " iconTint=" + mIconTint + " mNumber=" + mNumber
|
||||||
+ " dataRoaming=" + mDataRoaming + " iconBitmap=" + mIconBitmap + " mcc " + mMcc
|
+ " dataRoaming=" + mDataRoaming + " iconBitmap=" + mIconBitmap + " mcc " + mMcc
|
||||||
+ " mnc " + mMnc + "mCountryIso=" + mCountryIso + " isEmbedded " + mIsEmbedded
|
+ " mnc " + mMnc + "mCountryIso=" + mCountryIso + " isEmbedded " + mIsEmbedded
|
||||||
+ " accessRules " + Arrays.toString(mAccessRules)
|
+ " accessRules " + Arrays.toString(mAccessRules)
|
||||||
@@ -630,7 +648,8 @@ public class SubscriptionInfo implements Parcelable {
|
|||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(mId, mSimSlotIndex, mNameSource, mIconTint, mDataRoaming, mIsEmbedded,
|
return Objects.hash(mId, mSimSlotIndex, mNameSource, mIconTint, mDataRoaming, mIsEmbedded,
|
||||||
mIsOpportunistic, mGroupUUID, mIsMetered, mIccId, mNumber, mMcc, mMnc,
|
mIsOpportunistic, mGroupUUID, mIsMetered, mIccId, mNumber, mMcc, mMnc,
|
||||||
mCountryIso, mCardId, mDisplayName, mCarrierName, mAccessRules, mIsGroupDisabled);
|
mCountryIso, mCardId, mDisplayName, mCarrierName, mAccessRules, mIsGroupDisabled,
|
||||||
|
mCarrierId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -653,8 +672,9 @@ public class SubscriptionInfo implements Parcelable {
|
|||||||
&& mIsEmbedded == toCompare.mIsEmbedded
|
&& mIsEmbedded == toCompare.mIsEmbedded
|
||||||
&& mIsOpportunistic == toCompare.mIsOpportunistic
|
&& mIsOpportunistic == toCompare.mIsOpportunistic
|
||||||
&& mIsGroupDisabled == toCompare.mIsGroupDisabled
|
&& mIsGroupDisabled == toCompare.mIsGroupDisabled
|
||||||
&& Objects.equals(mGroupUUID, toCompare.mGroupUUID)
|
&& mCarrierId == toCompare.mCarrierId
|
||||||
&& mIsMetered == toCompare.mIsMetered
|
&& mIsMetered == toCompare.mIsMetered
|
||||||
|
&& Objects.equals(mGroupUUID, toCompare.mGroupUUID)
|
||||||
&& Objects.equals(mIccId, toCompare.mIccId)
|
&& Objects.equals(mIccId, toCompare.mIccId)
|
||||||
&& Objects.equals(mNumber, toCompare.mNumber)
|
&& Objects.equals(mNumber, toCompare.mNumber)
|
||||||
&& Objects.equals(mMcc, toCompare.mMcc)
|
&& Objects.equals(mMcc, toCompare.mMcc)
|
||||||
|
|||||||
@@ -378,6 +378,14 @@ public class SubscriptionManager {
|
|||||||
/** @hide */
|
/** @hide */
|
||||||
public static final int SIM_PROVISIONED = 0;
|
public static final int SIM_PROVISIONED = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TelephonyProvider column name for subscription carrier id.
|
||||||
|
* @see TelephonyManager#getSimCarrierId()
|
||||||
|
* <p>Type: INTEGER (int) </p>
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public static final String CARRIER_ID = "carrier_id";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TelephonyProvider column name for the MCC associated with a SIM, stored as a string.
|
* TelephonyProvider column name for the MCC associated with a SIM, stored as a string.
|
||||||
* <P>Type: TEXT (String)</P>
|
* <P>Type: TEXT (String)</P>
|
||||||
|
|||||||
Reference in New Issue
Block a user