Loading tests/telephonytests/src/com/android/internal/telephony/CellIdentityLteTest.java +3 −5 Original line number Diff line number Diff line Loading @@ -22,9 +22,7 @@ import android.telephony.CellInfo; import android.test.AndroidTestCase; import android.test.suitebuilder.annotation.SmallTest; import java.util.Arrays; import java.util.Collections; import java.util.List; /** Unit tests for {@link CellIdentityLte}. */ Loading @@ -38,7 +36,7 @@ public class CellIdentityLteTest 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 List<Integer> BANDS = Arrays.asList(1, 2); private static final int[] BANDS = new int[] {1, 2}; private static final int MCC = 120; private static final int MNC = 260; private static final int BANDWIDTH = 5000; // kHz Loading Loading @@ -218,7 +216,7 @@ public class CellIdentityLteTest extends AndroidTestCase { p.writeInt(PCI); p.writeInt(TAC); p.writeInt(EARFCN); p.writeList(BANDS); p.writeIntArray(BANDS); p.writeInt(BANDWIDTH); p.setDataPosition(0); Loading @@ -244,7 +242,7 @@ public class CellIdentityLteTest extends AndroidTestCase { p.writeInt(PCI); p.writeInt(TAC); p.writeInt(EARFCN); p.writeList(BANDS); p.writeIntArray(BANDS); p.writeInt(BANDWIDTH); p.setDataPosition(0); Loading tests/telephonytests/src/com/android/internal/telephony/CellIdentityNrTest.java +5 −5 Original line number Diff line number Diff line Loading @@ -26,10 +26,8 @@ import android.test.AndroidTestCase; import org.junit.Test; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; public class CellIdentityNrTest extends AndroidTestCase { private static final String MCC = "310"; Loading @@ -42,8 +40,10 @@ public class CellIdentityNrTest extends AndroidTestCase { private static final int PCI = 123; private static final int TAC = 32767; private static final int NCI = 8675309; private static final List<Integer> BANDS = new ArrayList<>(Arrays.asList( AccessNetworkConstants.NgranBands.BAND_1, AccessNetworkConstants.NgranBands.BAND_1)); private static final int[] BANDS = new int[] { AccessNetworkConstants.NgranBands.BAND_1, AccessNetworkConstants.NgranBands.BAND_2 }; @Test public void testGetMethod() { Loading Loading @@ -112,7 +112,7 @@ public class CellIdentityNrTest extends AndroidTestCase { assertThat(anotherCellIdentityNr.getNrarfcn()).isEqualTo(NRARFCN); assertThat(anotherCellIdentityNr.getPci()).isEqualTo(PCI); assertThat(anotherCellIdentityNr.getTac()).isEqualTo(TAC); assertThat(anotherCellIdentityNr.getBands()).isEqualTo(BANDS); assertTrue(Arrays.equals(anotherCellIdentityNr.getBands(), BANDS)); assertThat(anotherCellIdentityNr.getOperatorAlphaLong()).isEqualTo(ALPHAL); assertThat(anotherCellIdentityNr.getOperatorAlphaShort()).isEqualTo(ALPHAS); assertThat(anotherCellIdentityNr.getMccString()).isEqualTo(MCC); Loading tests/telephonytests/src/com/android/internal/telephony/CellIdentityTest.java +1 −3 Original line number Diff line number Diff line Loading @@ -25,9 +25,7 @@ import android.telephony.CellInfo; import android.test.AndroidTestCase; import android.test.suitebuilder.annotation.SmallTest; import java.util.Arrays; import java.util.Collections; import java.util.List; public class CellIdentityTest extends AndroidTestCase { Loading @@ -39,7 +37,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 List<Integer> BANDS = Arrays.asList(1, 2); private static final int[] BANDS = new int[] {1, 2}; private static final int BANDWIDTH = 5000; // kHz private static final int MCC = 120; private static final int MNC = 260; Loading tests/telephonytests/src/com/android/internal/telephony/NetworkScanResultTest.java +1 −2 Original line number Diff line number Diff line Loading @@ -32,7 +32,6 @@ import androidx.test.filters.SmallTest; import org.junit.Test; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; /** Unit tests for {@link NetworkScanResult}. */ Loading @@ -54,7 +53,7 @@ public class NetworkScanResultTest { infos.add(gsm); CellIdentityLte cil = new CellIdentityLte( 10, 5, 200, 2000, Arrays.asList(1, 2), 10000, "001", "01", "test", "tst", 10, 5, 200, 2000, new int[] {1, 2}, 10000, "001", "01", "test", "tst", Collections.emptyList(), null); CellSignalStrengthLte cssl = new CellSignalStrengthLte(15, 16, 17, 18, 19, 20); CellInfoLte lte = new CellInfoLte(); Loading tests/telephonytests/src/com/android/internal/telephony/RILTest.java +5 −5 Original line number Diff line number Diff line Loading @@ -1190,7 +1190,7 @@ public class RILTest extends TelephonyTest { CellInfoLte expected = new CellInfoLte(); expected.setRegistered(false); expected.setTimeStamp(TIMESTAMP); CellIdentityLte cil = new CellIdentityLte(CI, PCI, TAC, EARFCN, Collections.emptyList(), CellIdentityLte cil = new CellIdentityLte(CI, PCI, TAC, EARFCN, new int[] {}, Integer.MAX_VALUE, MCC_STR, MNC_STR, EMPTY_ALPHA_LONG, EMPTY_ALPHA_SHORT, Collections.emptyList(), null); CellSignalStrengthLte css = new CellSignalStrengthLte( Loading Loading @@ -1380,7 +1380,7 @@ public class RILTest extends TelephonyTest { expected.setRegistered(false); expected.setTimeStamp(TIMESTAMP); CellIdentityLte cil = new CellIdentityLte( CI, PCI, TAC, EARFCN, Collections.emptyList(), BANDWIDTH, MCC_STR, MNC_STR, CI, PCI, TAC, EARFCN, new int[] {}, BANDWIDTH, MCC_STR, MNC_STR, ALPHA_LONG, ALPHA_SHORT, Collections.emptyList(), null); CellSignalStrengthLte css = new CellSignalStrengthLte( RSSI, RSRP, RSRQ, RSSNR, CQI, TIMING_ADVANCE); Loading @@ -1401,7 +1401,7 @@ public class RILTest extends TelephonyTest { CellInfoLte expected = new CellInfoLte(); expected.setRegistered(false); expected.setTimeStamp(TIMESTAMP); CellIdentityLte cil = new CellIdentityLte(CI, PCI, TAC, EARFCN, Collections.emptyList(), CellIdentityLte cil = new CellIdentityLte(CI, PCI, TAC, EARFCN, new int[] {}, BANDWIDTH, MCC_STR, MNC_STR, EMPTY_ALPHA_LONG, EMPTY_ALPHA_SHORT, Collections.emptyList(), null); CellSignalStrengthLte css = new CellSignalStrengthLte( Loading @@ -1426,7 +1426,7 @@ public class RILTest extends TelephonyTest { expected.setRegistered(false); expected.setTimeStamp(TIMESTAMP); CellIdentityLte cil = new CellIdentityLte( CI, PCI, TAC, EARFCN, Collections.emptyList(), BANDWIDTH, null, null, ALPHA_LONG, CI, PCI, TAC, EARFCN, new int[] {}, BANDWIDTH, null, null, ALPHA_LONG, ALPHA_SHORT, Collections.emptyList(), null); CellSignalStrengthLte css = new CellSignalStrengthLte( RSSI, RSRP, RSRQ, RSSNR, CQI, TIMING_ADVANCE); Loading Loading @@ -1647,7 +1647,7 @@ public class RILTest extends TelephonyTest { (CellSignalStrengthNr) cellInfoNr.getCellSignalStrength(); CellIdentityNr expectedCellIdentity = new CellIdentityNr(PCI, TAC, NRARFCN, Collections.emptyList(), MCC_STR, MNC_STR, CI, ALPHA_LONG, ALPHA_SHORT, new int[] {}, MCC_STR, MNC_STR, CI, ALPHA_LONG, ALPHA_SHORT, Collections.emptyList()); CellSignalStrengthNr expectedSignalStrength = new CellSignalStrengthNr(-RSRP, -RSRQ, SIGNAL_NOISE_RATIO, -RSRP, -RSRQ, SIGNAL_NOISE_RATIO); Loading Loading
tests/telephonytests/src/com/android/internal/telephony/CellIdentityLteTest.java +3 −5 Original line number Diff line number Diff line Loading @@ -22,9 +22,7 @@ import android.telephony.CellInfo; import android.test.AndroidTestCase; import android.test.suitebuilder.annotation.SmallTest; import java.util.Arrays; import java.util.Collections; import java.util.List; /** Unit tests for {@link CellIdentityLte}. */ Loading @@ -38,7 +36,7 @@ public class CellIdentityLteTest 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 List<Integer> BANDS = Arrays.asList(1, 2); private static final int[] BANDS = new int[] {1, 2}; private static final int MCC = 120; private static final int MNC = 260; private static final int BANDWIDTH = 5000; // kHz Loading Loading @@ -218,7 +216,7 @@ public class CellIdentityLteTest extends AndroidTestCase { p.writeInt(PCI); p.writeInt(TAC); p.writeInt(EARFCN); p.writeList(BANDS); p.writeIntArray(BANDS); p.writeInt(BANDWIDTH); p.setDataPosition(0); Loading @@ -244,7 +242,7 @@ public class CellIdentityLteTest extends AndroidTestCase { p.writeInt(PCI); p.writeInt(TAC); p.writeInt(EARFCN); p.writeList(BANDS); p.writeIntArray(BANDS); p.writeInt(BANDWIDTH); p.setDataPosition(0); Loading
tests/telephonytests/src/com/android/internal/telephony/CellIdentityNrTest.java +5 −5 Original line number Diff line number Diff line Loading @@ -26,10 +26,8 @@ import android.test.AndroidTestCase; import org.junit.Test; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; public class CellIdentityNrTest extends AndroidTestCase { private static final String MCC = "310"; Loading @@ -42,8 +40,10 @@ public class CellIdentityNrTest extends AndroidTestCase { private static final int PCI = 123; private static final int TAC = 32767; private static final int NCI = 8675309; private static final List<Integer> BANDS = new ArrayList<>(Arrays.asList( AccessNetworkConstants.NgranBands.BAND_1, AccessNetworkConstants.NgranBands.BAND_1)); private static final int[] BANDS = new int[] { AccessNetworkConstants.NgranBands.BAND_1, AccessNetworkConstants.NgranBands.BAND_2 }; @Test public void testGetMethod() { Loading Loading @@ -112,7 +112,7 @@ public class CellIdentityNrTest extends AndroidTestCase { assertThat(anotherCellIdentityNr.getNrarfcn()).isEqualTo(NRARFCN); assertThat(anotherCellIdentityNr.getPci()).isEqualTo(PCI); assertThat(anotherCellIdentityNr.getTac()).isEqualTo(TAC); assertThat(anotherCellIdentityNr.getBands()).isEqualTo(BANDS); assertTrue(Arrays.equals(anotherCellIdentityNr.getBands(), BANDS)); assertThat(anotherCellIdentityNr.getOperatorAlphaLong()).isEqualTo(ALPHAL); assertThat(anotherCellIdentityNr.getOperatorAlphaShort()).isEqualTo(ALPHAS); assertThat(anotherCellIdentityNr.getMccString()).isEqualTo(MCC); Loading
tests/telephonytests/src/com/android/internal/telephony/CellIdentityTest.java +1 −3 Original line number Diff line number Diff line Loading @@ -25,9 +25,7 @@ import android.telephony.CellInfo; import android.test.AndroidTestCase; import android.test.suitebuilder.annotation.SmallTest; import java.util.Arrays; import java.util.Collections; import java.util.List; public class CellIdentityTest extends AndroidTestCase { Loading @@ -39,7 +37,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 List<Integer> BANDS = Arrays.asList(1, 2); private static final int[] BANDS = new int[] {1, 2}; private static final int BANDWIDTH = 5000; // kHz private static final int MCC = 120; private static final int MNC = 260; Loading
tests/telephonytests/src/com/android/internal/telephony/NetworkScanResultTest.java +1 −2 Original line number Diff line number Diff line Loading @@ -32,7 +32,6 @@ import androidx.test.filters.SmallTest; import org.junit.Test; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; /** Unit tests for {@link NetworkScanResult}. */ Loading @@ -54,7 +53,7 @@ public class NetworkScanResultTest { infos.add(gsm); CellIdentityLte cil = new CellIdentityLte( 10, 5, 200, 2000, Arrays.asList(1, 2), 10000, "001", "01", "test", "tst", 10, 5, 200, 2000, new int[] {1, 2}, 10000, "001", "01", "test", "tst", Collections.emptyList(), null); CellSignalStrengthLte cssl = new CellSignalStrengthLte(15, 16, 17, 18, 19, 20); CellInfoLte lte = new CellInfoLte(); Loading
tests/telephonytests/src/com/android/internal/telephony/RILTest.java +5 −5 Original line number Diff line number Diff line Loading @@ -1190,7 +1190,7 @@ public class RILTest extends TelephonyTest { CellInfoLte expected = new CellInfoLte(); expected.setRegistered(false); expected.setTimeStamp(TIMESTAMP); CellIdentityLte cil = new CellIdentityLte(CI, PCI, TAC, EARFCN, Collections.emptyList(), CellIdentityLte cil = new CellIdentityLte(CI, PCI, TAC, EARFCN, new int[] {}, Integer.MAX_VALUE, MCC_STR, MNC_STR, EMPTY_ALPHA_LONG, EMPTY_ALPHA_SHORT, Collections.emptyList(), null); CellSignalStrengthLte css = new CellSignalStrengthLte( Loading Loading @@ -1380,7 +1380,7 @@ public class RILTest extends TelephonyTest { expected.setRegistered(false); expected.setTimeStamp(TIMESTAMP); CellIdentityLte cil = new CellIdentityLte( CI, PCI, TAC, EARFCN, Collections.emptyList(), BANDWIDTH, MCC_STR, MNC_STR, CI, PCI, TAC, EARFCN, new int[] {}, BANDWIDTH, MCC_STR, MNC_STR, ALPHA_LONG, ALPHA_SHORT, Collections.emptyList(), null); CellSignalStrengthLte css = new CellSignalStrengthLte( RSSI, RSRP, RSRQ, RSSNR, CQI, TIMING_ADVANCE); Loading @@ -1401,7 +1401,7 @@ public class RILTest extends TelephonyTest { CellInfoLte expected = new CellInfoLte(); expected.setRegistered(false); expected.setTimeStamp(TIMESTAMP); CellIdentityLte cil = new CellIdentityLte(CI, PCI, TAC, EARFCN, Collections.emptyList(), CellIdentityLte cil = new CellIdentityLte(CI, PCI, TAC, EARFCN, new int[] {}, BANDWIDTH, MCC_STR, MNC_STR, EMPTY_ALPHA_LONG, EMPTY_ALPHA_SHORT, Collections.emptyList(), null); CellSignalStrengthLte css = new CellSignalStrengthLte( Loading @@ -1426,7 +1426,7 @@ public class RILTest extends TelephonyTest { expected.setRegistered(false); expected.setTimeStamp(TIMESTAMP); CellIdentityLte cil = new CellIdentityLte( CI, PCI, TAC, EARFCN, Collections.emptyList(), BANDWIDTH, null, null, ALPHA_LONG, CI, PCI, TAC, EARFCN, new int[] {}, BANDWIDTH, null, null, ALPHA_LONG, ALPHA_SHORT, Collections.emptyList(), null); CellSignalStrengthLte css = new CellSignalStrengthLte( RSSI, RSRP, RSRQ, RSSNR, CQI, TIMING_ADVANCE); Loading Loading @@ -1647,7 +1647,7 @@ public class RILTest extends TelephonyTest { (CellSignalStrengthNr) cellInfoNr.getCellSignalStrength(); CellIdentityNr expectedCellIdentity = new CellIdentityNr(PCI, TAC, NRARFCN, Collections.emptyList(), MCC_STR, MNC_STR, CI, ALPHA_LONG, ALPHA_SHORT, new int[] {}, MCC_STR, MNC_STR, CI, ALPHA_LONG, ALPHA_SHORT, Collections.emptyList()); CellSignalStrengthNr expectedSignalStrength = new CellSignalStrengthNr(-RSRP, -RSRQ, SIGNAL_NOISE_RATIO, -RSRP, -RSRQ, SIGNAL_NOISE_RATIO); Loading