Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8c895d5c authored by Eric Schwarzenbach's avatar Eric Schwarzenbach Committed by android-build-merger
Browse files

Merge "Support new CellInfo fields."

am: e49e14b8

Change-Id: Ib3498ce761118f562d80575cd5c9904787605693
parents 3ab50250 e49e14b8
Loading
Loading
Loading
Loading
+7 −2
Original line number Original line Diff line number Diff line
@@ -5000,8 +5000,8 @@ public class RIL extends BaseCommands implements CommandsInterface {
    }
    }


    private static void writeToParcelForLte(
    private static void writeToParcelForLte(
            Parcel p, int ci, int pci, int tac, int earfcn, String mcc, String mnc, String al,
            Parcel p, int ci, int pci, int tac, int earfcn, int bandwidth, String mcc, String mnc,
            String as, int ss, int rsrp, int rsrq, int rssnr, int cqi, int ta) {
            String al, String as, int ss, int rsrp, int rsrq, int rssnr, int cqi, int ta) {
        p.writeInt(CellIdentity.TYPE_LTE);
        p.writeInt(CellIdentity.TYPE_LTE);
        p.writeString(mcc);
        p.writeString(mcc);
        p.writeString(mnc);
        p.writeString(mnc);
@@ -5009,6 +5009,7 @@ public class RIL extends BaseCommands implements CommandsInterface {
        p.writeInt(pci);
        p.writeInt(pci);
        p.writeInt(tac);
        p.writeInt(tac);
        p.writeInt(earfcn);
        p.writeInt(earfcn);
        p.writeInt(bandwidth);
        p.writeString(al);
        p.writeString(al);
        p.writeString(as);
        p.writeString(as);
        p.writeInt(ss);
        p.writeInt(ss);
@@ -5052,6 +5053,7 @@ public class RIL extends BaseCommands implements CommandsInterface {
            p.writeInt(record.registered ? 1 : 0);
            p.writeInt(record.registered ? 1 : 0);
            p.writeInt(record.timeStampType);
            p.writeInt(record.timeStampType);
            p.writeLong(record.timeStamp);
            p.writeLong(record.timeStamp);
            p.writeInt(CellInfo.CONNECTION_UNKNOWN);
            switch (record.cellInfoType) {
            switch (record.cellInfoType) {
                case CellInfoType.GSM: {
                case CellInfoType.GSM: {
                    CellInfoGsm cellInfoGsm = record.gsm.get(0);
                    CellInfoGsm cellInfoGsm = record.gsm.get(0);
@@ -5098,6 +5100,7 @@ public class RIL extends BaseCommands implements CommandsInterface {
                            cellInfoLte.cellIdentityLte.pci,
                            cellInfoLte.cellIdentityLte.pci,
                            cellInfoLte.cellIdentityLte.tac,
                            cellInfoLte.cellIdentityLte.tac,
                            cellInfoLte.cellIdentityLte.earfcn,
                            cellInfoLte.cellIdentityLte.earfcn,
                            Integer.MAX_VALUE,
                            cellInfoLte.cellIdentityLte.mcc,
                            cellInfoLte.cellIdentityLte.mcc,
                            cellInfoLte.cellIdentityLte.mnc,
                            cellInfoLte.cellIdentityLte.mnc,
                            EMPTY_ALPHA_LONG,
                            EMPTY_ALPHA_LONG,
@@ -5158,6 +5161,7 @@ public class RIL extends BaseCommands implements CommandsInterface {
            p.writeInt(record.registered ? 1 : 0);
            p.writeInt(record.registered ? 1 : 0);
            p.writeInt(record.timeStampType);
            p.writeInt(record.timeStampType);
            p.writeLong(record.timeStamp);
            p.writeLong(record.timeStamp);
            p.writeInt(record.connectionStatus);
            switch (record.cellInfoType) {
            switch (record.cellInfoType) {
                case CellInfoType.GSM: {
                case CellInfoType.GSM: {
                    android.hardware.radio.V1_2.CellInfoGsm cellInfoGsm = record.gsm.get(0);
                    android.hardware.radio.V1_2.CellInfoGsm cellInfoGsm = record.gsm.get(0);
@@ -5204,6 +5208,7 @@ public class RIL extends BaseCommands implements CommandsInterface {
                            cellInfoLte.cellIdentityLte.base.pci,
                            cellInfoLte.cellIdentityLte.base.pci,
                            cellInfoLte.cellIdentityLte.base.tac,
                            cellInfoLte.cellIdentityLte.base.tac,
                            cellInfoLte.cellIdentityLte.base.earfcn,
                            cellInfoLte.cellIdentityLte.base.earfcn,
                            cellInfoLte.cellIdentityLte.bandwidth,
                            cellInfoLte.cellIdentityLte.base.mcc,
                            cellInfoLte.cellIdentityLte.base.mcc,
                            cellInfoLte.cellIdentityLte.base.mnc,
                            cellInfoLte.cellIdentityLte.base.mnc,
                            cellInfoLte.cellIdentityLte.operatorNames.alphaLong,
                            cellInfoLte.cellIdentityLte.operatorNames.alphaLong,
+32 −18
Original line number Original line Diff line number Diff line
@@ -36,6 +36,7 @@ public class CellIdentityLteTest extends AndroidTestCase {
    private static final int EARFCN = 262140;
    private static final int EARFCN = 262140;
    private static final int MCC = 120;
    private static final int MCC = 120;
    private static final int MNC = 260;
    private static final int MNC = 260;
    private static final int BANDWIDTH = 5000;  // kHz
    private static final String MCC_STR = "120";
    private static final String MCC_STR = "120";
    private static final String MNC_STR = "260";
    private static final String MNC_STR = "260";
    private static final String ALPHA_LONG = "long";
    private static final String ALPHA_LONG = "long";
@@ -44,13 +45,14 @@ public class CellIdentityLteTest extends AndroidTestCase {
    @SmallTest
    @SmallTest
    public void testDefaultConstructor() {
    public void testDefaultConstructor() {
        CellIdentityLte ci =
        CellIdentityLte ci =
                new CellIdentityLte(CI, PCI, TAC, EARFCN, MCC_STR, MNC_STR,
                new CellIdentityLte(CI, PCI, TAC, EARFCN, BANDWIDTH, MCC_STR, MNC_STR,
                        ALPHA_LONG, ALPHA_SHORT);
                        ALPHA_LONG, ALPHA_SHORT);


        assertEquals(CI, ci.getCi());
        assertEquals(CI, ci.getCi());
        assertEquals(PCI, ci.getPci());
        assertEquals(PCI, ci.getPci());
        assertEquals(TAC, ci.getTac());
        assertEquals(TAC, ci.getTac());
        assertEquals(EARFCN, ci.getEarfcn());
        assertEquals(EARFCN, ci.getEarfcn());
        assertEquals(BANDWIDTH, ci.getBandwidth());
        assertEquals(MCC, ci.getMcc());
        assertEquals(MCC, ci.getMcc());
        assertEquals(MNC, ci.getMnc());
        assertEquals(MNC, ci.getMnc());
        assertEquals(MCC_STR, ci.getMccStr());
        assertEquals(MCC_STR, ci.getMccStr());
@@ -64,7 +66,7 @@ public class CellIdentityLteTest extends AndroidTestCase {
    public void testConstructorWithThreeDigitMnc() {
    public void testConstructorWithThreeDigitMnc() {
        final String mncWithThreeDigit = "061";
        final String mncWithThreeDigit = "061";
        CellIdentityLte ci =
        CellIdentityLte ci =
                new CellIdentityLte(CI, PCI, TAC, EARFCN, MCC_STR, mncWithThreeDigit,
                new CellIdentityLte(CI, PCI, TAC, EARFCN, BANDWIDTH, MCC_STR, mncWithThreeDigit,
                        ALPHA_LONG, ALPHA_SHORT);
                        ALPHA_LONG, ALPHA_SHORT);


        assertEquals(MCC, ci.getMcc());
        assertEquals(MCC, ci.getMcc());
@@ -78,7 +80,7 @@ public class CellIdentityLteTest extends AndroidTestCase {
    public void testConstructorWithTwoDigitMnc() {
    public void testConstructorWithTwoDigitMnc() {
        final String mncWithTwoDigit = "61";
        final String mncWithTwoDigit = "61";
        CellIdentityLte ci =
        CellIdentityLte ci =
                new CellIdentityLte(CI, PCI, TAC, EARFCN, MCC_STR, mncWithTwoDigit,
                new CellIdentityLte(CI, PCI, TAC, EARFCN, BANDWIDTH, MCC_STR, mncWithTwoDigit,
                        ALPHA_LONG, ALPHA_SHORT);
                        ALPHA_LONG, ALPHA_SHORT);


        assertEquals(MCC, ci.getMcc());
        assertEquals(MCC, ci.getMcc());
@@ -90,8 +92,8 @@ public class CellIdentityLteTest extends AndroidTestCase {


    @SmallTest
    @SmallTest
    public void testConstructorWithEmptyMccMnc() {
    public void testConstructorWithEmptyMccMnc() {
        CellIdentityLte ci =
        CellIdentityLte ci = new CellIdentityLte(
                new CellIdentityLte(CI, PCI, TAC, EARFCN, null, null, ALPHA_LONG, ALPHA_SHORT);
                CI, PCI, TAC, EARFCN, BANDWIDTH, null, null, ALPHA_LONG, ALPHA_SHORT);


        assertEquals(Integer.MAX_VALUE, ci.getMcc());
        assertEquals(Integer.MAX_VALUE, ci.getMcc());
        assertEquals(Integer.MAX_VALUE, ci.getMnc());
        assertEquals(Integer.MAX_VALUE, ci.getMnc());
@@ -99,7 +101,8 @@ public class CellIdentityLteTest extends AndroidTestCase {
        assertNull(ci.getMncStr());
        assertNull(ci.getMncStr());
        assertNull(ci.getMobileNetworkOperator());
        assertNull(ci.getMobileNetworkOperator());


        ci = new CellIdentityLte(CI, PCI, TAC, EARFCN, MCC_STR, null, ALPHA_LONG, ALPHA_SHORT);
        ci = new CellIdentityLte(
                CI, PCI, TAC, EARFCN, BANDWIDTH, MCC_STR, null, ALPHA_LONG, ALPHA_SHORT);


        assertEquals(MCC, ci.getMcc());
        assertEquals(MCC, ci.getMcc());
        assertEquals(Integer.MAX_VALUE, ci.getMnc());
        assertEquals(Integer.MAX_VALUE, ci.getMnc());
@@ -107,7 +110,8 @@ public class CellIdentityLteTest extends AndroidTestCase {
        assertNull(ci.getMncStr());
        assertNull(ci.getMncStr());
        assertNull(ci.getMobileNetworkOperator());
        assertNull(ci.getMobileNetworkOperator());


        ci = new CellIdentityLte(CI, PCI, TAC, EARFCN, null, MNC_STR, ALPHA_LONG, ALPHA_SHORT);
        ci = new CellIdentityLte(
                CI, PCI, TAC, EARFCN, BANDWIDTH, null, MNC_STR, ALPHA_LONG, ALPHA_SHORT);


        assertEquals(MNC, ci.getMnc());
        assertEquals(MNC, ci.getMnc());
        assertEquals(Integer.MAX_VALUE, ci.getMcc());
        assertEquals(Integer.MAX_VALUE, ci.getMcc());
@@ -115,7 +119,8 @@ public class CellIdentityLteTest extends AndroidTestCase {
        assertNull(ci.getMccStr());
        assertNull(ci.getMccStr());
        assertNull(ci.getMobileNetworkOperator());
        assertNull(ci.getMobileNetworkOperator());


        ci = new CellIdentityLte(CI, PCI, TAC, EARFCN, "", "", ALPHA_LONG, ALPHA_SHORT);
        ci = new CellIdentityLte(
                CI, PCI, TAC, EARFCN, BANDWIDTH, "", "", ALPHA_LONG, ALPHA_SHORT);


        assertEquals(Integer.MAX_VALUE, ci.getMcc());
        assertEquals(Integer.MAX_VALUE, ci.getMcc());
        assertEquals(Integer.MAX_VALUE, ci.getMnc());
        assertEquals(Integer.MAX_VALUE, ci.getMnc());
@@ -133,6 +138,7 @@ public class CellIdentityLteTest extends AndroidTestCase {
        assertEquals(PCI, ci.getPci());
        assertEquals(PCI, ci.getPci());
        assertEquals(TAC, ci.getTac());
        assertEquals(TAC, ci.getTac());
        assertEquals(Integer.MAX_VALUE, ci.getEarfcn());
        assertEquals(Integer.MAX_VALUE, ci.getEarfcn());
        assertEquals(Integer.MAX_VALUE, ci.getBandwidth());
        assertEquals(MCC, ci.getMcc());
        assertEquals(MCC, ci.getMcc());
        assertEquals(MNC, ci.getMnc());
        assertEquals(MNC, ci.getMnc());
        assertEquals(MCC_STR, ci.getMccStr());
        assertEquals(MCC_STR, ci.getMccStr());
@@ -145,19 +151,23 @@ public class CellIdentityLteTest extends AndroidTestCase {
    @SmallTest
    @SmallTest
    public void testEquals() {
    public void testEquals() {
        CellIdentityLte ciA = new CellIdentityLte(
        CellIdentityLte ciA = new CellIdentityLte(
                CI, PCI, TAC, EARFCN, MCC_STR, MNC_STR, ALPHA_LONG, ALPHA_SHORT);
                CI, PCI, TAC, EARFCN, BANDWIDTH, MCC_STR, MNC_STR, ALPHA_LONG, ALPHA_SHORT);
        CellIdentityLte ciB = new CellIdentityLte(
        CellIdentityLte ciB = new CellIdentityLte(
                CI, PCI, TAC, EARFCN, MCC_STR, MNC_STR, ALPHA_LONG, ALPHA_SHORT);
                CI, PCI, TAC, EARFCN, BANDWIDTH, MCC_STR, MNC_STR, ALPHA_LONG, ALPHA_SHORT);


        assertTrue(ciA.equals(ciB));
        assertTrue(ciA.equals(ciB));


        ciA = new CellIdentityLte(CI, PCI, TAC, EARFCN, null, null, ALPHA_LONG, ALPHA_SHORT);
        ciA = new CellIdentityLte(
        ciB = new CellIdentityLte(CI, PCI, TAC, EARFCN, null, null, ALPHA_LONG, ALPHA_SHORT);
                CI, PCI, TAC, EARFCN, BANDWIDTH, null, null, ALPHA_LONG, ALPHA_SHORT);
        ciB = new CellIdentityLte(
                CI, PCI, TAC, EARFCN, BANDWIDTH, null, null, ALPHA_LONG, ALPHA_SHORT);


        assertTrue(ciA.equals(ciB));
        assertTrue(ciA.equals(ciB));


        ciA = new CellIdentityLte(CI, PCI, TAC, EARFCN, MCC_STR, null, ALPHA_LONG, ALPHA_SHORT);
        ciA = new CellIdentityLte(
        ciB = new CellIdentityLte(CI, PCI, TAC, EARFCN, null, null, ALPHA_LONG, ALPHA_SHORT);
                CI, PCI, TAC, EARFCN, BANDWIDTH, MCC_STR, null, ALPHA_LONG, ALPHA_SHORT);
        ciB = new CellIdentityLte(
                CI, PCI, TAC, EARFCN, BANDWIDTH, null, null, ALPHA_LONG, ALPHA_SHORT);


        assertFalse(ciA.equals(ciB));
        assertFalse(ciA.equals(ciB));
    }
    }
@@ -165,7 +175,7 @@ public class CellIdentityLteTest extends AndroidTestCase {
    @SmallTest
    @SmallTest
    public void testParcel() {
    public void testParcel() {
        CellIdentityLte ci =
        CellIdentityLte ci =
                new CellIdentityLte(CI, PCI, TAC, EARFCN, MCC_STR, MNC_STR,
                new CellIdentityLte(CI, PCI, TAC, EARFCN, BANDWIDTH, MCC_STR, MNC_STR,
                        ALPHA_LONG, ALPHA_SHORT);
                        ALPHA_LONG, ALPHA_SHORT);


        Parcel p = Parcel.obtain();
        Parcel p = Parcel.obtain();
@@ -177,8 +187,9 @@ public class CellIdentityLteTest extends AndroidTestCase {
    }
    }


    @SmallTest
    @SmallTest
    public void testParcelWithUnknowMccMnc() {
    public void testParcelWithUnknownMccMnc() {
        CellIdentityLte ci = new CellIdentityLte(CI, PCI, TAC, EARFCN, null, null, null, null);
        CellIdentityLte ci = new CellIdentityLte(
                CI, PCI, TAC, EARFCN, BANDWIDTH, null, null, null, null);


        Parcel p = Parcel.obtain();
        Parcel p = Parcel.obtain();
        p.writeInt(CellIdentity.TYPE_LTE);
        p.writeInt(CellIdentity.TYPE_LTE);
@@ -188,6 +199,7 @@ public class CellIdentityLteTest extends AndroidTestCase {
        p.writeInt(PCI);
        p.writeInt(PCI);
        p.writeInt(TAC);
        p.writeInt(TAC);
        p.writeInt(EARFCN);
        p.writeInt(EARFCN);
        p.writeInt(BANDWIDTH);
        p.setDataPosition(0);
        p.setDataPosition(0);


        CellIdentityLte newCi = CellIdentityLte.CREATOR.createFromParcel(p);
        CellIdentityLte newCi = CellIdentityLte.CREATOR.createFromParcel(p);
@@ -198,7 +210,8 @@ public class CellIdentityLteTest extends AndroidTestCase {
    public void testParcelWithInvalidMccMnc() {
    public void testParcelWithInvalidMccMnc() {
        final String invalidMcc = "randomStuff";
        final String invalidMcc = "randomStuff";
        final String invalidMnc = "randomStuff";
        final String invalidMnc = "randomStuff";
        CellIdentityLte ci = new CellIdentityLte(CI, PCI, TAC, EARFCN, null, null, null, null);
        CellIdentityLte ci = new CellIdentityLte(
                CI, PCI, TAC, EARFCN, BANDWIDTH, null, null, null, null);


        Parcel p = Parcel.obtain();
        Parcel p = Parcel.obtain();
        p.writeInt(CellIdentity.TYPE_LTE);
        p.writeInt(CellIdentity.TYPE_LTE);
@@ -208,6 +221,7 @@ public class CellIdentityLteTest extends AndroidTestCase {
        p.writeInt(PCI);
        p.writeInt(PCI);
        p.writeInt(TAC);
        p.writeInt(TAC);
        p.writeInt(EARFCN);
        p.writeInt(EARFCN);
        p.writeInt(BANDWIDTH);
        p.setDataPosition(0);
        p.setDataPosition(0);


        CellIdentityLte newCi = CellIdentityLte.CREATOR.createFromParcel(p);
        CellIdentityLte newCi = CellIdentityLte.CREATOR.createFromParcel(p);
+13 −8
Original line number Original line Diff line number Diff line
@@ -33,6 +33,7 @@ public class CellIdentityTest extends AndroidTestCase {
    private static final int TAC = 65535;
    private static final int TAC = 65535;
    // Absolute RF Channel Number ranges from 0 to 262140.
    // Absolute RF Channel Number ranges from 0 to 262140.
    private static final int EARFCN = 262140;
    private static final int EARFCN = 262140;
    private static final int BANDWIDTH = 5000;  // kHz
    private static final int MCC = 120;
    private static final int MCC = 120;
    private static final int MNC = 260;
    private static final int MNC = 260;
    private static final String MCC_STR = "120";
    private static final String MCC_STR = "120";
@@ -54,27 +55,31 @@ public class CellIdentityTest extends AndroidTestCase {
    @SmallTest
    @SmallTest
    public void testEquals() {
    public void testEquals() {
        CellIdentity ciA = new CellIdentityLte(
        CellIdentity ciA = new CellIdentityLte(
                CI, PCI, TAC, EARFCN, MCC_STR, MNC_STR, ALPHA_LONG, ALPHA_SHORT);
                CI, PCI, TAC, EARFCN, BANDWIDTH, MCC_STR, MNC_STR, ALPHA_LONG, ALPHA_SHORT);
        CellIdentity ciB = new CellIdentityLte(
        CellIdentity ciB = new CellIdentityLte(
                CI, PCI, TAC, EARFCN, MCC_STR, MNC_STR, ALPHA_LONG, ALPHA_SHORT);
                CI, PCI, TAC, EARFCN, BANDWIDTH, MCC_STR, MNC_STR, ALPHA_LONG, ALPHA_SHORT);


        assertTrue(ciA.equals(ciB));
        assertTrue(ciA.equals(ciB));


        ciA = new CellIdentityLte(CI, PCI, TAC, EARFCN, null, null, ALPHA_LONG, ALPHA_SHORT);
        ciA = new CellIdentityLte(CI, PCI, TAC, EARFCN, BANDWIDTH, null, null, ALPHA_LONG,
        ciB = new CellIdentityLte(CI, PCI, TAC, EARFCN, null, null, ALPHA_LONG, ALPHA_SHORT);
                ALPHA_SHORT);
        ciB = new CellIdentityLte(CI, PCI, TAC, EARFCN, BANDWIDTH, null, null, ALPHA_LONG,
                ALPHA_SHORT);


        assertTrue(ciA.equals(ciB));
        assertTrue(ciA.equals(ciB));


        ciA = new CellIdentityLte(CI, PCI, TAC, EARFCN, MCC_STR, null, ALPHA_LONG, ALPHA_SHORT);
        ciA = new CellIdentityLte(CI, PCI, TAC, EARFCN, BANDWIDTH, MCC_STR, null, ALPHA_LONG,
        ciB = new CellIdentityLte(CI, PCI, TAC, EARFCN, null, null, ALPHA_LONG, ALPHA_SHORT);
                ALPHA_SHORT);
        ciB = new CellIdentityLte(CI, PCI, TAC, EARFCN, BANDWIDTH, null, null, ALPHA_LONG,
                ALPHA_SHORT);


        assertFalse(ciA.equals(ciB));
        assertFalse(ciA.equals(ciB));
    }
    }


    @SmallTest
    @SmallTest
    public void testParcel() {
    public void testParcel() {
        CellIdentity ci = new CellIdentityLte(CI, PCI, TAC, EARFCN, MCC_STR, MNC_STR, ALPHA_LONG,
        CellIdentity ci = new CellIdentityLte(CI, PCI, TAC, EARFCN, BANDWIDTH, MCC_STR, MNC_STR,
                ALPHA_SHORT);
                ALPHA_LONG, ALPHA_SHORT);


        Parcel p = Parcel.obtain();
        Parcel p = Parcel.obtain();
        ci.writeToParcel(p, 0);
        ci.writeToParcel(p, 0);
+27 −6
Original line number Original line Diff line number Diff line
@@ -179,6 +179,7 @@ public class RILTest extends TelephonyTest {
    private static final int CQI = 2147483647;
    private static final int CQI = 2147483647;
    private static final int DBM = 74;
    private static final int DBM = 74;
    private static final int EARFCN = 262140;
    private static final int EARFCN = 262140;
    private static final int BANDWIDTH = 5000;
    private static final int ECIO = 124;
    private static final int ECIO = 124;
    private static final String EMPTY_ALPHA_LONG = "";
    private static final String EMPTY_ALPHA_LONG = "";
    private static final String EMPTY_ALPHA_SHORT = "";
    private static final String EMPTY_ALPHA_SHORT = "";
@@ -1086,12 +1087,13 @@ public class RILTest extends TelephonyTest {
        expected.setRegistered(false);
        expected.setRegistered(false);
        expected.setTimeStamp(TIMESTAMP);
        expected.setTimeStamp(TIMESTAMP);
        expected.setTimeStampType(RIL_TIMESTAMP_TYPE_OEM_RIL);
        expected.setTimeStampType(RIL_TIMESTAMP_TYPE_OEM_RIL);
        CellIdentityLte cil = new CellIdentityLte(
        CellIdentityLte cil = new CellIdentityLte(CI, PCI, TAC, EARFCN, Integer.MAX_VALUE, MCC_STR,
                CI, PCI, TAC, EARFCN, MCC_STR, MNC_STR, EMPTY_ALPHA_LONG, EMPTY_ALPHA_SHORT);
                MNC_STR, EMPTY_ALPHA_LONG, EMPTY_ALPHA_SHORT);
        CellSignalStrengthLte css = new CellSignalStrengthLte(
        CellSignalStrengthLte css = new CellSignalStrengthLte(
                SIGNAL_STRENGTH, -RSRP, -RSRQ, RSSNR, CQI, TIME_ADVANCE);
                SIGNAL_STRENGTH, -RSRP, -RSRQ, RSSNR, CQI, TIME_ADVANCE);
        expected.setCellIdentity(cil);
        expected.setCellIdentity(cil);
        expected.setCellSignalStrength(css);
        expected.setCellSignalStrength(css);
        expected.setCellConnectionStatus(CellInfo.CONNECTION_UNKNOWN);
        assertEquals(expected, cellInfoLte);
        assertEquals(expected, cellInfoLte);
    }
    }


@@ -1132,6 +1134,7 @@ public class RILTest extends TelephonyTest {
        cs.initialize(SIGNAL_STRENGTH, BIT_ERROR_RATE, TIME_ADVANCE);
        cs.initialize(SIGNAL_STRENGTH, BIT_ERROR_RATE, TIME_ADVANCE);
        expected.setCellIdentity(ci);
        expected.setCellIdentity(ci);
        expected.setCellSignalStrength(cs);
        expected.setCellSignalStrength(cs);
        expected.setCellConnectionStatus(CellInfo.CONNECTION_UNKNOWN);
        assertEquals(expected, cellInfoGsm);
        assertEquals(expected, cellInfoGsm);
    }
    }


@@ -1170,6 +1173,7 @@ public class RILTest extends TelephonyTest {
        CellSignalStrengthWcdma cs = new CellSignalStrengthWcdma(SIGNAL_STRENGTH, BIT_ERROR_RATE);
        CellSignalStrengthWcdma cs = new CellSignalStrengthWcdma(SIGNAL_STRENGTH, BIT_ERROR_RATE);
        expected.setCellIdentity(ci);
        expected.setCellIdentity(ci);
        expected.setCellSignalStrength(cs);
        expected.setCellSignalStrength(cs);
        expected.setCellConnectionStatus(CellInfo.CONNECTION_UNKNOWN);
        assertEquals(expected, cellInfoWcdma);
        assertEquals(expected, cellInfoWcdma);
    }
    }


@@ -1212,6 +1216,7 @@ public class RILTest extends TelephonyTest {
                -DBM, -ECIO, -DBM, -ECIO, SIGNAL_NOICE_RATIO);
                -DBM, -ECIO, -DBM, -ECIO, SIGNAL_NOICE_RATIO);
        expected.setCellIdentity(ci);
        expected.setCellIdentity(ci);
        expected.setCellSignalStrength(cs);
        expected.setCellSignalStrength(cs);
        expected.setCellConnectionStatus(CellInfo.CONNECTION_UNKNOWN);
        assertEquals(expected, cellInfoCdma);
        assertEquals(expected, cellInfoCdma);
    }
    }


@@ -1226,11 +1231,12 @@ public class RILTest extends TelephonyTest {
        expected.setTimeStamp(TIMESTAMP);
        expected.setTimeStamp(TIMESTAMP);
        expected.setTimeStampType(RIL_TIMESTAMP_TYPE_OEM_RIL);
        expected.setTimeStampType(RIL_TIMESTAMP_TYPE_OEM_RIL);
        CellIdentityLte cil = new CellIdentityLte(
        CellIdentityLte cil = new CellIdentityLte(
                CI, PCI, TAC, EARFCN, MCC_STR, MNC_STR, ALPHA_LONG, ALPHA_SHORT);
                CI, PCI, TAC, EARFCN, BANDWIDTH, MCC_STR, MNC_STR, ALPHA_LONG, ALPHA_SHORT);
        CellSignalStrengthLte css = new CellSignalStrengthLte(
        CellSignalStrengthLte css = new CellSignalStrengthLte(
                SIGNAL_STRENGTH, -RSRP, -RSRQ, RSSNR, CQI, TIME_ADVANCE);
                SIGNAL_STRENGTH, -RSRP, -RSRQ, RSSNR, CQI, TIME_ADVANCE);
        expected.setCellIdentity(cil);
        expected.setCellIdentity(cil);
        expected.setCellSignalStrength(css);
        expected.setCellSignalStrength(css);
        expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE);
        assertEquals(expected, cellInfoLte);
        assertEquals(expected, cellInfoLte);
    }
    }


@@ -1245,12 +1251,13 @@ public class RILTest extends TelephonyTest {
        expected.setRegistered(false);
        expected.setRegistered(false);
        expected.setTimeStamp(TIMESTAMP);
        expected.setTimeStamp(TIMESTAMP);
        expected.setTimeStampType(RIL_TIMESTAMP_TYPE_OEM_RIL);
        expected.setTimeStampType(RIL_TIMESTAMP_TYPE_OEM_RIL);
        CellIdentityLte cil = new CellIdentityLte(
        CellIdentityLte cil = new CellIdentityLte(CI, PCI, TAC, EARFCN, BANDWIDTH, MCC_STR, MNC_STR,
                CI, PCI, TAC, EARFCN, MCC_STR, MNC_STR, EMPTY_ALPHA_LONG, EMPTY_ALPHA_SHORT);
                EMPTY_ALPHA_LONG, EMPTY_ALPHA_SHORT);
        CellSignalStrengthLte css = new CellSignalStrengthLte(
        CellSignalStrengthLte css = new CellSignalStrengthLte(
                SIGNAL_STRENGTH, -RSRP, -RSRQ, RSSNR, CQI, TIME_ADVANCE);
                SIGNAL_STRENGTH, -RSRP, -RSRQ, RSSNR, CQI, TIME_ADVANCE);
        expected.setCellIdentity(cil);
        expected.setCellIdentity(cil);
        expected.setCellSignalStrength(css);
        expected.setCellSignalStrength(css);
        expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE);
        assertEquals(expected, cellInfoLte);
        assertEquals(expected, cellInfoLte);
    }
    }


@@ -1268,11 +1275,12 @@ public class RILTest extends TelephonyTest {
        expected.setTimeStamp(TIMESTAMP);
        expected.setTimeStamp(TIMESTAMP);
        expected.setTimeStampType(RIL_TIMESTAMP_TYPE_OEM_RIL);
        expected.setTimeStampType(RIL_TIMESTAMP_TYPE_OEM_RIL);
        CellIdentityLte cil = new CellIdentityLte(
        CellIdentityLte cil = new CellIdentityLte(
                CI, PCI, TAC, EARFCN, null, null, ALPHA_LONG, ALPHA_SHORT);
                CI, PCI, TAC, EARFCN, BANDWIDTH, null, null, ALPHA_LONG, ALPHA_SHORT);
        CellSignalStrengthLte css = new CellSignalStrengthLte(
        CellSignalStrengthLte css = new CellSignalStrengthLte(
                SIGNAL_STRENGTH, -RSRP, -RSRQ, RSSNR, CQI, TIME_ADVANCE);
                SIGNAL_STRENGTH, -RSRP, -RSRQ, RSSNR, CQI, TIME_ADVANCE);
        expected.setCellIdentity(cil);
        expected.setCellIdentity(cil);
        expected.setCellSignalStrength(css);
        expected.setCellSignalStrength(css);
        expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE);
        assertEquals(expected, cellInfoLte);
        assertEquals(expected, cellInfoLte);
    }
    }


@@ -1292,6 +1300,7 @@ public class RILTest extends TelephonyTest {
        cs.initialize(SIGNAL_STRENGTH, BIT_ERROR_RATE, TIME_ADVANCE);
        cs.initialize(SIGNAL_STRENGTH, BIT_ERROR_RATE, TIME_ADVANCE);
        expected.setCellIdentity(ci);
        expected.setCellIdentity(ci);
        expected.setCellSignalStrength(cs);
        expected.setCellSignalStrength(cs);
        expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE);
        assertEquals(expected, cellInfoGsm);
        assertEquals(expected, cellInfoGsm);
    }
    }


@@ -1312,6 +1321,7 @@ public class RILTest extends TelephonyTest {
        cs.initialize(SIGNAL_STRENGTH, BIT_ERROR_RATE, TIME_ADVANCE);
        cs.initialize(SIGNAL_STRENGTH, BIT_ERROR_RATE, TIME_ADVANCE);
        expected.setCellIdentity(ci);
        expected.setCellIdentity(ci);
        expected.setCellSignalStrength(cs);
        expected.setCellSignalStrength(cs);
        expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE);
        assertEquals(expected, cellInfoGsm);
        assertEquals(expected, cellInfoGsm);
    }
    }


@@ -1333,6 +1343,7 @@ public class RILTest extends TelephonyTest {
        CellSignalStrengthGsm cs = new CellSignalStrengthGsm();
        CellSignalStrengthGsm cs = new CellSignalStrengthGsm();
        cs.initialize(SIGNAL_STRENGTH, BIT_ERROR_RATE, TIME_ADVANCE);
        cs.initialize(SIGNAL_STRENGTH, BIT_ERROR_RATE, TIME_ADVANCE);
        expected.setCellIdentity(ci);
        expected.setCellIdentity(ci);
        expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE);
        expected.setCellSignalStrength(cs);
        expected.setCellSignalStrength(cs);
        assertEquals(expected, cellInfoGsm);
        assertEquals(expected, cellInfoGsm);
    }
    }
@@ -1353,6 +1364,7 @@ public class RILTest extends TelephonyTest {
        CellSignalStrengthWcdma cs = new CellSignalStrengthWcdma(SIGNAL_STRENGTH, BIT_ERROR_RATE);
        CellSignalStrengthWcdma cs = new CellSignalStrengthWcdma(SIGNAL_STRENGTH, BIT_ERROR_RATE);
        expected.setCellIdentity(ci);
        expected.setCellIdentity(ci);
        expected.setCellSignalStrength(cs);
        expected.setCellSignalStrength(cs);
        expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE);
        assertEquals(expected, cellInfoWcdma);
        assertEquals(expected, cellInfoWcdma);
    }
    }


@@ -1372,6 +1384,7 @@ public class RILTest extends TelephonyTest {
        CellSignalStrengthWcdma cs = new CellSignalStrengthWcdma(SIGNAL_STRENGTH, BIT_ERROR_RATE);
        CellSignalStrengthWcdma cs = new CellSignalStrengthWcdma(SIGNAL_STRENGTH, BIT_ERROR_RATE);
        expected.setCellIdentity(ci);
        expected.setCellIdentity(ci);
        expected.setCellSignalStrength(cs);
        expected.setCellSignalStrength(cs);
        expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE);
        assertEquals(expected, cellInfoWcdma);
        assertEquals(expected, cellInfoWcdma);
    }
    }


@@ -1393,6 +1406,7 @@ public class RILTest extends TelephonyTest {
        CellSignalStrengthWcdma cs = new CellSignalStrengthWcdma(SIGNAL_STRENGTH, BIT_ERROR_RATE);
        CellSignalStrengthWcdma cs = new CellSignalStrengthWcdma(SIGNAL_STRENGTH, BIT_ERROR_RATE);
        expected.setCellIdentity(ci);
        expected.setCellIdentity(ci);
        expected.setCellSignalStrength(cs);
        expected.setCellSignalStrength(cs);
        expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE);
        assertEquals(expected, cellInfoWcdma);
        assertEquals(expected, cellInfoWcdma);
    }
    }


@@ -1413,6 +1427,7 @@ public class RILTest extends TelephonyTest {
                -DBM, -ECIO, -DBM, -ECIO, SIGNAL_NOICE_RATIO);
                -DBM, -ECIO, -DBM, -ECIO, SIGNAL_NOICE_RATIO);
        expected.setCellIdentity(ci);
        expected.setCellIdentity(ci);
        expected.setCellSignalStrength(cs);
        expected.setCellSignalStrength(cs);
        expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE);
        assertEquals(expected, cellInfoCdma);
        assertEquals(expected, cellInfoCdma);
    }
    }


@@ -1433,6 +1448,7 @@ public class RILTest extends TelephonyTest {
                -DBM, -ECIO, -DBM, -ECIO, SIGNAL_NOICE_RATIO);
                -DBM, -ECIO, -DBM, -ECIO, SIGNAL_NOICE_RATIO);
        expected.setCellIdentity(ci);
        expected.setCellIdentity(ci);
        expected.setCellSignalStrength(cs);
        expected.setCellSignalStrength(cs);
        expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE);
        assertEquals(expected, cellInfoCdma);
        assertEquals(expected, cellInfoCdma);
    }
    }


@@ -1443,6 +1459,7 @@ public class RILTest extends TelephonyTest {
        lte.cellIdentityLte.base.pci = PCI;
        lte.cellIdentityLte.base.pci = PCI;
        lte.cellIdentityLte.base.tac = TAC;
        lte.cellIdentityLte.base.tac = TAC;
        lte.cellIdentityLte.base.earfcn = EARFCN;
        lte.cellIdentityLte.base.earfcn = EARFCN;
        lte.cellIdentityLte.bandwidth = BANDWIDTH;
        lte.cellIdentityLte.base.mcc = mcc;
        lte.cellIdentityLte.base.mcc = mcc;
        lte.cellIdentityLte.base.mnc = mnc;
        lte.cellIdentityLte.base.mnc = mnc;
        lte.cellIdentityLte.operatorNames.alphaLong = alphaLong;
        lte.cellIdentityLte.operatorNames.alphaLong = alphaLong;
@@ -1459,6 +1476,7 @@ public class RILTest extends TelephonyTest {
        record.timeStampType = RIL_TIMESTAMP_TYPE_OEM_RIL;
        record.timeStampType = RIL_TIMESTAMP_TYPE_OEM_RIL;
        record.timeStamp = TIMESTAMP;
        record.timeStamp = TIMESTAMP;
        record.lte.add(lte);
        record.lte.add(lte);
        record.connectionStatus = 0;
        ArrayList<android.hardware.radio.V1_2.CellInfo> records =
        ArrayList<android.hardware.radio.V1_2.CellInfo> records =
                new ArrayList<android.hardware.radio.V1_2.CellInfo>();
                new ArrayList<android.hardware.radio.V1_2.CellInfo>();
        records.add(record);
        records.add(record);
@@ -1486,6 +1504,7 @@ public class RILTest extends TelephonyTest {
        record.timeStampType = RIL_TIMESTAMP_TYPE_OEM_RIL;
        record.timeStampType = RIL_TIMESTAMP_TYPE_OEM_RIL;
        record.timeStamp = TIMESTAMP;
        record.timeStamp = TIMESTAMP;
        record.gsm.add(cellinfo);
        record.gsm.add(cellinfo);
        record.connectionStatus = 0;
        ArrayList<android.hardware.radio.V1_2.CellInfo> records =
        ArrayList<android.hardware.radio.V1_2.CellInfo> records =
                new ArrayList<android.hardware.radio.V1_2.CellInfo>();
                new ArrayList<android.hardware.radio.V1_2.CellInfo>();
        records.add(record);
        records.add(record);
@@ -1513,6 +1532,7 @@ public class RILTest extends TelephonyTest {
        record.timeStampType = RIL_TIMESTAMP_TYPE_OEM_RIL;
        record.timeStampType = RIL_TIMESTAMP_TYPE_OEM_RIL;
        record.timeStamp = TIMESTAMP;
        record.timeStamp = TIMESTAMP;
        record.wcdma.add(cellinfo);
        record.wcdma.add(cellinfo);
        record.connectionStatus = 0;
        ArrayList<android.hardware.radio.V1_2.CellInfo> records =
        ArrayList<android.hardware.radio.V1_2.CellInfo> records =
                new ArrayList<android.hardware.radio.V1_2.CellInfo>();
                new ArrayList<android.hardware.radio.V1_2.CellInfo>();
        records.add(record);
        records.add(record);
@@ -1541,6 +1561,7 @@ public class RILTest extends TelephonyTest {
        record.timeStampType = RIL_TIMESTAMP_TYPE_OEM_RIL;
        record.timeStampType = RIL_TIMESTAMP_TYPE_OEM_RIL;
        record.timeStamp = TIMESTAMP;
        record.timeStamp = TIMESTAMP;
        record.cdma.add(cellinfo);
        record.cdma.add(cellinfo);
        record.connectionStatus = 0;
        ArrayList<android.hardware.radio.V1_2.CellInfo> records =
        ArrayList<android.hardware.radio.V1_2.CellInfo> records =
                new ArrayList<android.hardware.radio.V1_2.CellInfo>();
                new ArrayList<android.hardware.radio.V1_2.CellInfo>();
        records.add(record);
        records.add(record);