Loading src/java/com/android/internal/telephony/RIL.java +7 −2 Original line number Diff line number Diff line Loading @@ -5000,8 +5000,8 @@ public class RIL extends BaseCommands implements CommandsInterface { } private static void writeToParcelForLte( Parcel p, int ci, int pci, int tac, int earfcn, String mcc, String mnc, String al, String as, int ss, int rsrp, int rsrq, int rssnr, int cqi, int ta) { Parcel p, int ci, int pci, int tac, int earfcn, int bandwidth, String mcc, String mnc, String al, String as, int ss, int rsrp, int rsrq, int rssnr, int cqi, int ta) { p.writeInt(CellIdentity.TYPE_LTE); p.writeString(mcc); p.writeString(mnc); Loading @@ -5009,6 +5009,7 @@ public class RIL extends BaseCommands implements CommandsInterface { p.writeInt(pci); p.writeInt(tac); p.writeInt(earfcn); p.writeInt(bandwidth); p.writeString(al); p.writeString(as); p.writeInt(ss); Loading Loading @@ -5052,6 +5053,7 @@ public class RIL extends BaseCommands implements CommandsInterface { p.writeInt(record.registered ? 1 : 0); p.writeInt(record.timeStampType); p.writeLong(record.timeStamp); p.writeInt(CellInfo.CONNECTION_UNKNOWN); switch (record.cellInfoType) { case CellInfoType.GSM: { CellInfoGsm cellInfoGsm = record.gsm.get(0); Loading Loading @@ -5098,6 +5100,7 @@ public class RIL extends BaseCommands implements CommandsInterface { cellInfoLte.cellIdentityLte.pci, cellInfoLte.cellIdentityLte.tac, cellInfoLte.cellIdentityLte.earfcn, Integer.MAX_VALUE, cellInfoLte.cellIdentityLte.mcc, cellInfoLte.cellIdentityLte.mnc, EMPTY_ALPHA_LONG, Loading Loading @@ -5158,6 +5161,7 @@ public class RIL extends BaseCommands implements CommandsInterface { p.writeInt(record.registered ? 1 : 0); p.writeInt(record.timeStampType); p.writeLong(record.timeStamp); p.writeInt(record.connectionStatus); switch (record.cellInfoType) { case CellInfoType.GSM: { android.hardware.radio.V1_2.CellInfoGsm cellInfoGsm = record.gsm.get(0); Loading Loading @@ -5204,6 +5208,7 @@ public class RIL extends BaseCommands implements CommandsInterface { cellInfoLte.cellIdentityLte.base.pci, cellInfoLte.cellIdentityLte.base.tac, cellInfoLte.cellIdentityLte.base.earfcn, cellInfoLte.cellIdentityLte.bandwidth, cellInfoLte.cellIdentityLte.base.mcc, cellInfoLte.cellIdentityLte.base.mnc, cellInfoLte.cellIdentityLte.operatorNames.alphaLong, Loading tests/telephonytests/src/com/android/internal/telephony/CellIdentityLteTest.java +32 −18 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ public class CellIdentityLteTest extends AndroidTestCase { private static final int EARFCN = 262140; private static final int MCC = 120; private static final int MNC = 260; private static final int BANDWIDTH = 5000; // kHz private static final String MCC_STR = "120"; private static final String MNC_STR = "260"; private static final String ALPHA_LONG = "long"; Loading @@ -44,13 +45,14 @@ public class CellIdentityLteTest extends AndroidTestCase { @SmallTest public void testDefaultConstructor() { 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); assertEquals(CI, ci.getCi()); assertEquals(PCI, ci.getPci()); assertEquals(TAC, ci.getTac()); assertEquals(EARFCN, ci.getEarfcn()); assertEquals(BANDWIDTH, ci.getBandwidth()); assertEquals(MCC, ci.getMcc()); assertEquals(MNC, ci.getMnc()); assertEquals(MCC_STR, ci.getMccStr()); Loading @@ -64,7 +66,7 @@ public class CellIdentityLteTest extends AndroidTestCase { public void testConstructorWithThreeDigitMnc() { final String mncWithThreeDigit = "061"; 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); assertEquals(MCC, ci.getMcc()); Loading @@ -78,7 +80,7 @@ public class CellIdentityLteTest extends AndroidTestCase { public void testConstructorWithTwoDigitMnc() { final String mncWithTwoDigit = "61"; 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); assertEquals(MCC, ci.getMcc()); Loading @@ -90,8 +92,8 @@ public class CellIdentityLteTest extends AndroidTestCase { @SmallTest public void testConstructorWithEmptyMccMnc() { CellIdentityLte ci = new CellIdentityLte(CI, PCI, TAC, EARFCN, null, null, ALPHA_LONG, ALPHA_SHORT); CellIdentityLte ci = new CellIdentityLte( CI, PCI, TAC, EARFCN, BANDWIDTH, null, null, ALPHA_LONG, ALPHA_SHORT); assertEquals(Integer.MAX_VALUE, ci.getMcc()); assertEquals(Integer.MAX_VALUE, ci.getMnc()); Loading @@ -99,7 +101,8 @@ public class CellIdentityLteTest extends AndroidTestCase { assertNull(ci.getMncStr()); 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(Integer.MAX_VALUE, ci.getMnc()); Loading @@ -107,7 +110,8 @@ public class CellIdentityLteTest extends AndroidTestCase { assertNull(ci.getMncStr()); 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(Integer.MAX_VALUE, ci.getMcc()); Loading @@ -115,7 +119,8 @@ public class CellIdentityLteTest extends AndroidTestCase { assertNull(ci.getMccStr()); 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.getMnc()); Loading @@ -133,6 +138,7 @@ public class CellIdentityLteTest extends AndroidTestCase { assertEquals(PCI, ci.getPci()); assertEquals(TAC, ci.getTac()); assertEquals(Integer.MAX_VALUE, ci.getEarfcn()); assertEquals(Integer.MAX_VALUE, ci.getBandwidth()); assertEquals(MCC, ci.getMcc()); assertEquals(MNC, ci.getMnc()); assertEquals(MCC_STR, ci.getMccStr()); Loading @@ -145,19 +151,23 @@ public class CellIdentityLteTest extends AndroidTestCase { @SmallTest public void testEquals() { 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( 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)); ciA = new CellIdentityLte(CI, PCI, TAC, EARFCN, null, null, ALPHA_LONG, ALPHA_SHORT); ciB = new CellIdentityLte(CI, PCI, TAC, EARFCN, null, null, ALPHA_LONG, ALPHA_SHORT); ciA = new CellIdentityLte( 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)); ciA = new CellIdentityLte(CI, PCI, TAC, EARFCN, MCC_STR, null, ALPHA_LONG, ALPHA_SHORT); ciB = new CellIdentityLte(CI, PCI, TAC, EARFCN, null, null, ALPHA_LONG, ALPHA_SHORT); ciA = new CellIdentityLte( 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)); } Loading @@ -165,7 +175,7 @@ public class CellIdentityLteTest extends AndroidTestCase { @SmallTest public void testParcel() { 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); Parcel p = Parcel.obtain(); Loading @@ -177,8 +187,9 @@ public class CellIdentityLteTest extends AndroidTestCase { } @SmallTest public void testParcelWithUnknowMccMnc() { CellIdentityLte ci = new CellIdentityLte(CI, PCI, TAC, EARFCN, null, null, null, null); public void testParcelWithUnknownMccMnc() { CellIdentityLte ci = new CellIdentityLte( CI, PCI, TAC, EARFCN, BANDWIDTH, null, null, null, null); Parcel p = Parcel.obtain(); p.writeInt(CellIdentity.TYPE_LTE); Loading @@ -188,6 +199,7 @@ public class CellIdentityLteTest extends AndroidTestCase { p.writeInt(PCI); p.writeInt(TAC); p.writeInt(EARFCN); p.writeInt(BANDWIDTH); p.setDataPosition(0); CellIdentityLte newCi = CellIdentityLte.CREATOR.createFromParcel(p); Loading @@ -198,7 +210,8 @@ public class CellIdentityLteTest extends AndroidTestCase { public void testParcelWithInvalidMccMnc() { final String invalidMcc = "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(); p.writeInt(CellIdentity.TYPE_LTE); Loading @@ -208,6 +221,7 @@ public class CellIdentityLteTest extends AndroidTestCase { p.writeInt(PCI); p.writeInt(TAC); p.writeInt(EARFCN); p.writeInt(BANDWIDTH); p.setDataPosition(0); CellIdentityLte newCi = CellIdentityLte.CREATOR.createFromParcel(p); Loading tests/telephonytests/src/com/android/internal/telephony/CellIdentityTest.java +13 −8 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ public class CellIdentityTest extends AndroidTestCase { private static final int TAC = 65535; // Absolute RF Channel Number ranges from 0 to 262140. private static final int EARFCN = 262140; private static final int BANDWIDTH = 5000; // kHz private static final int MCC = 120; private static final int MNC = 260; private static final String MCC_STR = "120"; Loading @@ -54,27 +55,31 @@ public class CellIdentityTest extends AndroidTestCase { @SmallTest public void testEquals() { 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( 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)); ciA = new CellIdentityLte(CI, PCI, TAC, EARFCN, null, null, ALPHA_LONG, ALPHA_SHORT); ciB = new CellIdentityLte(CI, PCI, TAC, EARFCN, null, null, ALPHA_LONG, ALPHA_SHORT); ciA = new CellIdentityLte(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)); ciA = new CellIdentityLte(CI, PCI, TAC, EARFCN, MCC_STR, null, ALPHA_LONG, ALPHA_SHORT); ciB = new CellIdentityLte(CI, PCI, TAC, EARFCN, null, null, ALPHA_LONG, ALPHA_SHORT); ciA = new CellIdentityLte(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)); } @SmallTest public void testParcel() { CellIdentity ci = new CellIdentityLte(CI, PCI, TAC, EARFCN, MCC_STR, MNC_STR, ALPHA_LONG, ALPHA_SHORT); CellIdentity ci = new CellIdentityLte(CI, PCI, TAC, EARFCN, BANDWIDTH, MCC_STR, MNC_STR, ALPHA_LONG, ALPHA_SHORT); Parcel p = Parcel.obtain(); ci.writeToParcel(p, 0); Loading tests/telephonytests/src/com/android/internal/telephony/RILTest.java +27 −6 Original line number Diff line number Diff line Loading @@ -179,6 +179,7 @@ public class RILTest extends TelephonyTest { private static final int CQI = 2147483647; private static final int DBM = 74; private static final int EARFCN = 262140; private static final int BANDWIDTH = 5000; private static final int ECIO = 124; private static final String EMPTY_ALPHA_LONG = ""; private static final String EMPTY_ALPHA_SHORT = ""; Loading Loading @@ -1086,12 +1087,13 @@ public class RILTest extends TelephonyTest { expected.setRegistered(false); expected.setTimeStamp(TIMESTAMP); expected.setTimeStampType(RIL_TIMESTAMP_TYPE_OEM_RIL); CellIdentityLte cil = new CellIdentityLte( CI, PCI, TAC, EARFCN, MCC_STR, MNC_STR, EMPTY_ALPHA_LONG, EMPTY_ALPHA_SHORT); CellIdentityLte cil = new CellIdentityLte(CI, PCI, TAC, EARFCN, Integer.MAX_VALUE, MCC_STR, MNC_STR, EMPTY_ALPHA_LONG, EMPTY_ALPHA_SHORT); CellSignalStrengthLte css = new CellSignalStrengthLte( SIGNAL_STRENGTH, -RSRP, -RSRQ, RSSNR, CQI, TIME_ADVANCE); expected.setCellIdentity(cil); expected.setCellSignalStrength(css); expected.setCellConnectionStatus(CellInfo.CONNECTION_UNKNOWN); assertEquals(expected, cellInfoLte); } Loading Loading @@ -1132,6 +1134,7 @@ public class RILTest extends TelephonyTest { cs.initialize(SIGNAL_STRENGTH, BIT_ERROR_RATE, TIME_ADVANCE); expected.setCellIdentity(ci); expected.setCellSignalStrength(cs); expected.setCellConnectionStatus(CellInfo.CONNECTION_UNKNOWN); assertEquals(expected, cellInfoGsm); } Loading Loading @@ -1170,6 +1173,7 @@ public class RILTest extends TelephonyTest { CellSignalStrengthWcdma cs = new CellSignalStrengthWcdma(SIGNAL_STRENGTH, BIT_ERROR_RATE); expected.setCellIdentity(ci); expected.setCellSignalStrength(cs); expected.setCellConnectionStatus(CellInfo.CONNECTION_UNKNOWN); assertEquals(expected, cellInfoWcdma); } Loading Loading @@ -1212,6 +1216,7 @@ public class RILTest extends TelephonyTest { -DBM, -ECIO, -DBM, -ECIO, SIGNAL_NOICE_RATIO); expected.setCellIdentity(ci); expected.setCellSignalStrength(cs); expected.setCellConnectionStatus(CellInfo.CONNECTION_UNKNOWN); assertEquals(expected, cellInfoCdma); } Loading @@ -1226,11 +1231,12 @@ public class RILTest extends TelephonyTest { expected.setTimeStamp(TIMESTAMP); expected.setTimeStampType(RIL_TIMESTAMP_TYPE_OEM_RIL); 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( SIGNAL_STRENGTH, -RSRP, -RSRQ, RSSNR, CQI, TIME_ADVANCE); expected.setCellIdentity(cil); expected.setCellSignalStrength(css); expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE); assertEquals(expected, cellInfoLte); } Loading @@ -1245,12 +1251,13 @@ public class RILTest extends TelephonyTest { expected.setRegistered(false); expected.setTimeStamp(TIMESTAMP); expected.setTimeStampType(RIL_TIMESTAMP_TYPE_OEM_RIL); CellIdentityLte cil = new CellIdentityLte( CI, PCI, TAC, EARFCN, MCC_STR, MNC_STR, EMPTY_ALPHA_LONG, EMPTY_ALPHA_SHORT); CellIdentityLte cil = new CellIdentityLte(CI, PCI, TAC, EARFCN, BANDWIDTH, MCC_STR, MNC_STR, EMPTY_ALPHA_LONG, EMPTY_ALPHA_SHORT); CellSignalStrengthLte css = new CellSignalStrengthLte( SIGNAL_STRENGTH, -RSRP, -RSRQ, RSSNR, CQI, TIME_ADVANCE); expected.setCellIdentity(cil); expected.setCellSignalStrength(css); expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE); assertEquals(expected, cellInfoLte); } Loading @@ -1268,11 +1275,12 @@ public class RILTest extends TelephonyTest { expected.setTimeStamp(TIMESTAMP); expected.setTimeStampType(RIL_TIMESTAMP_TYPE_OEM_RIL); 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( SIGNAL_STRENGTH, -RSRP, -RSRQ, RSSNR, CQI, TIME_ADVANCE); expected.setCellIdentity(cil); expected.setCellSignalStrength(css); expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE); assertEquals(expected, cellInfoLte); } Loading @@ -1292,6 +1300,7 @@ public class RILTest extends TelephonyTest { cs.initialize(SIGNAL_STRENGTH, BIT_ERROR_RATE, TIME_ADVANCE); expected.setCellIdentity(ci); expected.setCellSignalStrength(cs); expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE); assertEquals(expected, cellInfoGsm); } Loading @@ -1312,6 +1321,7 @@ public class RILTest extends TelephonyTest { cs.initialize(SIGNAL_STRENGTH, BIT_ERROR_RATE, TIME_ADVANCE); expected.setCellIdentity(ci); expected.setCellSignalStrength(cs); expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE); assertEquals(expected, cellInfoGsm); } Loading @@ -1333,6 +1343,7 @@ public class RILTest extends TelephonyTest { CellSignalStrengthGsm cs = new CellSignalStrengthGsm(); cs.initialize(SIGNAL_STRENGTH, BIT_ERROR_RATE, TIME_ADVANCE); expected.setCellIdentity(ci); expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE); expected.setCellSignalStrength(cs); assertEquals(expected, cellInfoGsm); } Loading @@ -1353,6 +1364,7 @@ public class RILTest extends TelephonyTest { CellSignalStrengthWcdma cs = new CellSignalStrengthWcdma(SIGNAL_STRENGTH, BIT_ERROR_RATE); expected.setCellIdentity(ci); expected.setCellSignalStrength(cs); expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE); assertEquals(expected, cellInfoWcdma); } Loading @@ -1372,6 +1384,7 @@ public class RILTest extends TelephonyTest { CellSignalStrengthWcdma cs = new CellSignalStrengthWcdma(SIGNAL_STRENGTH, BIT_ERROR_RATE); expected.setCellIdentity(ci); expected.setCellSignalStrength(cs); expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE); assertEquals(expected, cellInfoWcdma); } Loading @@ -1393,6 +1406,7 @@ public class RILTest extends TelephonyTest { CellSignalStrengthWcdma cs = new CellSignalStrengthWcdma(SIGNAL_STRENGTH, BIT_ERROR_RATE); expected.setCellIdentity(ci); expected.setCellSignalStrength(cs); expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE); assertEquals(expected, cellInfoWcdma); } Loading @@ -1413,6 +1427,7 @@ public class RILTest extends TelephonyTest { -DBM, -ECIO, -DBM, -ECIO, SIGNAL_NOICE_RATIO); expected.setCellIdentity(ci); expected.setCellSignalStrength(cs); expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE); assertEquals(expected, cellInfoCdma); } Loading @@ -1433,6 +1448,7 @@ public class RILTest extends TelephonyTest { -DBM, -ECIO, -DBM, -ECIO, SIGNAL_NOICE_RATIO); expected.setCellIdentity(ci); expected.setCellSignalStrength(cs); expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE); assertEquals(expected, cellInfoCdma); } Loading @@ -1443,6 +1459,7 @@ public class RILTest extends TelephonyTest { lte.cellIdentityLte.base.pci = PCI; lte.cellIdentityLte.base.tac = TAC; lte.cellIdentityLte.base.earfcn = EARFCN; lte.cellIdentityLte.bandwidth = BANDWIDTH; lte.cellIdentityLte.base.mcc = mcc; lte.cellIdentityLte.base.mnc = mnc; lte.cellIdentityLte.operatorNames.alphaLong = alphaLong; Loading @@ -1459,6 +1476,7 @@ public class RILTest extends TelephonyTest { record.timeStampType = RIL_TIMESTAMP_TYPE_OEM_RIL; record.timeStamp = TIMESTAMP; record.lte.add(lte); record.connectionStatus = 0; ArrayList<android.hardware.radio.V1_2.CellInfo> records = new ArrayList<android.hardware.radio.V1_2.CellInfo>(); records.add(record); Loading Loading @@ -1486,6 +1504,7 @@ public class RILTest extends TelephonyTest { record.timeStampType = RIL_TIMESTAMP_TYPE_OEM_RIL; record.timeStamp = TIMESTAMP; record.gsm.add(cellinfo); record.connectionStatus = 0; ArrayList<android.hardware.radio.V1_2.CellInfo> records = new ArrayList<android.hardware.radio.V1_2.CellInfo>(); records.add(record); Loading Loading @@ -1513,6 +1532,7 @@ public class RILTest extends TelephonyTest { record.timeStampType = RIL_TIMESTAMP_TYPE_OEM_RIL; record.timeStamp = TIMESTAMP; record.wcdma.add(cellinfo); record.connectionStatus = 0; ArrayList<android.hardware.radio.V1_2.CellInfo> records = new ArrayList<android.hardware.radio.V1_2.CellInfo>(); records.add(record); Loading Loading @@ -1541,6 +1561,7 @@ public class RILTest extends TelephonyTest { record.timeStampType = RIL_TIMESTAMP_TYPE_OEM_RIL; record.timeStamp = TIMESTAMP; record.cdma.add(cellinfo); record.connectionStatus = 0; ArrayList<android.hardware.radio.V1_2.CellInfo> records = new ArrayList<android.hardware.radio.V1_2.CellInfo>(); records.add(record); Loading Loading
src/java/com/android/internal/telephony/RIL.java +7 −2 Original line number Diff line number Diff line Loading @@ -5000,8 +5000,8 @@ public class RIL extends BaseCommands implements CommandsInterface { } private static void writeToParcelForLte( Parcel p, int ci, int pci, int tac, int earfcn, String mcc, String mnc, String al, String as, int ss, int rsrp, int rsrq, int rssnr, int cqi, int ta) { Parcel p, int ci, int pci, int tac, int earfcn, int bandwidth, String mcc, String mnc, String al, String as, int ss, int rsrp, int rsrq, int rssnr, int cqi, int ta) { p.writeInt(CellIdentity.TYPE_LTE); p.writeString(mcc); p.writeString(mnc); Loading @@ -5009,6 +5009,7 @@ public class RIL extends BaseCommands implements CommandsInterface { p.writeInt(pci); p.writeInt(tac); p.writeInt(earfcn); p.writeInt(bandwidth); p.writeString(al); p.writeString(as); p.writeInt(ss); Loading Loading @@ -5052,6 +5053,7 @@ public class RIL extends BaseCommands implements CommandsInterface { p.writeInt(record.registered ? 1 : 0); p.writeInt(record.timeStampType); p.writeLong(record.timeStamp); p.writeInt(CellInfo.CONNECTION_UNKNOWN); switch (record.cellInfoType) { case CellInfoType.GSM: { CellInfoGsm cellInfoGsm = record.gsm.get(0); Loading Loading @@ -5098,6 +5100,7 @@ public class RIL extends BaseCommands implements CommandsInterface { cellInfoLte.cellIdentityLte.pci, cellInfoLte.cellIdentityLte.tac, cellInfoLte.cellIdentityLte.earfcn, Integer.MAX_VALUE, cellInfoLte.cellIdentityLte.mcc, cellInfoLte.cellIdentityLte.mnc, EMPTY_ALPHA_LONG, Loading Loading @@ -5158,6 +5161,7 @@ public class RIL extends BaseCommands implements CommandsInterface { p.writeInt(record.registered ? 1 : 0); p.writeInt(record.timeStampType); p.writeLong(record.timeStamp); p.writeInt(record.connectionStatus); switch (record.cellInfoType) { case CellInfoType.GSM: { android.hardware.radio.V1_2.CellInfoGsm cellInfoGsm = record.gsm.get(0); Loading Loading @@ -5204,6 +5208,7 @@ public class RIL extends BaseCommands implements CommandsInterface { cellInfoLte.cellIdentityLte.base.pci, cellInfoLte.cellIdentityLte.base.tac, cellInfoLte.cellIdentityLte.base.earfcn, cellInfoLte.cellIdentityLte.bandwidth, cellInfoLte.cellIdentityLte.base.mcc, cellInfoLte.cellIdentityLte.base.mnc, cellInfoLte.cellIdentityLte.operatorNames.alphaLong, Loading
tests/telephonytests/src/com/android/internal/telephony/CellIdentityLteTest.java +32 −18 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ public class CellIdentityLteTest extends AndroidTestCase { private static final int EARFCN = 262140; private static final int MCC = 120; private static final int MNC = 260; private static final int BANDWIDTH = 5000; // kHz private static final String MCC_STR = "120"; private static final String MNC_STR = "260"; private static final String ALPHA_LONG = "long"; Loading @@ -44,13 +45,14 @@ public class CellIdentityLteTest extends AndroidTestCase { @SmallTest public void testDefaultConstructor() { 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); assertEquals(CI, ci.getCi()); assertEquals(PCI, ci.getPci()); assertEquals(TAC, ci.getTac()); assertEquals(EARFCN, ci.getEarfcn()); assertEquals(BANDWIDTH, ci.getBandwidth()); assertEquals(MCC, ci.getMcc()); assertEquals(MNC, ci.getMnc()); assertEquals(MCC_STR, ci.getMccStr()); Loading @@ -64,7 +66,7 @@ public class CellIdentityLteTest extends AndroidTestCase { public void testConstructorWithThreeDigitMnc() { final String mncWithThreeDigit = "061"; 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); assertEquals(MCC, ci.getMcc()); Loading @@ -78,7 +80,7 @@ public class CellIdentityLteTest extends AndroidTestCase { public void testConstructorWithTwoDigitMnc() { final String mncWithTwoDigit = "61"; 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); assertEquals(MCC, ci.getMcc()); Loading @@ -90,8 +92,8 @@ public class CellIdentityLteTest extends AndroidTestCase { @SmallTest public void testConstructorWithEmptyMccMnc() { CellIdentityLte ci = new CellIdentityLte(CI, PCI, TAC, EARFCN, null, null, ALPHA_LONG, ALPHA_SHORT); CellIdentityLte ci = new CellIdentityLte( CI, PCI, TAC, EARFCN, BANDWIDTH, null, null, ALPHA_LONG, ALPHA_SHORT); assertEquals(Integer.MAX_VALUE, ci.getMcc()); assertEquals(Integer.MAX_VALUE, ci.getMnc()); Loading @@ -99,7 +101,8 @@ public class CellIdentityLteTest extends AndroidTestCase { assertNull(ci.getMncStr()); 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(Integer.MAX_VALUE, ci.getMnc()); Loading @@ -107,7 +110,8 @@ public class CellIdentityLteTest extends AndroidTestCase { assertNull(ci.getMncStr()); 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(Integer.MAX_VALUE, ci.getMcc()); Loading @@ -115,7 +119,8 @@ public class CellIdentityLteTest extends AndroidTestCase { assertNull(ci.getMccStr()); 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.getMnc()); Loading @@ -133,6 +138,7 @@ public class CellIdentityLteTest extends AndroidTestCase { assertEquals(PCI, ci.getPci()); assertEquals(TAC, ci.getTac()); assertEquals(Integer.MAX_VALUE, ci.getEarfcn()); assertEquals(Integer.MAX_VALUE, ci.getBandwidth()); assertEquals(MCC, ci.getMcc()); assertEquals(MNC, ci.getMnc()); assertEquals(MCC_STR, ci.getMccStr()); Loading @@ -145,19 +151,23 @@ public class CellIdentityLteTest extends AndroidTestCase { @SmallTest public void testEquals() { 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( 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)); ciA = new CellIdentityLte(CI, PCI, TAC, EARFCN, null, null, ALPHA_LONG, ALPHA_SHORT); ciB = new CellIdentityLte(CI, PCI, TAC, EARFCN, null, null, ALPHA_LONG, ALPHA_SHORT); ciA = new CellIdentityLte( 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)); ciA = new CellIdentityLte(CI, PCI, TAC, EARFCN, MCC_STR, null, ALPHA_LONG, ALPHA_SHORT); ciB = new CellIdentityLte(CI, PCI, TAC, EARFCN, null, null, ALPHA_LONG, ALPHA_SHORT); ciA = new CellIdentityLte( 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)); } Loading @@ -165,7 +175,7 @@ public class CellIdentityLteTest extends AndroidTestCase { @SmallTest public void testParcel() { 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); Parcel p = Parcel.obtain(); Loading @@ -177,8 +187,9 @@ public class CellIdentityLteTest extends AndroidTestCase { } @SmallTest public void testParcelWithUnknowMccMnc() { CellIdentityLte ci = new CellIdentityLte(CI, PCI, TAC, EARFCN, null, null, null, null); public void testParcelWithUnknownMccMnc() { CellIdentityLte ci = new CellIdentityLte( CI, PCI, TAC, EARFCN, BANDWIDTH, null, null, null, null); Parcel p = Parcel.obtain(); p.writeInt(CellIdentity.TYPE_LTE); Loading @@ -188,6 +199,7 @@ public class CellIdentityLteTest extends AndroidTestCase { p.writeInt(PCI); p.writeInt(TAC); p.writeInt(EARFCN); p.writeInt(BANDWIDTH); p.setDataPosition(0); CellIdentityLte newCi = CellIdentityLte.CREATOR.createFromParcel(p); Loading @@ -198,7 +210,8 @@ public class CellIdentityLteTest extends AndroidTestCase { public void testParcelWithInvalidMccMnc() { final String invalidMcc = "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(); p.writeInt(CellIdentity.TYPE_LTE); Loading @@ -208,6 +221,7 @@ public class CellIdentityLteTest extends AndroidTestCase { p.writeInt(PCI); p.writeInt(TAC); p.writeInt(EARFCN); p.writeInt(BANDWIDTH); p.setDataPosition(0); CellIdentityLte newCi = CellIdentityLte.CREATOR.createFromParcel(p); Loading
tests/telephonytests/src/com/android/internal/telephony/CellIdentityTest.java +13 −8 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ public class CellIdentityTest extends AndroidTestCase { private static final int TAC = 65535; // Absolute RF Channel Number ranges from 0 to 262140. private static final int EARFCN = 262140; private static final int BANDWIDTH = 5000; // kHz private static final int MCC = 120; private static final int MNC = 260; private static final String MCC_STR = "120"; Loading @@ -54,27 +55,31 @@ public class CellIdentityTest extends AndroidTestCase { @SmallTest public void testEquals() { 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( 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)); ciA = new CellIdentityLte(CI, PCI, TAC, EARFCN, null, null, ALPHA_LONG, ALPHA_SHORT); ciB = new CellIdentityLte(CI, PCI, TAC, EARFCN, null, null, ALPHA_LONG, ALPHA_SHORT); ciA = new CellIdentityLte(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)); ciA = new CellIdentityLte(CI, PCI, TAC, EARFCN, MCC_STR, null, ALPHA_LONG, ALPHA_SHORT); ciB = new CellIdentityLte(CI, PCI, TAC, EARFCN, null, null, ALPHA_LONG, ALPHA_SHORT); ciA = new CellIdentityLte(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)); } @SmallTest public void testParcel() { CellIdentity ci = new CellIdentityLte(CI, PCI, TAC, EARFCN, MCC_STR, MNC_STR, ALPHA_LONG, ALPHA_SHORT); CellIdentity ci = new CellIdentityLte(CI, PCI, TAC, EARFCN, BANDWIDTH, MCC_STR, MNC_STR, ALPHA_LONG, ALPHA_SHORT); Parcel p = Parcel.obtain(); ci.writeToParcel(p, 0); Loading
tests/telephonytests/src/com/android/internal/telephony/RILTest.java +27 −6 Original line number Diff line number Diff line Loading @@ -179,6 +179,7 @@ public class RILTest extends TelephonyTest { private static final int CQI = 2147483647; private static final int DBM = 74; private static final int EARFCN = 262140; private static final int BANDWIDTH = 5000; private static final int ECIO = 124; private static final String EMPTY_ALPHA_LONG = ""; private static final String EMPTY_ALPHA_SHORT = ""; Loading Loading @@ -1086,12 +1087,13 @@ public class RILTest extends TelephonyTest { expected.setRegistered(false); expected.setTimeStamp(TIMESTAMP); expected.setTimeStampType(RIL_TIMESTAMP_TYPE_OEM_RIL); CellIdentityLte cil = new CellIdentityLte( CI, PCI, TAC, EARFCN, MCC_STR, MNC_STR, EMPTY_ALPHA_LONG, EMPTY_ALPHA_SHORT); CellIdentityLte cil = new CellIdentityLte(CI, PCI, TAC, EARFCN, Integer.MAX_VALUE, MCC_STR, MNC_STR, EMPTY_ALPHA_LONG, EMPTY_ALPHA_SHORT); CellSignalStrengthLte css = new CellSignalStrengthLte( SIGNAL_STRENGTH, -RSRP, -RSRQ, RSSNR, CQI, TIME_ADVANCE); expected.setCellIdentity(cil); expected.setCellSignalStrength(css); expected.setCellConnectionStatus(CellInfo.CONNECTION_UNKNOWN); assertEquals(expected, cellInfoLte); } Loading Loading @@ -1132,6 +1134,7 @@ public class RILTest extends TelephonyTest { cs.initialize(SIGNAL_STRENGTH, BIT_ERROR_RATE, TIME_ADVANCE); expected.setCellIdentity(ci); expected.setCellSignalStrength(cs); expected.setCellConnectionStatus(CellInfo.CONNECTION_UNKNOWN); assertEquals(expected, cellInfoGsm); } Loading Loading @@ -1170,6 +1173,7 @@ public class RILTest extends TelephonyTest { CellSignalStrengthWcdma cs = new CellSignalStrengthWcdma(SIGNAL_STRENGTH, BIT_ERROR_RATE); expected.setCellIdentity(ci); expected.setCellSignalStrength(cs); expected.setCellConnectionStatus(CellInfo.CONNECTION_UNKNOWN); assertEquals(expected, cellInfoWcdma); } Loading Loading @@ -1212,6 +1216,7 @@ public class RILTest extends TelephonyTest { -DBM, -ECIO, -DBM, -ECIO, SIGNAL_NOICE_RATIO); expected.setCellIdentity(ci); expected.setCellSignalStrength(cs); expected.setCellConnectionStatus(CellInfo.CONNECTION_UNKNOWN); assertEquals(expected, cellInfoCdma); } Loading @@ -1226,11 +1231,12 @@ public class RILTest extends TelephonyTest { expected.setTimeStamp(TIMESTAMP); expected.setTimeStampType(RIL_TIMESTAMP_TYPE_OEM_RIL); 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( SIGNAL_STRENGTH, -RSRP, -RSRQ, RSSNR, CQI, TIME_ADVANCE); expected.setCellIdentity(cil); expected.setCellSignalStrength(css); expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE); assertEquals(expected, cellInfoLte); } Loading @@ -1245,12 +1251,13 @@ public class RILTest extends TelephonyTest { expected.setRegistered(false); expected.setTimeStamp(TIMESTAMP); expected.setTimeStampType(RIL_TIMESTAMP_TYPE_OEM_RIL); CellIdentityLte cil = new CellIdentityLte( CI, PCI, TAC, EARFCN, MCC_STR, MNC_STR, EMPTY_ALPHA_LONG, EMPTY_ALPHA_SHORT); CellIdentityLte cil = new CellIdentityLte(CI, PCI, TAC, EARFCN, BANDWIDTH, MCC_STR, MNC_STR, EMPTY_ALPHA_LONG, EMPTY_ALPHA_SHORT); CellSignalStrengthLte css = new CellSignalStrengthLte( SIGNAL_STRENGTH, -RSRP, -RSRQ, RSSNR, CQI, TIME_ADVANCE); expected.setCellIdentity(cil); expected.setCellSignalStrength(css); expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE); assertEquals(expected, cellInfoLte); } Loading @@ -1268,11 +1275,12 @@ public class RILTest extends TelephonyTest { expected.setTimeStamp(TIMESTAMP); expected.setTimeStampType(RIL_TIMESTAMP_TYPE_OEM_RIL); 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( SIGNAL_STRENGTH, -RSRP, -RSRQ, RSSNR, CQI, TIME_ADVANCE); expected.setCellIdentity(cil); expected.setCellSignalStrength(css); expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE); assertEquals(expected, cellInfoLte); } Loading @@ -1292,6 +1300,7 @@ public class RILTest extends TelephonyTest { cs.initialize(SIGNAL_STRENGTH, BIT_ERROR_RATE, TIME_ADVANCE); expected.setCellIdentity(ci); expected.setCellSignalStrength(cs); expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE); assertEquals(expected, cellInfoGsm); } Loading @@ -1312,6 +1321,7 @@ public class RILTest extends TelephonyTest { cs.initialize(SIGNAL_STRENGTH, BIT_ERROR_RATE, TIME_ADVANCE); expected.setCellIdentity(ci); expected.setCellSignalStrength(cs); expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE); assertEquals(expected, cellInfoGsm); } Loading @@ -1333,6 +1343,7 @@ public class RILTest extends TelephonyTest { CellSignalStrengthGsm cs = new CellSignalStrengthGsm(); cs.initialize(SIGNAL_STRENGTH, BIT_ERROR_RATE, TIME_ADVANCE); expected.setCellIdentity(ci); expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE); expected.setCellSignalStrength(cs); assertEquals(expected, cellInfoGsm); } Loading @@ -1353,6 +1364,7 @@ public class RILTest extends TelephonyTest { CellSignalStrengthWcdma cs = new CellSignalStrengthWcdma(SIGNAL_STRENGTH, BIT_ERROR_RATE); expected.setCellIdentity(ci); expected.setCellSignalStrength(cs); expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE); assertEquals(expected, cellInfoWcdma); } Loading @@ -1372,6 +1384,7 @@ public class RILTest extends TelephonyTest { CellSignalStrengthWcdma cs = new CellSignalStrengthWcdma(SIGNAL_STRENGTH, BIT_ERROR_RATE); expected.setCellIdentity(ci); expected.setCellSignalStrength(cs); expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE); assertEquals(expected, cellInfoWcdma); } Loading @@ -1393,6 +1406,7 @@ public class RILTest extends TelephonyTest { CellSignalStrengthWcdma cs = new CellSignalStrengthWcdma(SIGNAL_STRENGTH, BIT_ERROR_RATE); expected.setCellIdentity(ci); expected.setCellSignalStrength(cs); expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE); assertEquals(expected, cellInfoWcdma); } Loading @@ -1413,6 +1427,7 @@ public class RILTest extends TelephonyTest { -DBM, -ECIO, -DBM, -ECIO, SIGNAL_NOICE_RATIO); expected.setCellIdentity(ci); expected.setCellSignalStrength(cs); expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE); assertEquals(expected, cellInfoCdma); } Loading @@ -1433,6 +1448,7 @@ public class RILTest extends TelephonyTest { -DBM, -ECIO, -DBM, -ECIO, SIGNAL_NOICE_RATIO); expected.setCellIdentity(ci); expected.setCellSignalStrength(cs); expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE); assertEquals(expected, cellInfoCdma); } Loading @@ -1443,6 +1459,7 @@ public class RILTest extends TelephonyTest { lte.cellIdentityLte.base.pci = PCI; lte.cellIdentityLte.base.tac = TAC; lte.cellIdentityLte.base.earfcn = EARFCN; lte.cellIdentityLte.bandwidth = BANDWIDTH; lte.cellIdentityLte.base.mcc = mcc; lte.cellIdentityLte.base.mnc = mnc; lte.cellIdentityLte.operatorNames.alphaLong = alphaLong; Loading @@ -1459,6 +1476,7 @@ public class RILTest extends TelephonyTest { record.timeStampType = RIL_TIMESTAMP_TYPE_OEM_RIL; record.timeStamp = TIMESTAMP; record.lte.add(lte); record.connectionStatus = 0; ArrayList<android.hardware.radio.V1_2.CellInfo> records = new ArrayList<android.hardware.radio.V1_2.CellInfo>(); records.add(record); Loading Loading @@ -1486,6 +1504,7 @@ public class RILTest extends TelephonyTest { record.timeStampType = RIL_TIMESTAMP_TYPE_OEM_RIL; record.timeStamp = TIMESTAMP; record.gsm.add(cellinfo); record.connectionStatus = 0; ArrayList<android.hardware.radio.V1_2.CellInfo> records = new ArrayList<android.hardware.radio.V1_2.CellInfo>(); records.add(record); Loading Loading @@ -1513,6 +1532,7 @@ public class RILTest extends TelephonyTest { record.timeStampType = RIL_TIMESTAMP_TYPE_OEM_RIL; record.timeStamp = TIMESTAMP; record.wcdma.add(cellinfo); record.connectionStatus = 0; ArrayList<android.hardware.radio.V1_2.CellInfo> records = new ArrayList<android.hardware.radio.V1_2.CellInfo>(); records.add(record); Loading Loading @@ -1541,6 +1561,7 @@ public class RILTest extends TelephonyTest { record.timeStampType = RIL_TIMESTAMP_TYPE_OEM_RIL; record.timeStamp = TIMESTAMP; record.cdma.add(cellinfo); record.connectionStatus = 0; ArrayList<android.hardware.radio.V1_2.CellInfo> records = new ArrayList<android.hardware.radio.V1_2.CellInfo>(); records.add(record); Loading