FileDocCategorySizeDatePackage
CellIdentityWcdma.javaAPI DocAndroid 5.1 API5705Thu Mar 12 22:22:42 GMT 2015android.telephony

CellIdentityWcdma

public final class CellIdentityWcdma extends Object implements android.os.Parcelable
CellIdentity to represent a unique UMTS cell

Fields Summary
private static final String
LOG_TAG
private static final boolean
DBG
private final int
mMcc
private final int
mMnc
private final int
mLac
private final int
mCid
private final int
mPsc
public static final Creator
CREATOR
Implement the Parcelable interface
Constructors Summary
public CellIdentityWcdma()

hide


          
      
        mMcc = Integer.MAX_VALUE;
        mMnc = Integer.MAX_VALUE;
        mLac = Integer.MAX_VALUE;
        mCid = Integer.MAX_VALUE;
        mPsc = Integer.MAX_VALUE;
    
private CellIdentityWcdma(android.os.Parcel in)
Construct from Parcel, type has already been processed

        mMcc = in.readInt();
        mMnc = in.readInt();
        mLac = in.readInt();
        mCid = in.readInt();
        mPsc = in.readInt();
        if (DBG) log("CellIdentityWcdma(Parcel): " + toString());
    
public CellIdentityWcdma(int mcc, int mnc, int lac, int cid, int psc)
public constructor

param
mcc 3-digit Mobile Country Code, 0..999
param
mnc 2 or 3-digit Mobile Network Code, 0..999
param
lac 16-bit Location Area Code, 0..65535
param
cid 28-bit UMTS Cell Identity
param
psc 9-bit UMTS Primary Scrambling Code
hide

        mMcc = mcc;
        mMnc = mnc;
        mLac = lac;
        mCid = cid;
        mPsc = psc;
    
private CellIdentityWcdma(CellIdentityWcdma cid)

        mMcc = cid.mMcc;
        mMnc = cid.mMnc;
        mLac = cid.mLac;
        mCid = cid.mCid;
        mPsc = cid.mPsc;
    
Methods Summary
android.telephony.CellIdentityWcdmacopy()

       return new CellIdentityWcdma(this);
    
public intdescribeContents()
Implement the Parcelable interface

        return 0;
    
public booleanequals(java.lang.Object other)

        if (super.equals(other)) {
            try {
                CellIdentityWcdma o = (CellIdentityWcdma)other;
                return mMcc == o.mMcc &&
                        mMnc == o.mMnc &&
                        mLac == o.mLac &&
                        mCid == o.mCid &&
                        mPsc == o.mPsc;
            } catch (ClassCastException e) {
                return false;
            }
        } else {
            return false;
        }
    
public intgetCid()

return
CID 28-bit UMTS Cell Identity described in TS 25.331, 0..268435455, Integer.MAX_VALUE if unknown

        return mCid;
    
public intgetLac()

return
16-bit Location Area Code, 0..65535, Integer.MAX_VALUE if unknown

        return mLac;
    
public intgetMcc()

return
3-digit Mobile Country Code, 0..999, Integer.MAX_VALUE if unknown

        return mMcc;
    
public intgetMnc()

return
2 or 3-digit Mobile Network Code, 0..999, Integer.MAX_VALUE if unknown

        return mMnc;
    
public intgetPsc()

return
9-bit UMTS Primary Scrambling Code described in TS 25.331, 0..511, Integer.MAX_VALUE if unknown

        return mPsc;
    
public inthashCode()

        int primeNum = 31;
        return (mMcc * primeNum) + (mMnc * primeNum) + (mLac * primeNum) + (mCid * primeNum) +
                (mPsc * primeNum);
    
private static voidlog(java.lang.String s)
log


          
         
        Rlog.w(LOG_TAG, s);
    
public java.lang.StringtoString()

        StringBuilder sb = new StringBuilder("CellIdentityWcdma:{");
        sb.append(" mMcc=").append(mMcc);
        sb.append(" mMnc=").append(mMnc);
        sb.append(" mLac=").append(mLac);
        sb.append(" mCid=").append(mCid);
        sb.append(" mPsc=").append(mPsc);
        sb.append("}");

        return sb.toString();
    
public voidwriteToParcel(android.os.Parcel dest, int flags)
Implement the Parcelable interface

        if (DBG) log("writeToParcel(Parcel, int): " + toString());
        dest.writeInt(mMcc);
        dest.writeInt(mMnc);
        dest.writeInt(mLac);
        dest.writeInt(mCid);
        dest.writeInt(mPsc);