Loading api/current.txt +17 −0 Original line number Diff line number Diff line Loading @@ -46170,6 +46170,7 @@ package android.telephony { } public final class CellIdentityGsm extends android.telephony.CellIdentity { method @NonNull public java.util.List<java.lang.String> getAdditionalPlmns(); method public int getArfcn(); method public int getBsic(); method public int getCid(); Loading @@ -46185,8 +46186,10 @@ package android.telephony { } public final class CellIdentityLte extends android.telephony.CellIdentity { method @NonNull public java.util.List<java.lang.String> getAdditionalPlmns(); method public int getBandwidth(); method public int getCi(); method @Nullable public android.telephony.ClosedSubscriberGroupInfo getClosedSubscriberGroupInfo(); method public int getEarfcn(); method @Deprecated public int getMcc(); method @Nullable public String getMccString(); Loading @@ -46200,6 +46203,7 @@ package android.telephony { } public final class CellIdentityNr extends android.telephony.CellIdentity { method @NonNull public java.util.List<java.lang.String> getAdditionalPlmns(); method @Nullable public String getMccString(); method @Nullable public String getMncString(); method public long getNci(); Loading @@ -46211,7 +46215,9 @@ package android.telephony { } public final class CellIdentityTdscdma extends android.telephony.CellIdentity { method @NonNull public java.util.List<java.lang.String> getAdditionalPlmns(); method public int getCid(); method @Nullable public android.telephony.ClosedSubscriberGroupInfo getClosedSubscriberGroupInfo(); method public int getCpid(); method public int getLac(); method @Nullable public String getMccString(); Loading @@ -46223,7 +46229,9 @@ package android.telephony { } public final class CellIdentityWcdma extends android.telephony.CellIdentity { method @NonNull public java.util.List<java.lang.String> getAdditionalPlmns(); method public int getCid(); method @Nullable public android.telephony.ClosedSubscriberGroupInfo getClosedSubscriberGroupInfo(); method public int getLac(); method @Deprecated public int getMcc(); method @Nullable public String getMccString(); Loading Loading @@ -46393,6 +46401,15 @@ package android.telephony { field @NonNull public static final android.os.Parcelable.Creator<android.telephony.CellSignalStrengthWcdma> CREATOR; } public final class ClosedSubscriberGroupInfo implements android.os.Parcelable { method public int describeContents(); method @IntRange(from=0, to=134217727) public int getCsgIdentity(); method public boolean getCsgIndicator(); method @NonNull public String getHomeNodebName(); method public void writeToParcel(@NonNull android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ClosedSubscriberGroupInfo> CREATOR; } public class IccOpenLogicalChannelResponse implements android.os.Parcelable { method public int describeContents(); method public int getChannel(); telephony/java/android/telephony/CellIdentityGsm.java +37 −6 Original line number Diff line number Diff line Loading @@ -23,6 +23,8 @@ import android.os.Parcel; import android.telephony.gsm.GsmCellLocation; import android.text.TextUtils; import java.util.Collections; import java.util.List; import java.util.Objects; /** Loading @@ -46,6 +48,9 @@ public final class CellIdentityGsm extends CellIdentity { // 6-bit Base Station Identity Code private final int mBsic; // a list of additional PLMN-IDs reported for this cell private final List<String> mAdditionalPlmns; /** * @hide */ Loading @@ -56,6 +61,7 @@ public final class CellIdentityGsm extends CellIdentity { mCid = CellInfo.UNAVAILABLE; mArfcn = CellInfo.UNAVAILABLE; mBsic = CellInfo.UNAVAILABLE; mAdditionalPlmns = Collections.emptyList(); } /** Loading @@ -68,35 +74,48 @@ public final class CellIdentityGsm extends CellIdentity { * @param mncStr 2 or 3-digit Mobile Network Code in string format * @param alphal long alpha Operator Name String or Enhanced Operator Name String * @param alphas short alpha Operator Name String or Enhanced Operator Name String * @param additionalPlmns a list of additional PLMN IDs broadcast by the cell * * @hide */ public CellIdentityGsm(int lac, int cid, int arfcn, int bsic, String mccStr, String mncStr, String alphal, String alphas) { String mncStr, String alphal, String alphas, List<String> additionalPlmns) { super(TAG, CellInfo.TYPE_GSM, mccStr, mncStr, alphal, alphas); mLac = inRangeOrUnavailable(lac, 0, MAX_LAC); mCid = inRangeOrUnavailable(cid, 0, MAX_CID); mArfcn = inRangeOrUnavailable(arfcn, 0, MAX_ARFCN); mBsic = inRangeOrUnavailable(bsic, 0, MAX_BSIC); mAdditionalPlmns = additionalPlmns; } /** @hide */ public CellIdentityGsm(android.hardware.radio.V1_0.CellIdentityGsm cid) { this(cid.lac, cid.cid, cid.arfcn, cid.bsic == (byte) 0xFF ? CellInfo.UNAVAILABLE : cid.bsic, cid.mcc, cid.mnc, "", ""); cid.mcc, cid.mnc, "", "", Collections.emptyList()); } /** @hide */ public CellIdentityGsm(android.hardware.radio.V1_2.CellIdentityGsm cid) { this(cid.base.lac, cid.base.cid, cid.base.arfcn, cid.base.bsic == (byte) 0xFF ? CellInfo.UNAVAILABLE : cid.base.bsic, cid.base.mcc, cid.base.mnc, cid.operatorNames.alphaLong, cid.operatorNames.alphaShort); cid.base.mnc, cid.operatorNames.alphaLong, cid.operatorNames.alphaShort, Collections.emptyList()); } /** @hide */ public CellIdentityGsm(android.hardware.radio.V1_5.CellIdentityGsm cid) { this(cid.base.base.lac, cid.base.base.cid, cid.base.base.arfcn, cid.base.base.bsic == (byte) 0xFF ? CellInfo.UNAVAILABLE : cid.base.base.bsic, cid.base.base.mcc, cid.base.base.mnc, cid.base.operatorNames.alphaLong, cid.base.operatorNames.alphaShort, cid.additionalPlmns); } private CellIdentityGsm(CellIdentityGsm cid) { this(cid.mLac, cid.mCid, cid.mArfcn, cid.mBsic, cid.mMccStr, cid.mMncStr, cid.mAlphaLong, cid.mAlphaShort); cid.mMncStr, cid.mAlphaLong, cid.mAlphaShort, cid.mAdditionalPlmns); } CellIdentityGsm copy() { Loading @@ -107,7 +126,7 @@ public final class CellIdentityGsm extends CellIdentity { @Override public @NonNull CellIdentityGsm sanitizeLocationInfo() { return new CellIdentityGsm(CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, mMccStr, mMncStr, mAlphaLong, mAlphaShort); CellInfo.UNAVAILABLE, mMccStr, mMncStr, mAlphaLong, mAlphaShort, mAdditionalPlmns); } /** Loading Loading @@ -192,6 +211,14 @@ public final class CellIdentityGsm extends CellIdentity { return mArfcn; } /** * @return a list of additional PLMN IDs supported by this cell. */ @NonNull public List<String> getAdditionalPlmns() { return mAdditionalPlmns; } /** * @deprecated Primary Scrambling Code is not applicable to GSM. * @return {@link android.telephony.CellInfo#UNAVAILABLE UNAVAILABLE} - undefined for GSM Loading @@ -215,7 +242,7 @@ public final class CellIdentityGsm extends CellIdentity { @Override public int hashCode() { return Objects.hash(mLac, mCid, super.hashCode()); return Objects.hash(mLac, mCid, mAdditionalPlmns.hashCode(), super.hashCode()); } @Override Loading @@ -235,6 +262,7 @@ public final class CellIdentityGsm extends CellIdentity { && mBsic == o.mBsic && TextUtils.equals(mMccStr, o.mMccStr) && TextUtils.equals(mMncStr, o.mMncStr) && mAdditionalPlmns.equals(o.mAdditionalPlmns) && super.equals(other); } Loading @@ -249,6 +277,7 @@ public final class CellIdentityGsm extends CellIdentity { .append(" mMnc=").append(mMncStr) .append(" mAlphaLong=").append(mAlphaLong) .append(" mAlphaShort=").append(mAlphaShort) .append(" mAdditionalPlmns=").append(mAdditionalPlmns) .append("}").toString(); } Loading @@ -261,6 +290,7 @@ public final class CellIdentityGsm extends CellIdentity { dest.writeInt(mCid); dest.writeInt(mArfcn); dest.writeInt(mBsic); dest.writeList(mAdditionalPlmns); } /** Construct from Parcel, type has already been processed */ Loading @@ -270,6 +300,7 @@ public final class CellIdentityGsm extends CellIdentity { mCid = in.readInt(); mArfcn = in.readInt(); mBsic = in.readInt(); mAdditionalPlmns = in.readArrayList(null); if (DBG) log(toString()); } Loading telephony/java/android/telephony/CellIdentityLte.java +56 −8 Original line number Diff line number Diff line Loading @@ -24,6 +24,8 @@ import android.os.Parcel; import android.telephony.gsm.GsmCellLocation; import android.text.TextUtils; import java.util.Collections; import java.util.List; import java.util.Objects; /** Loading @@ -50,6 +52,11 @@ public final class CellIdentityLte extends CellIdentity { // cell bandwidth, in kHz private final int mBandwidth; // a list of additional PLMN-IDs reported for this cell private final List<String> mAdditionalPlmns; private ClosedSubscriberGroupInfo mCsgInfo; /** * @hide */ Loading @@ -61,6 +68,8 @@ public final class CellIdentityLte extends CellIdentity { mTac = CellInfo.UNAVAILABLE; mEarfcn = CellInfo.UNAVAILABLE; mBandwidth = CellInfo.UNAVAILABLE; mAdditionalPlmns = Collections.emptyList(); mCsgInfo = null; } /** Loading @@ -76,7 +85,7 @@ public final class CellIdentityLte extends CellIdentity { @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) public CellIdentityLte(int mcc, int mnc, int ci, int pci, int tac) { this(ci, pci, tac, CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, String.valueOf(mcc), String.valueOf(mnc), null, null); String.valueOf(mnc), null, null, Collections.emptyList(), null); } /** Loading @@ -90,34 +99,49 @@ public final class CellIdentityLte extends CellIdentity { * @param mncStr 2 or 3-digit Mobile Network Code in string format * @param alphal long alpha Operator Name String or Enhanced Operator Name String * @param alphas short alpha Operator Name String or Enhanced Operator Name String * @param additionalPlmns a list of additional PLMN IDs broadcast by the cell * @param csgInfo info about the closed subscriber group broadcast by the cell * * @hide */ public CellIdentityLte(int ci, int pci, int tac, int earfcn, int bandwidth, String mccStr, String mncStr, String alphal, String alphas) { String mncStr, String alphal, String alphas, List<String> additionalPlmns, ClosedSubscriberGroupInfo csgInfo) { super(TAG, CellInfo.TYPE_LTE, mccStr, mncStr, alphal, alphas); mCi = inRangeOrUnavailable(ci, 0, MAX_CI); mPci = inRangeOrUnavailable(pci, 0, MAX_PCI); mTac = inRangeOrUnavailable(tac, 0, MAX_TAC); mEarfcn = inRangeOrUnavailable(earfcn, 0, MAX_EARFCN); mBandwidth = inRangeOrUnavailable(bandwidth, 0, MAX_BANDWIDTH); mAdditionalPlmns = additionalPlmns; mCsgInfo = csgInfo; } /** @hide */ public CellIdentityLte(android.hardware.radio.V1_0.CellIdentityLte cid) { this(cid.ci, cid.pci, cid.tac, cid.earfcn, CellInfo.UNAVAILABLE, cid.mcc, cid.mnc, "", ""); this(cid.ci, cid.pci, cid.tac, cid.earfcn, CellInfo.UNAVAILABLE, cid.mcc, cid.mnc, "", "", Collections.emptyList(), null); } /** @hide */ public CellIdentityLte(android.hardware.radio.V1_2.CellIdentityLte cid) { this(cid.base.ci, cid.base.pci, cid.base.tac, cid.base.earfcn, cid.bandwidth, cid.base.mcc, cid.base.mnc, cid.operatorNames.alphaLong, cid.operatorNames.alphaShort); cid.operatorNames.alphaShort, Collections.emptyList(), null); } /** @hide */ public CellIdentityLte(android.hardware.radio.V1_5.CellIdentityLte cid) { this(cid.base.base.ci, cid.base.base.pci, cid.base.base.tac, cid.base.base.earfcn, cid.base.bandwidth, cid.base.base.mcc, cid.base.base.mnc, cid.base.operatorNames.alphaLong, cid.base.operatorNames.alphaShort, cid.additionalPlmns, cid.optionalCsgInfo.csgInfo() != null ? new ClosedSubscriberGroupInfo(cid.optionalCsgInfo.csgInfo()) : null); } private CellIdentityLte(CellIdentityLte cid) { this(cid.mCi, cid.mPci, cid.mTac, cid.mEarfcn, cid.mBandwidth, cid.mMccStr, cid.mMncStr, cid.mAlphaLong, cid.mAlphaShort); cid.mMncStr, cid.mAlphaLong, cid.mAlphaShort, cid.mAdditionalPlmns, cid.mCsgInfo); } /** @hide */ Loading @@ -125,7 +149,7 @@ public final class CellIdentityLte extends CellIdentity { public @NonNull CellIdentityLte sanitizeLocationInfo() { return new CellIdentityLte(CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, mMccStr, mMncStr, mAlphaLong, mAlphaShort); mMccStr, mMncStr, mAlphaLong, mAlphaShort, mAdditionalPlmns, null); } CellIdentityLte copy() { Loading Loading @@ -222,6 +246,22 @@ public final class CellIdentityLte extends CellIdentity { return mEarfcn; } /** * @return a list of additional PLMN IDs supported by this cell. */ @NonNull public List<String> getAdditionalPlmns() { return mAdditionalPlmns; } /** * @return closed subscriber group information about the cell if available, otherwise null. */ @Nullable public ClosedSubscriberGroupInfo getClosedSubscriberGroupInfo() { return mCsgInfo; } /** * A hack to allow tunneling of LTE information via GsmCellLocation * so that older Network Location Providers can return some information Loading @@ -247,7 +287,8 @@ public final class CellIdentityLte extends CellIdentity { @Override public int hashCode() { return Objects.hash(mCi, mPci, mTac, super.hashCode()); return Objects.hash(mCi, mPci, mTac, mAdditionalPlmns.hashCode(), mCsgInfo, super.hashCode()); } @Override Loading @@ -268,6 +309,8 @@ public final class CellIdentityLte extends CellIdentity { && mBandwidth == o.mBandwidth && TextUtils.equals(mMccStr, o.mMccStr) && TextUtils.equals(mMncStr, o.mMncStr) && mAdditionalPlmns.equals(o.mAdditionalPlmns) && Objects.equals(mCsgInfo, o.mCsgInfo) && super.equals(other); } Loading @@ -283,6 +326,8 @@ public final class CellIdentityLte extends CellIdentity { .append(" mMnc=").append(mMncStr) .append(" mAlphaLong=").append(mAlphaLong) .append(" mAlphaShort=").append(mAlphaShort) .append(" mAdditionalPlmns=").append(mAdditionalPlmns) .append(" mCsgInfo=").append(mCsgInfo) .append("}").toString(); } Loading @@ -296,6 +341,8 @@ public final class CellIdentityLte extends CellIdentity { dest.writeInt(mTac); dest.writeInt(mEarfcn); dest.writeInt(mBandwidth); dest.writeList(mAdditionalPlmns); dest.writeParcelable(mCsgInfo, flags); } /** Construct from Parcel, type has already been processed */ Loading @@ -306,7 +353,8 @@ public final class CellIdentityLte extends CellIdentity { mTac = in.readInt(); mEarfcn = in.readInt(); mBandwidth = in.readInt(); mAdditionalPlmns = in.readArrayList(null); mCsgInfo = in.readParcelable(null); if (DBG) log(toString()); } Loading telephony/java/android/telephony/CellIdentityNr.java +37 −5 Original line number Diff line number Diff line Loading @@ -22,6 +22,8 @@ import android.annotation.Nullable; import android.os.Parcel; import android.telephony.gsm.GsmCellLocation; import java.util.Collections; import java.util.List; import java.util.Objects; /** Loading @@ -40,6 +42,9 @@ public final class CellIdentityNr extends CellIdentity { private final int mTac; private final long mNci; // a list of additional PLMN-IDs reported for this cell private final List<String> mAdditionalPlmns; /** * * @param pci Physical Cell Id in range [0, 1007]. Loading @@ -50,29 +55,38 @@ public final class CellIdentityNr extends CellIdentity { * @param nci The 36-bit NR Cell Identity in range [0, 68719476735]. * @param alphal long alpha Operator Name String or Enhanced Operator Name String. * @param alphas short alpha Operator Name String or Enhanced Operator Name String. * @param additionalPlmns a list of additional PLMN IDs broadcast by the cell * * @hide */ public CellIdentityNr(int pci, int tac, int nrArfcn, String mccStr, String mncStr, long nci, String alphal, String alphas) { long nci, String alphal, String alphas, List<String> additionalPlmns) { super(TAG, CellInfo.TYPE_NR, mccStr, mncStr, alphal, alphas); mPci = inRangeOrUnavailable(pci, 0, MAX_PCI); mTac = inRangeOrUnavailable(tac, 0, MAX_TAC); mNrArfcn = inRangeOrUnavailable(nrArfcn, 0, MAX_NRARFCN); mNci = inRangeOrUnavailable(nci, 0, MAX_NCI); mAdditionalPlmns = additionalPlmns; } /** @hide */ public CellIdentityNr(android.hardware.radio.V1_4.CellIdentityNr cid) { this(cid.pci, cid.tac, cid.nrarfcn, cid.mcc, cid.mnc, cid.nci, cid.operatorNames.alphaLong, cid.operatorNames.alphaShort); cid.operatorNames.alphaShort, Collections.emptyList()); } /** @hide */ public CellIdentityNr(android.hardware.radio.V1_5.CellIdentityNr cid) { this(cid.base.pci, cid.base.tac, cid.base.nrarfcn, cid.base.mcc, cid.base.mnc, cid.base.nci, cid.base.operatorNames.alphaLong, cid.base.operatorNames.alphaShort, cid.additionalPlmns); } /** @hide */ @Override public @NonNull CellIdentityNr sanitizeLocationInfo() { return new CellIdentityNr(CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, mMccStr, mMncStr, CellInfo.UNAVAILABLE, mAlphaLong, mAlphaShort); mMccStr, mMncStr, CellInfo.UNAVAILABLE, mAlphaLong, mAlphaShort, mAdditionalPlmns); } /** Loading @@ -87,7 +101,8 @@ public final class CellIdentityNr extends CellIdentity { @Override public int hashCode() { return Objects.hash(super.hashCode(), mPci, mTac, mNrArfcn, mNci); return Objects.hash(super.hashCode(), mPci, mTac, mNrArfcn, mNci, mAdditionalPlmns.hashCode()); } @Override Loading @@ -98,7 +113,7 @@ public final class CellIdentityNr extends CellIdentity { CellIdentityNr o = (CellIdentityNr) other; return super.equals(o) && mPci == o.mPci && mTac == o.mTac && mNrArfcn == o.mNrArfcn && mNci == o.mNci; && mNci == o.mNci && mAdditionalPlmns.equals(o.mAdditionalPlmns); } /** Loading Loading @@ -158,6 +173,20 @@ public final class CellIdentityNr extends CellIdentity { return mMncStr; } /** @hide */ @Override public int getChannelNumber() { return mNrArfcn; } /** * @return a list of additional PLMN IDs supported by this cell. */ @NonNull public List<String> getAdditionalPlmns() { return mAdditionalPlmns; } @Override public String toString() { return new StringBuilder(TAG + ":{") Loading @@ -169,6 +198,7 @@ public final class CellIdentityNr extends CellIdentity { .append(" mNci = ").append(mNci) .append(" mAlphaLong = ").append(mAlphaLong) .append(" mAlphaShort = ").append(mAlphaShort) .append(" mAdditionalPlmns = ").append(mAdditionalPlmns) .append(" }") .toString(); } Loading @@ -180,6 +210,7 @@ public final class CellIdentityNr extends CellIdentity { dest.writeInt(mTac); dest.writeInt(mNrArfcn); dest.writeLong(mNci); dest.writeList(mAdditionalPlmns); } /** Construct from Parcel, type has already been processed */ Loading @@ -189,6 +220,7 @@ public final class CellIdentityNr extends CellIdentity { mTac = in.readInt(); mNrArfcn = in.readInt(); mNci = in.readLong(); mAdditionalPlmns = in.readArrayList(null); } /** Implement the Parcelable interface */ Loading telephony/java/android/telephony/CellIdentityTdscdma.java +58 −6 Original line number Diff line number Diff line Loading @@ -21,6 +21,8 @@ import android.annotation.Nullable; import android.os.Parcel; import android.telephony.gsm.GsmCellLocation; import java.util.Collections; import java.util.List; import java.util.Objects; /** Loading @@ -46,6 +48,11 @@ public final class CellIdentityTdscdma extends CellIdentity { // 16-bit UMTS Absolute RF Channel Number described in TS 25.101 sec. 5.4.3 private final int mUarfcn; // a list of additional PLMN-IDs reported for this cell private final List<String> mAdditionalPlmns; private ClosedSubscriberGroupInfo mCsgInfo; /** * @hide */ Loading @@ -55,6 +62,8 @@ public final class CellIdentityTdscdma extends CellIdentity { mCid = CellInfo.UNAVAILABLE; mCpid = CellInfo.UNAVAILABLE; mUarfcn = CellInfo.UNAVAILABLE; mAdditionalPlmns = Collections.emptyList(); mCsgInfo = null; } /** Loading @@ -68,39 +77,57 @@ public final class CellIdentityTdscdma extends CellIdentity { * @param uarfcn 16-bit UMTS Absolute RF Channel Number described in TS 25.101 sec. 5.4.3 * @param alphal long alpha Operator Name String or Enhanced Operator Name String * @param alphas short alpha Operator Name String or Enhanced Operator Name String * @param additionalPlmns a list of additional PLMN IDs broadcast by the cell * @param csgInfo info about the closed subscriber group broadcast by the cell * * @hide */ public CellIdentityTdscdma(String mcc, String mnc, int lac, int cid, int cpid, int uarfcn, String alphal, String alphas) { String alphal, String alphas, @NonNull List<String> additionalPlmns, ClosedSubscriberGroupInfo csgInfo) { super(TAG, CellInfo.TYPE_TDSCDMA, mcc, mnc, alphal, alphas); mLac = inRangeOrUnavailable(lac, 0, MAX_LAC); mCid = inRangeOrUnavailable(cid, 0, MAX_CID); mCpid = inRangeOrUnavailable(cpid, 0, MAX_CPID); mUarfcn = inRangeOrUnavailable(uarfcn, 0, MAX_UARFCN); mAdditionalPlmns = additionalPlmns; mCsgInfo = csgInfo; } private CellIdentityTdscdma(CellIdentityTdscdma cid) { this(cid.mMccStr, cid.mMncStr, cid.mLac, cid.mCid, cid.mCpid, cid.mUarfcn, cid.mAlphaLong, cid.mAlphaShort); cid.mCpid, cid.mUarfcn, cid.mAlphaLong, cid.mAlphaShort, cid.mAdditionalPlmns, cid.mCsgInfo); } /** @hide */ public CellIdentityTdscdma(android.hardware.radio.V1_0.CellIdentityTdscdma cid) { this(cid.mcc, cid.mnc, cid.lac, cid.cid, cid.cpid, CellInfo.UNAVAILABLE, "", ""); this(cid.mcc, cid.mnc, cid.lac, cid.cid, cid.cpid, CellInfo.UNAVAILABLE, "", "", Collections.emptyList(), null); } /** @hide */ public CellIdentityTdscdma(android.hardware.radio.V1_2.CellIdentityTdscdma cid) { this(cid.base.mcc, cid.base.mnc, cid.base.lac, cid.base.cid, cid.base.cpid, cid.uarfcn, cid.operatorNames.alphaLong, cid.operatorNames.alphaShort); cid.uarfcn, cid.operatorNames.alphaLong, cid.operatorNames.alphaShort, Collections.emptyList(), null); } /** @hide */ public CellIdentityTdscdma(android.hardware.radio.V1_5.CellIdentityTdscdma cid) { this(cid.base.base.mcc, cid.base.base.mnc, cid.base.base.lac, cid.base.base.cid, cid.base.base.cpid, cid.base.uarfcn, cid.base.operatorNames.alphaLong, cid.base.operatorNames.alphaShort, cid.additionalPlmns, cid.optionalCsgInfo.csgInfo() != null ? new ClosedSubscriberGroupInfo(cid.optionalCsgInfo.csgInfo()) : null); } /** @hide */ @Override public @NonNull CellIdentityTdscdma sanitizeLocationInfo() { return new CellIdentityTdscdma(mMccStr, mMncStr, CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, mAlphaLong, mAlphaShort); CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, mAlphaLong, mAlphaShort, mAdditionalPlmns, null); } CellIdentityTdscdma copy() { Loading Loading @@ -171,6 +198,22 @@ public final class CellIdentityTdscdma extends CellIdentity { return mUarfcn; } /** * @return a list of additional PLMN IDs supported by this cell. */ @NonNull public List<String> getAdditionalPlmns() { return mAdditionalPlmns; } /** * @return closed subscriber group information about the cell if available, otherwise null. */ @Nullable public ClosedSubscriberGroupInfo getClosedSubscriberGroupInfo() { return mCsgInfo; } /** @hide */ @NonNull @Override Loading Loading @@ -198,12 +241,15 @@ public final class CellIdentityTdscdma extends CellIdentity { && mCid == o.mCid && mCpid == o.mCpid && mUarfcn == o.mUarfcn && mAdditionalPlmns.equals(o.mAdditionalPlmns) && Objects.equals(mCsgInfo, o.mCsgInfo) && super.equals(other); } @Override public int hashCode() { return Objects.hash(mLac, mCid, mCpid, mUarfcn, super.hashCode()); return Objects.hash(mLac, mCid, mCpid, mUarfcn, mAdditionalPlmns.hashCode(), mCsgInfo, super.hashCode()); } @Override Loading @@ -217,6 +263,8 @@ public final class CellIdentityTdscdma extends CellIdentity { .append(" mCid=").append(mCid) .append(" mCpid=").append(mCpid) .append(" mUarfcn=").append(mUarfcn) .append(" mAdditionalPlmns=").append(mAdditionalPlmns) .append(" mCsgInfo=").append(mCsgInfo) .append("}").toString(); } Loading @@ -235,6 +283,8 @@ public final class CellIdentityTdscdma extends CellIdentity { dest.writeInt(mCid); dest.writeInt(mCpid); dest.writeInt(mUarfcn); dest.writeList(mAdditionalPlmns); dest.writeParcelable(mCsgInfo, flags); } /** Construct from Parcel, type has already been processed */ Loading @@ -244,6 +294,8 @@ public final class CellIdentityTdscdma extends CellIdentity { mCid = in.readInt(); mCpid = in.readInt(); mUarfcn = in.readInt(); mAdditionalPlmns = in.readArrayList(null); mCsgInfo = in.readParcelable(null); if (DBG) log(toString()); } Loading Loading
api/current.txt +17 −0 Original line number Diff line number Diff line Loading @@ -46170,6 +46170,7 @@ package android.telephony { } public final class CellIdentityGsm extends android.telephony.CellIdentity { method @NonNull public java.util.List<java.lang.String> getAdditionalPlmns(); method public int getArfcn(); method public int getBsic(); method public int getCid(); Loading @@ -46185,8 +46186,10 @@ package android.telephony { } public final class CellIdentityLte extends android.telephony.CellIdentity { method @NonNull public java.util.List<java.lang.String> getAdditionalPlmns(); method public int getBandwidth(); method public int getCi(); method @Nullable public android.telephony.ClosedSubscriberGroupInfo getClosedSubscriberGroupInfo(); method public int getEarfcn(); method @Deprecated public int getMcc(); method @Nullable public String getMccString(); Loading @@ -46200,6 +46203,7 @@ package android.telephony { } public final class CellIdentityNr extends android.telephony.CellIdentity { method @NonNull public java.util.List<java.lang.String> getAdditionalPlmns(); method @Nullable public String getMccString(); method @Nullable public String getMncString(); method public long getNci(); Loading @@ -46211,7 +46215,9 @@ package android.telephony { } public final class CellIdentityTdscdma extends android.telephony.CellIdentity { method @NonNull public java.util.List<java.lang.String> getAdditionalPlmns(); method public int getCid(); method @Nullable public android.telephony.ClosedSubscriberGroupInfo getClosedSubscriberGroupInfo(); method public int getCpid(); method public int getLac(); method @Nullable public String getMccString(); Loading @@ -46223,7 +46229,9 @@ package android.telephony { } public final class CellIdentityWcdma extends android.telephony.CellIdentity { method @NonNull public java.util.List<java.lang.String> getAdditionalPlmns(); method public int getCid(); method @Nullable public android.telephony.ClosedSubscriberGroupInfo getClosedSubscriberGroupInfo(); method public int getLac(); method @Deprecated public int getMcc(); method @Nullable public String getMccString(); Loading Loading @@ -46393,6 +46401,15 @@ package android.telephony { field @NonNull public static final android.os.Parcelable.Creator<android.telephony.CellSignalStrengthWcdma> CREATOR; } public final class ClosedSubscriberGroupInfo implements android.os.Parcelable { method public int describeContents(); method @IntRange(from=0, to=134217727) public int getCsgIdentity(); method public boolean getCsgIndicator(); method @NonNull public String getHomeNodebName(); method public void writeToParcel(@NonNull android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ClosedSubscriberGroupInfo> CREATOR; } public class IccOpenLogicalChannelResponse implements android.os.Parcelable { method public int describeContents(); method public int getChannel();
telephony/java/android/telephony/CellIdentityGsm.java +37 −6 Original line number Diff line number Diff line Loading @@ -23,6 +23,8 @@ import android.os.Parcel; import android.telephony.gsm.GsmCellLocation; import android.text.TextUtils; import java.util.Collections; import java.util.List; import java.util.Objects; /** Loading @@ -46,6 +48,9 @@ public final class CellIdentityGsm extends CellIdentity { // 6-bit Base Station Identity Code private final int mBsic; // a list of additional PLMN-IDs reported for this cell private final List<String> mAdditionalPlmns; /** * @hide */ Loading @@ -56,6 +61,7 @@ public final class CellIdentityGsm extends CellIdentity { mCid = CellInfo.UNAVAILABLE; mArfcn = CellInfo.UNAVAILABLE; mBsic = CellInfo.UNAVAILABLE; mAdditionalPlmns = Collections.emptyList(); } /** Loading @@ -68,35 +74,48 @@ public final class CellIdentityGsm extends CellIdentity { * @param mncStr 2 or 3-digit Mobile Network Code in string format * @param alphal long alpha Operator Name String or Enhanced Operator Name String * @param alphas short alpha Operator Name String or Enhanced Operator Name String * @param additionalPlmns a list of additional PLMN IDs broadcast by the cell * * @hide */ public CellIdentityGsm(int lac, int cid, int arfcn, int bsic, String mccStr, String mncStr, String alphal, String alphas) { String mncStr, String alphal, String alphas, List<String> additionalPlmns) { super(TAG, CellInfo.TYPE_GSM, mccStr, mncStr, alphal, alphas); mLac = inRangeOrUnavailable(lac, 0, MAX_LAC); mCid = inRangeOrUnavailable(cid, 0, MAX_CID); mArfcn = inRangeOrUnavailable(arfcn, 0, MAX_ARFCN); mBsic = inRangeOrUnavailable(bsic, 0, MAX_BSIC); mAdditionalPlmns = additionalPlmns; } /** @hide */ public CellIdentityGsm(android.hardware.radio.V1_0.CellIdentityGsm cid) { this(cid.lac, cid.cid, cid.arfcn, cid.bsic == (byte) 0xFF ? CellInfo.UNAVAILABLE : cid.bsic, cid.mcc, cid.mnc, "", ""); cid.mcc, cid.mnc, "", "", Collections.emptyList()); } /** @hide */ public CellIdentityGsm(android.hardware.radio.V1_2.CellIdentityGsm cid) { this(cid.base.lac, cid.base.cid, cid.base.arfcn, cid.base.bsic == (byte) 0xFF ? CellInfo.UNAVAILABLE : cid.base.bsic, cid.base.mcc, cid.base.mnc, cid.operatorNames.alphaLong, cid.operatorNames.alphaShort); cid.base.mnc, cid.operatorNames.alphaLong, cid.operatorNames.alphaShort, Collections.emptyList()); } /** @hide */ public CellIdentityGsm(android.hardware.radio.V1_5.CellIdentityGsm cid) { this(cid.base.base.lac, cid.base.base.cid, cid.base.base.arfcn, cid.base.base.bsic == (byte) 0xFF ? CellInfo.UNAVAILABLE : cid.base.base.bsic, cid.base.base.mcc, cid.base.base.mnc, cid.base.operatorNames.alphaLong, cid.base.operatorNames.alphaShort, cid.additionalPlmns); } private CellIdentityGsm(CellIdentityGsm cid) { this(cid.mLac, cid.mCid, cid.mArfcn, cid.mBsic, cid.mMccStr, cid.mMncStr, cid.mAlphaLong, cid.mAlphaShort); cid.mMncStr, cid.mAlphaLong, cid.mAlphaShort, cid.mAdditionalPlmns); } CellIdentityGsm copy() { Loading @@ -107,7 +126,7 @@ public final class CellIdentityGsm extends CellIdentity { @Override public @NonNull CellIdentityGsm sanitizeLocationInfo() { return new CellIdentityGsm(CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, mMccStr, mMncStr, mAlphaLong, mAlphaShort); CellInfo.UNAVAILABLE, mMccStr, mMncStr, mAlphaLong, mAlphaShort, mAdditionalPlmns); } /** Loading Loading @@ -192,6 +211,14 @@ public final class CellIdentityGsm extends CellIdentity { return mArfcn; } /** * @return a list of additional PLMN IDs supported by this cell. */ @NonNull public List<String> getAdditionalPlmns() { return mAdditionalPlmns; } /** * @deprecated Primary Scrambling Code is not applicable to GSM. * @return {@link android.telephony.CellInfo#UNAVAILABLE UNAVAILABLE} - undefined for GSM Loading @@ -215,7 +242,7 @@ public final class CellIdentityGsm extends CellIdentity { @Override public int hashCode() { return Objects.hash(mLac, mCid, super.hashCode()); return Objects.hash(mLac, mCid, mAdditionalPlmns.hashCode(), super.hashCode()); } @Override Loading @@ -235,6 +262,7 @@ public final class CellIdentityGsm extends CellIdentity { && mBsic == o.mBsic && TextUtils.equals(mMccStr, o.mMccStr) && TextUtils.equals(mMncStr, o.mMncStr) && mAdditionalPlmns.equals(o.mAdditionalPlmns) && super.equals(other); } Loading @@ -249,6 +277,7 @@ public final class CellIdentityGsm extends CellIdentity { .append(" mMnc=").append(mMncStr) .append(" mAlphaLong=").append(mAlphaLong) .append(" mAlphaShort=").append(mAlphaShort) .append(" mAdditionalPlmns=").append(mAdditionalPlmns) .append("}").toString(); } Loading @@ -261,6 +290,7 @@ public final class CellIdentityGsm extends CellIdentity { dest.writeInt(mCid); dest.writeInt(mArfcn); dest.writeInt(mBsic); dest.writeList(mAdditionalPlmns); } /** Construct from Parcel, type has already been processed */ Loading @@ -270,6 +300,7 @@ public final class CellIdentityGsm extends CellIdentity { mCid = in.readInt(); mArfcn = in.readInt(); mBsic = in.readInt(); mAdditionalPlmns = in.readArrayList(null); if (DBG) log(toString()); } Loading
telephony/java/android/telephony/CellIdentityLte.java +56 −8 Original line number Diff line number Diff line Loading @@ -24,6 +24,8 @@ import android.os.Parcel; import android.telephony.gsm.GsmCellLocation; import android.text.TextUtils; import java.util.Collections; import java.util.List; import java.util.Objects; /** Loading @@ -50,6 +52,11 @@ public final class CellIdentityLte extends CellIdentity { // cell bandwidth, in kHz private final int mBandwidth; // a list of additional PLMN-IDs reported for this cell private final List<String> mAdditionalPlmns; private ClosedSubscriberGroupInfo mCsgInfo; /** * @hide */ Loading @@ -61,6 +68,8 @@ public final class CellIdentityLte extends CellIdentity { mTac = CellInfo.UNAVAILABLE; mEarfcn = CellInfo.UNAVAILABLE; mBandwidth = CellInfo.UNAVAILABLE; mAdditionalPlmns = Collections.emptyList(); mCsgInfo = null; } /** Loading @@ -76,7 +85,7 @@ public final class CellIdentityLte extends CellIdentity { @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) public CellIdentityLte(int mcc, int mnc, int ci, int pci, int tac) { this(ci, pci, tac, CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, String.valueOf(mcc), String.valueOf(mnc), null, null); String.valueOf(mnc), null, null, Collections.emptyList(), null); } /** Loading @@ -90,34 +99,49 @@ public final class CellIdentityLte extends CellIdentity { * @param mncStr 2 or 3-digit Mobile Network Code in string format * @param alphal long alpha Operator Name String or Enhanced Operator Name String * @param alphas short alpha Operator Name String or Enhanced Operator Name String * @param additionalPlmns a list of additional PLMN IDs broadcast by the cell * @param csgInfo info about the closed subscriber group broadcast by the cell * * @hide */ public CellIdentityLte(int ci, int pci, int tac, int earfcn, int bandwidth, String mccStr, String mncStr, String alphal, String alphas) { String mncStr, String alphal, String alphas, List<String> additionalPlmns, ClosedSubscriberGroupInfo csgInfo) { super(TAG, CellInfo.TYPE_LTE, mccStr, mncStr, alphal, alphas); mCi = inRangeOrUnavailable(ci, 0, MAX_CI); mPci = inRangeOrUnavailable(pci, 0, MAX_PCI); mTac = inRangeOrUnavailable(tac, 0, MAX_TAC); mEarfcn = inRangeOrUnavailable(earfcn, 0, MAX_EARFCN); mBandwidth = inRangeOrUnavailable(bandwidth, 0, MAX_BANDWIDTH); mAdditionalPlmns = additionalPlmns; mCsgInfo = csgInfo; } /** @hide */ public CellIdentityLte(android.hardware.radio.V1_0.CellIdentityLte cid) { this(cid.ci, cid.pci, cid.tac, cid.earfcn, CellInfo.UNAVAILABLE, cid.mcc, cid.mnc, "", ""); this(cid.ci, cid.pci, cid.tac, cid.earfcn, CellInfo.UNAVAILABLE, cid.mcc, cid.mnc, "", "", Collections.emptyList(), null); } /** @hide */ public CellIdentityLte(android.hardware.radio.V1_2.CellIdentityLte cid) { this(cid.base.ci, cid.base.pci, cid.base.tac, cid.base.earfcn, cid.bandwidth, cid.base.mcc, cid.base.mnc, cid.operatorNames.alphaLong, cid.operatorNames.alphaShort); cid.operatorNames.alphaShort, Collections.emptyList(), null); } /** @hide */ public CellIdentityLte(android.hardware.radio.V1_5.CellIdentityLte cid) { this(cid.base.base.ci, cid.base.base.pci, cid.base.base.tac, cid.base.base.earfcn, cid.base.bandwidth, cid.base.base.mcc, cid.base.base.mnc, cid.base.operatorNames.alphaLong, cid.base.operatorNames.alphaShort, cid.additionalPlmns, cid.optionalCsgInfo.csgInfo() != null ? new ClosedSubscriberGroupInfo(cid.optionalCsgInfo.csgInfo()) : null); } private CellIdentityLte(CellIdentityLte cid) { this(cid.mCi, cid.mPci, cid.mTac, cid.mEarfcn, cid.mBandwidth, cid.mMccStr, cid.mMncStr, cid.mAlphaLong, cid.mAlphaShort); cid.mMncStr, cid.mAlphaLong, cid.mAlphaShort, cid.mAdditionalPlmns, cid.mCsgInfo); } /** @hide */ Loading @@ -125,7 +149,7 @@ public final class CellIdentityLte extends CellIdentity { public @NonNull CellIdentityLte sanitizeLocationInfo() { return new CellIdentityLte(CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, mMccStr, mMncStr, mAlphaLong, mAlphaShort); mMccStr, mMncStr, mAlphaLong, mAlphaShort, mAdditionalPlmns, null); } CellIdentityLte copy() { Loading Loading @@ -222,6 +246,22 @@ public final class CellIdentityLte extends CellIdentity { return mEarfcn; } /** * @return a list of additional PLMN IDs supported by this cell. */ @NonNull public List<String> getAdditionalPlmns() { return mAdditionalPlmns; } /** * @return closed subscriber group information about the cell if available, otherwise null. */ @Nullable public ClosedSubscriberGroupInfo getClosedSubscriberGroupInfo() { return mCsgInfo; } /** * A hack to allow tunneling of LTE information via GsmCellLocation * so that older Network Location Providers can return some information Loading @@ -247,7 +287,8 @@ public final class CellIdentityLte extends CellIdentity { @Override public int hashCode() { return Objects.hash(mCi, mPci, mTac, super.hashCode()); return Objects.hash(mCi, mPci, mTac, mAdditionalPlmns.hashCode(), mCsgInfo, super.hashCode()); } @Override Loading @@ -268,6 +309,8 @@ public final class CellIdentityLte extends CellIdentity { && mBandwidth == o.mBandwidth && TextUtils.equals(mMccStr, o.mMccStr) && TextUtils.equals(mMncStr, o.mMncStr) && mAdditionalPlmns.equals(o.mAdditionalPlmns) && Objects.equals(mCsgInfo, o.mCsgInfo) && super.equals(other); } Loading @@ -283,6 +326,8 @@ public final class CellIdentityLte extends CellIdentity { .append(" mMnc=").append(mMncStr) .append(" mAlphaLong=").append(mAlphaLong) .append(" mAlphaShort=").append(mAlphaShort) .append(" mAdditionalPlmns=").append(mAdditionalPlmns) .append(" mCsgInfo=").append(mCsgInfo) .append("}").toString(); } Loading @@ -296,6 +341,8 @@ public final class CellIdentityLte extends CellIdentity { dest.writeInt(mTac); dest.writeInt(mEarfcn); dest.writeInt(mBandwidth); dest.writeList(mAdditionalPlmns); dest.writeParcelable(mCsgInfo, flags); } /** Construct from Parcel, type has already been processed */ Loading @@ -306,7 +353,8 @@ public final class CellIdentityLte extends CellIdentity { mTac = in.readInt(); mEarfcn = in.readInt(); mBandwidth = in.readInt(); mAdditionalPlmns = in.readArrayList(null); mCsgInfo = in.readParcelable(null); if (DBG) log(toString()); } Loading
telephony/java/android/telephony/CellIdentityNr.java +37 −5 Original line number Diff line number Diff line Loading @@ -22,6 +22,8 @@ import android.annotation.Nullable; import android.os.Parcel; import android.telephony.gsm.GsmCellLocation; import java.util.Collections; import java.util.List; import java.util.Objects; /** Loading @@ -40,6 +42,9 @@ public final class CellIdentityNr extends CellIdentity { private final int mTac; private final long mNci; // a list of additional PLMN-IDs reported for this cell private final List<String> mAdditionalPlmns; /** * * @param pci Physical Cell Id in range [0, 1007]. Loading @@ -50,29 +55,38 @@ public final class CellIdentityNr extends CellIdentity { * @param nci The 36-bit NR Cell Identity in range [0, 68719476735]. * @param alphal long alpha Operator Name String or Enhanced Operator Name String. * @param alphas short alpha Operator Name String or Enhanced Operator Name String. * @param additionalPlmns a list of additional PLMN IDs broadcast by the cell * * @hide */ public CellIdentityNr(int pci, int tac, int nrArfcn, String mccStr, String mncStr, long nci, String alphal, String alphas) { long nci, String alphal, String alphas, List<String> additionalPlmns) { super(TAG, CellInfo.TYPE_NR, mccStr, mncStr, alphal, alphas); mPci = inRangeOrUnavailable(pci, 0, MAX_PCI); mTac = inRangeOrUnavailable(tac, 0, MAX_TAC); mNrArfcn = inRangeOrUnavailable(nrArfcn, 0, MAX_NRARFCN); mNci = inRangeOrUnavailable(nci, 0, MAX_NCI); mAdditionalPlmns = additionalPlmns; } /** @hide */ public CellIdentityNr(android.hardware.radio.V1_4.CellIdentityNr cid) { this(cid.pci, cid.tac, cid.nrarfcn, cid.mcc, cid.mnc, cid.nci, cid.operatorNames.alphaLong, cid.operatorNames.alphaShort); cid.operatorNames.alphaShort, Collections.emptyList()); } /** @hide */ public CellIdentityNr(android.hardware.radio.V1_5.CellIdentityNr cid) { this(cid.base.pci, cid.base.tac, cid.base.nrarfcn, cid.base.mcc, cid.base.mnc, cid.base.nci, cid.base.operatorNames.alphaLong, cid.base.operatorNames.alphaShort, cid.additionalPlmns); } /** @hide */ @Override public @NonNull CellIdentityNr sanitizeLocationInfo() { return new CellIdentityNr(CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, mMccStr, mMncStr, CellInfo.UNAVAILABLE, mAlphaLong, mAlphaShort); mMccStr, mMncStr, CellInfo.UNAVAILABLE, mAlphaLong, mAlphaShort, mAdditionalPlmns); } /** Loading @@ -87,7 +101,8 @@ public final class CellIdentityNr extends CellIdentity { @Override public int hashCode() { return Objects.hash(super.hashCode(), mPci, mTac, mNrArfcn, mNci); return Objects.hash(super.hashCode(), mPci, mTac, mNrArfcn, mNci, mAdditionalPlmns.hashCode()); } @Override Loading @@ -98,7 +113,7 @@ public final class CellIdentityNr extends CellIdentity { CellIdentityNr o = (CellIdentityNr) other; return super.equals(o) && mPci == o.mPci && mTac == o.mTac && mNrArfcn == o.mNrArfcn && mNci == o.mNci; && mNci == o.mNci && mAdditionalPlmns.equals(o.mAdditionalPlmns); } /** Loading Loading @@ -158,6 +173,20 @@ public final class CellIdentityNr extends CellIdentity { return mMncStr; } /** @hide */ @Override public int getChannelNumber() { return mNrArfcn; } /** * @return a list of additional PLMN IDs supported by this cell. */ @NonNull public List<String> getAdditionalPlmns() { return mAdditionalPlmns; } @Override public String toString() { return new StringBuilder(TAG + ":{") Loading @@ -169,6 +198,7 @@ public final class CellIdentityNr extends CellIdentity { .append(" mNci = ").append(mNci) .append(" mAlphaLong = ").append(mAlphaLong) .append(" mAlphaShort = ").append(mAlphaShort) .append(" mAdditionalPlmns = ").append(mAdditionalPlmns) .append(" }") .toString(); } Loading @@ -180,6 +210,7 @@ public final class CellIdentityNr extends CellIdentity { dest.writeInt(mTac); dest.writeInt(mNrArfcn); dest.writeLong(mNci); dest.writeList(mAdditionalPlmns); } /** Construct from Parcel, type has already been processed */ Loading @@ -189,6 +220,7 @@ public final class CellIdentityNr extends CellIdentity { mTac = in.readInt(); mNrArfcn = in.readInt(); mNci = in.readLong(); mAdditionalPlmns = in.readArrayList(null); } /** Implement the Parcelable interface */ Loading
telephony/java/android/telephony/CellIdentityTdscdma.java +58 −6 Original line number Diff line number Diff line Loading @@ -21,6 +21,8 @@ import android.annotation.Nullable; import android.os.Parcel; import android.telephony.gsm.GsmCellLocation; import java.util.Collections; import java.util.List; import java.util.Objects; /** Loading @@ -46,6 +48,11 @@ public final class CellIdentityTdscdma extends CellIdentity { // 16-bit UMTS Absolute RF Channel Number described in TS 25.101 sec. 5.4.3 private final int mUarfcn; // a list of additional PLMN-IDs reported for this cell private final List<String> mAdditionalPlmns; private ClosedSubscriberGroupInfo mCsgInfo; /** * @hide */ Loading @@ -55,6 +62,8 @@ public final class CellIdentityTdscdma extends CellIdentity { mCid = CellInfo.UNAVAILABLE; mCpid = CellInfo.UNAVAILABLE; mUarfcn = CellInfo.UNAVAILABLE; mAdditionalPlmns = Collections.emptyList(); mCsgInfo = null; } /** Loading @@ -68,39 +77,57 @@ public final class CellIdentityTdscdma extends CellIdentity { * @param uarfcn 16-bit UMTS Absolute RF Channel Number described in TS 25.101 sec. 5.4.3 * @param alphal long alpha Operator Name String or Enhanced Operator Name String * @param alphas short alpha Operator Name String or Enhanced Operator Name String * @param additionalPlmns a list of additional PLMN IDs broadcast by the cell * @param csgInfo info about the closed subscriber group broadcast by the cell * * @hide */ public CellIdentityTdscdma(String mcc, String mnc, int lac, int cid, int cpid, int uarfcn, String alphal, String alphas) { String alphal, String alphas, @NonNull List<String> additionalPlmns, ClosedSubscriberGroupInfo csgInfo) { super(TAG, CellInfo.TYPE_TDSCDMA, mcc, mnc, alphal, alphas); mLac = inRangeOrUnavailable(lac, 0, MAX_LAC); mCid = inRangeOrUnavailable(cid, 0, MAX_CID); mCpid = inRangeOrUnavailable(cpid, 0, MAX_CPID); mUarfcn = inRangeOrUnavailable(uarfcn, 0, MAX_UARFCN); mAdditionalPlmns = additionalPlmns; mCsgInfo = csgInfo; } private CellIdentityTdscdma(CellIdentityTdscdma cid) { this(cid.mMccStr, cid.mMncStr, cid.mLac, cid.mCid, cid.mCpid, cid.mUarfcn, cid.mAlphaLong, cid.mAlphaShort); cid.mCpid, cid.mUarfcn, cid.mAlphaLong, cid.mAlphaShort, cid.mAdditionalPlmns, cid.mCsgInfo); } /** @hide */ public CellIdentityTdscdma(android.hardware.radio.V1_0.CellIdentityTdscdma cid) { this(cid.mcc, cid.mnc, cid.lac, cid.cid, cid.cpid, CellInfo.UNAVAILABLE, "", ""); this(cid.mcc, cid.mnc, cid.lac, cid.cid, cid.cpid, CellInfo.UNAVAILABLE, "", "", Collections.emptyList(), null); } /** @hide */ public CellIdentityTdscdma(android.hardware.radio.V1_2.CellIdentityTdscdma cid) { this(cid.base.mcc, cid.base.mnc, cid.base.lac, cid.base.cid, cid.base.cpid, cid.uarfcn, cid.operatorNames.alphaLong, cid.operatorNames.alphaShort); cid.uarfcn, cid.operatorNames.alphaLong, cid.operatorNames.alphaShort, Collections.emptyList(), null); } /** @hide */ public CellIdentityTdscdma(android.hardware.radio.V1_5.CellIdentityTdscdma cid) { this(cid.base.base.mcc, cid.base.base.mnc, cid.base.base.lac, cid.base.base.cid, cid.base.base.cpid, cid.base.uarfcn, cid.base.operatorNames.alphaLong, cid.base.operatorNames.alphaShort, cid.additionalPlmns, cid.optionalCsgInfo.csgInfo() != null ? new ClosedSubscriberGroupInfo(cid.optionalCsgInfo.csgInfo()) : null); } /** @hide */ @Override public @NonNull CellIdentityTdscdma sanitizeLocationInfo() { return new CellIdentityTdscdma(mMccStr, mMncStr, CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, mAlphaLong, mAlphaShort); CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, mAlphaLong, mAlphaShort, mAdditionalPlmns, null); } CellIdentityTdscdma copy() { Loading Loading @@ -171,6 +198,22 @@ public final class CellIdentityTdscdma extends CellIdentity { return mUarfcn; } /** * @return a list of additional PLMN IDs supported by this cell. */ @NonNull public List<String> getAdditionalPlmns() { return mAdditionalPlmns; } /** * @return closed subscriber group information about the cell if available, otherwise null. */ @Nullable public ClosedSubscriberGroupInfo getClosedSubscriberGroupInfo() { return mCsgInfo; } /** @hide */ @NonNull @Override Loading Loading @@ -198,12 +241,15 @@ public final class CellIdentityTdscdma extends CellIdentity { && mCid == o.mCid && mCpid == o.mCpid && mUarfcn == o.mUarfcn && mAdditionalPlmns.equals(o.mAdditionalPlmns) && Objects.equals(mCsgInfo, o.mCsgInfo) && super.equals(other); } @Override public int hashCode() { return Objects.hash(mLac, mCid, mCpid, mUarfcn, super.hashCode()); return Objects.hash(mLac, mCid, mCpid, mUarfcn, mAdditionalPlmns.hashCode(), mCsgInfo, super.hashCode()); } @Override Loading @@ -217,6 +263,8 @@ public final class CellIdentityTdscdma extends CellIdentity { .append(" mCid=").append(mCid) .append(" mCpid=").append(mCpid) .append(" mUarfcn=").append(mUarfcn) .append(" mAdditionalPlmns=").append(mAdditionalPlmns) .append(" mCsgInfo=").append(mCsgInfo) .append("}").toString(); } Loading @@ -235,6 +283,8 @@ public final class CellIdentityTdscdma extends CellIdentity { dest.writeInt(mCid); dest.writeInt(mCpid); dest.writeInt(mUarfcn); dest.writeList(mAdditionalPlmns); dest.writeParcelable(mCsgInfo, flags); } /** Construct from Parcel, type has already been processed */ Loading @@ -244,6 +294,8 @@ public final class CellIdentityTdscdma extends CellIdentity { mCid = in.readInt(); mCpid = in.readInt(); mUarfcn = in.readInt(); mAdditionalPlmns = in.readArrayList(null); mCsgInfo = in.readParcelable(null); if (DBG) log(toString()); } Loading