Loading src/java/com/android/internal/telephony/RIL.java +4 −15 Original line number Original line Diff line number Diff line Loading @@ -69,7 +69,9 @@ import android.os.WorkSource; import android.service.carrier.CarrierIdentifier; import android.service.carrier.CarrierIdentifier; import android.telephony.AccessNetworkConstants.AccessNetworkType; import android.telephony.AccessNetworkConstants.AccessNetworkType; import android.telephony.CellIdentity; import android.telephony.CellIdentity; import android.telephony.CellIdentityCdma; import android.telephony.CellInfo; import android.telephony.CellInfo; import android.telephony.CellSignalStrengthCdma; import android.telephony.ClientRequestStats; import android.telephony.ClientRequestStats; import android.telephony.ImsiEncryptionInfo; import android.telephony.ImsiEncryptionInfo; import android.telephony.ModemActivityInfo; import android.telephony.ModemActivityInfo; Loading Loading @@ -5022,21 +5024,8 @@ public class RIL extends BaseCommands implements CommandsInterface { private static void writeToParcelForCdma( private static void writeToParcelForCdma( Parcel p, int ni, int si, int bsi, int lon, int lat, String al, String as, Parcel p, int ni, int si, int bsi, int lon, int lat, String al, String as, int dbm, int ecio, int eDbm, int eEcio, int eSnr) { int dbm, int ecio, int eDbm, int eEcio, int eSnr) { p.writeInt(CellIdentity.TYPE_CDMA); new CellIdentityCdma(ni, si, bsi, lon, lat, al, as).writeToParcel(p, 0); p.writeString(null); new CellSignalStrengthCdma(dbm, ecio, eDbm, eEcio, eSnr).writeToParcel(p, 0); p.writeString(null); p.writeInt(ni); p.writeInt(si); p.writeInt(bsi); p.writeInt(lon); p.writeInt(lat); p.writeString(al); p.writeString(as); p.writeInt(dbm); p.writeInt(ecio); p.writeInt(eDbm); p.writeInt(eEcio); p.writeInt(eSnr); } } private static void writeToParcelForLte( private static void writeToParcelForLte( Loading tests/telephonytests/src/com/android/internal/telephony/CellIdentityCdmaTest.java +11 −0 Original line number Original line Diff line number Diff line Loading @@ -48,10 +48,21 @@ public class CellIdentityCdmaTest extends AndroidTestCase { assertEquals(NETWORK_ID, ci.getNetworkId()); assertEquals(NETWORK_ID, ci.getNetworkId()); assertEquals(LATITUDE, ci.getLatitude()); assertEquals(LATITUDE, ci.getLatitude()); assertEquals(LONGITUDE, ci.getLongitude()); assertEquals(ALPHA_LONG, ci.getOperatorAlphaLong()); assertEquals(ALPHA_LONG, ci.getOperatorAlphaLong()); assertEquals(ALPHA_SHORT, ci.getOperatorAlphaShort()); assertEquals(ALPHA_SHORT, ci.getOperatorAlphaShort()); } } @SmallTest public void testNullIsland() { CellIdentityCdma ci = new CellIdentityCdma(NETWORK_ID, SYSTEM_ID, BASESTATION_ID, -1, 0, ALPHA_LONG, ALPHA_SHORT); assertEquals(Integer.MAX_VALUE, ci.getLatitude()); assertEquals(Integer.MAX_VALUE, ci.getLongitude()); } @SmallTest @SmallTest public void testEquals() { public void testEquals() { CellIdentityCdma ciA = CellIdentityCdma ciA = Loading tests/telephonytests/src/com/android/internal/telephony/CellSignalStrengthCdmaTest.java 0 → 100644 +92 −0 Original line number Original line Diff line number Diff line /* * Copyright (C) 2018 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.internal.telephony; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import android.os.Parcel; import android.telephony.CellSignalStrengthCdma; import android.test.AndroidTestCase; import android.test.suitebuilder.annotation.SmallTest; /** Unit tests for {@link CellSignalStrengthCdma}. */ public class CellSignalStrengthCdmaTest extends AndroidTestCase { private static final int CDMA_DBM = 74; private static final int CDMA_ECIO = 124; private static final int EVDO_DBM = 23; private static final int EVDO_ECIO = 108; private static final int EVDO_SNR = 7; @SmallTest public void testConstructor() { CellSignalStrengthCdma css = new CellSignalStrengthCdma( CDMA_DBM, CDMA_ECIO, EVDO_DBM, EVDO_ECIO, EVDO_SNR); assertEquals(-CDMA_DBM, css.getCdmaDbm()); assertEquals(-CDMA_ECIO, css.getCdmaEcio()); assertEquals(-EVDO_DBM, css.getEvdoDbm()); assertEquals(-EVDO_ECIO, css.getEvdoEcio()); assertEquals(EVDO_SNR, css.getEvdoSnr()); } @SmallTest public void testInvalidConstructor() { CellSignalStrengthCdma css = new CellSignalStrengthCdma(-1, -1, -1, -1, -1); assertEquals(Integer.MAX_VALUE, css.getCdmaDbm()); assertEquals(Integer.MAX_VALUE, css.getCdmaEcio()); assertEquals(Integer.MAX_VALUE, css.getEvdoDbm()); assertEquals(Integer.MAX_VALUE, css.getEvdoEcio()); assertEquals(Integer.MAX_VALUE, css.getEvdoSnr()); } @SmallTest public void testDefaultConstructor() { CellSignalStrengthCdma css = new CellSignalStrengthCdma(); assertEquals(Integer.MAX_VALUE, css.getCdmaDbm()); assertEquals(Integer.MAX_VALUE, css.getCdmaEcio()); assertEquals(Integer.MAX_VALUE, css.getEvdoDbm()); assertEquals(Integer.MAX_VALUE, css.getEvdoEcio()); assertEquals(Integer.MAX_VALUE, css.getEvdoSnr()); } @SmallTest public void testEquals() { assertTrue(new CellSignalStrengthCdma( CDMA_DBM, CDMA_ECIO, EVDO_DBM, EVDO_ECIO, EVDO_SNR).equals( new CellSignalStrengthCdma( CDMA_DBM, CDMA_ECIO, EVDO_DBM, EVDO_ECIO, EVDO_SNR))); assertFalse(new CellSignalStrengthCdma( CDMA_DBM, CDMA_ECIO, EVDO_DBM, EVDO_ECIO, EVDO_SNR).equals( new CellSignalStrengthCdma(CDMA_DBM, CDMA_ECIO, -1, EVDO_ECIO, EVDO_SNR))); } @SmallTest public void testParcel() { CellSignalStrengthCdma css = new CellSignalStrengthCdma( CDMA_DBM, CDMA_ECIO, EVDO_DBM, EVDO_ECIO, EVDO_SNR); Parcel p = Parcel.obtain(); css.writeToParcel(p, 0); p.setDataPosition(0); CellSignalStrengthCdma newCss = CellSignalStrengthCdma.CREATOR.createFromParcel(p); assertEquals(css, newCss); } } tests/telephonytests/src/com/android/internal/telephony/RILTest.java +7 −7 Original line number Original line Diff line number Diff line Loading @@ -188,7 +188,7 @@ public class RILTest extends TelephonyTest { private static final int RSSNR = 2147483647; private static final int RSSNR = 2147483647; private static final int RSRP = 96; private static final int RSRP = 96; private static final int RSRQ = 10; private static final int RSRQ = 10; private static final int SIGNAL_NOICE_RATIO = 6; private static final int SIGNAL_NOISE_RATIO = 6; private static final int SIGNAL_STRENGTH = 24; private static final int SIGNAL_STRENGTH = 24; private static final int SYSTEM_ID = 65533; private static final int SYSTEM_ID = 65533; private static final int TAC = 65535; private static final int TAC = 65535; Loading Loading @@ -1159,7 +1159,7 @@ public class RILTest extends TelephonyTest { cellinfo.signalStrengthCdma.ecio = ECIO; cellinfo.signalStrengthCdma.ecio = ECIO; cellinfo.signalStrengthEvdo.dbm = DBM; cellinfo.signalStrengthEvdo.dbm = DBM; cellinfo.signalStrengthEvdo.ecio = ECIO; cellinfo.signalStrengthEvdo.ecio = ECIO; cellinfo.signalStrengthEvdo.signalNoiseRatio = SIGNAL_NOICE_RATIO; cellinfo.signalStrengthEvdo.signalNoiseRatio = SIGNAL_NOISE_RATIO; android.hardware.radio.V1_0.CellInfo record = new android.hardware.radio.V1_0.CellInfo(); android.hardware.radio.V1_0.CellInfo record = new android.hardware.radio.V1_0.CellInfo(); record.cellInfoType = TYPE_CDMA; record.cellInfoType = TYPE_CDMA; record.registered = false; record.registered = false; Loading @@ -1182,7 +1182,7 @@ public class RILTest extends TelephonyTest { NETWORK_ID, SYSTEM_ID, BASESTATION_ID, LONGITUDE, LATITUDE, NETWORK_ID, SYSTEM_ID, BASESTATION_ID, LONGITUDE, LATITUDE, EMPTY_ALPHA_LONG, EMPTY_ALPHA_SHORT); EMPTY_ALPHA_LONG, EMPTY_ALPHA_SHORT); CellSignalStrengthCdma cs = new CellSignalStrengthCdma( CellSignalStrengthCdma cs = new CellSignalStrengthCdma( -DBM, -ECIO, -DBM, -ECIO, SIGNAL_NOICE_RATIO); DBM, ECIO, DBM, ECIO, SIGNAL_NOISE_RATIO); expected.setCellIdentity(ci); expected.setCellIdentity(ci); expected.setCellSignalStrength(cs); expected.setCellSignalStrength(cs); expected.setCellConnectionStatus(CellInfo.CONNECTION_UNKNOWN); expected.setCellConnectionStatus(CellInfo.CONNECTION_UNKNOWN); Loading Loading @@ -1393,7 +1393,7 @@ public class RILTest extends TelephonyTest { NETWORK_ID, SYSTEM_ID, BASESTATION_ID, LONGITUDE, LATITUDE, NETWORK_ID, SYSTEM_ID, BASESTATION_ID, LONGITUDE, LATITUDE, ALPHA_LONG, ALPHA_SHORT); ALPHA_LONG, ALPHA_SHORT); CellSignalStrengthCdma cs = new CellSignalStrengthCdma( CellSignalStrengthCdma cs = new CellSignalStrengthCdma( -DBM, -ECIO, -DBM, -ECIO, SIGNAL_NOICE_RATIO); DBM, ECIO, DBM, ECIO, SIGNAL_NOISE_RATIO); expected.setCellIdentity(ci); expected.setCellIdentity(ci); expected.setCellSignalStrength(cs); expected.setCellSignalStrength(cs); expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE); expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE); Loading @@ -1401,7 +1401,7 @@ public class RILTest extends TelephonyTest { } } @Test @Test public void testConvertHalCellInfoList_1_2ForCdmaWithEmptyOperatorInfd() throws Exception { public void testConvertHalCellInfoList_1_2ForCdmaWithEmptyOperatorInfo() throws Exception { ArrayList<CellInfo> ret = getCellInfoListForCdma(EMPTY_ALPHA_LONG, EMPTY_ALPHA_SHORT); ArrayList<CellInfo> ret = getCellInfoListForCdma(EMPTY_ALPHA_LONG, EMPTY_ALPHA_SHORT); assertEquals(1, ret.size()); assertEquals(1, ret.size()); Loading @@ -1414,7 +1414,7 @@ public class RILTest extends TelephonyTest { NETWORK_ID, SYSTEM_ID, BASESTATION_ID, LONGITUDE, LATITUDE, NETWORK_ID, SYSTEM_ID, BASESTATION_ID, LONGITUDE, LATITUDE, EMPTY_ALPHA_LONG, EMPTY_ALPHA_SHORT); EMPTY_ALPHA_LONG, EMPTY_ALPHA_SHORT); CellSignalStrengthCdma cs = new CellSignalStrengthCdma( CellSignalStrengthCdma cs = new CellSignalStrengthCdma( -DBM, -ECIO, -DBM, -ECIO, SIGNAL_NOICE_RATIO); DBM, ECIO, DBM, ECIO, SIGNAL_NOISE_RATIO); expected.setCellIdentity(ci); expected.setCellIdentity(ci); expected.setCellSignalStrength(cs); expected.setCellSignalStrength(cs); expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE); expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE); Loading Loading @@ -1525,7 +1525,7 @@ public class RILTest extends TelephonyTest { cellinfo.signalStrengthCdma.ecio = ECIO; cellinfo.signalStrengthCdma.ecio = ECIO; cellinfo.signalStrengthEvdo.dbm = DBM; cellinfo.signalStrengthEvdo.dbm = DBM; cellinfo.signalStrengthEvdo.ecio = ECIO; cellinfo.signalStrengthEvdo.ecio = ECIO; cellinfo.signalStrengthEvdo.signalNoiseRatio = SIGNAL_NOICE_RATIO; cellinfo.signalStrengthEvdo.signalNoiseRatio = SIGNAL_NOISE_RATIO; android.hardware.radio.V1_2.CellInfo record = new android.hardware.radio.V1_2.CellInfo(); android.hardware.radio.V1_2.CellInfo record = new android.hardware.radio.V1_2.CellInfo(); record.cellInfoType = TYPE_CDMA; record.cellInfoType = TYPE_CDMA; record.registered = false; record.registered = false; Loading Loading
src/java/com/android/internal/telephony/RIL.java +4 −15 Original line number Original line Diff line number Diff line Loading @@ -69,7 +69,9 @@ import android.os.WorkSource; import android.service.carrier.CarrierIdentifier; import android.service.carrier.CarrierIdentifier; import android.telephony.AccessNetworkConstants.AccessNetworkType; import android.telephony.AccessNetworkConstants.AccessNetworkType; import android.telephony.CellIdentity; import android.telephony.CellIdentity; import android.telephony.CellIdentityCdma; import android.telephony.CellInfo; import android.telephony.CellInfo; import android.telephony.CellSignalStrengthCdma; import android.telephony.ClientRequestStats; import android.telephony.ClientRequestStats; import android.telephony.ImsiEncryptionInfo; import android.telephony.ImsiEncryptionInfo; import android.telephony.ModemActivityInfo; import android.telephony.ModemActivityInfo; Loading Loading @@ -5022,21 +5024,8 @@ public class RIL extends BaseCommands implements CommandsInterface { private static void writeToParcelForCdma( private static void writeToParcelForCdma( Parcel p, int ni, int si, int bsi, int lon, int lat, String al, String as, Parcel p, int ni, int si, int bsi, int lon, int lat, String al, String as, int dbm, int ecio, int eDbm, int eEcio, int eSnr) { int dbm, int ecio, int eDbm, int eEcio, int eSnr) { p.writeInt(CellIdentity.TYPE_CDMA); new CellIdentityCdma(ni, si, bsi, lon, lat, al, as).writeToParcel(p, 0); p.writeString(null); new CellSignalStrengthCdma(dbm, ecio, eDbm, eEcio, eSnr).writeToParcel(p, 0); p.writeString(null); p.writeInt(ni); p.writeInt(si); p.writeInt(bsi); p.writeInt(lon); p.writeInt(lat); p.writeString(al); p.writeString(as); p.writeInt(dbm); p.writeInt(ecio); p.writeInt(eDbm); p.writeInt(eEcio); p.writeInt(eSnr); } } private static void writeToParcelForLte( private static void writeToParcelForLte( Loading
tests/telephonytests/src/com/android/internal/telephony/CellIdentityCdmaTest.java +11 −0 Original line number Original line Diff line number Diff line Loading @@ -48,10 +48,21 @@ public class CellIdentityCdmaTest extends AndroidTestCase { assertEquals(NETWORK_ID, ci.getNetworkId()); assertEquals(NETWORK_ID, ci.getNetworkId()); assertEquals(LATITUDE, ci.getLatitude()); assertEquals(LATITUDE, ci.getLatitude()); assertEquals(LONGITUDE, ci.getLongitude()); assertEquals(ALPHA_LONG, ci.getOperatorAlphaLong()); assertEquals(ALPHA_LONG, ci.getOperatorAlphaLong()); assertEquals(ALPHA_SHORT, ci.getOperatorAlphaShort()); assertEquals(ALPHA_SHORT, ci.getOperatorAlphaShort()); } } @SmallTest public void testNullIsland() { CellIdentityCdma ci = new CellIdentityCdma(NETWORK_ID, SYSTEM_ID, BASESTATION_ID, -1, 0, ALPHA_LONG, ALPHA_SHORT); assertEquals(Integer.MAX_VALUE, ci.getLatitude()); assertEquals(Integer.MAX_VALUE, ci.getLongitude()); } @SmallTest @SmallTest public void testEquals() { public void testEquals() { CellIdentityCdma ciA = CellIdentityCdma ciA = Loading
tests/telephonytests/src/com/android/internal/telephony/CellSignalStrengthCdmaTest.java 0 → 100644 +92 −0 Original line number Original line Diff line number Diff line /* * Copyright (C) 2018 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.internal.telephony; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import android.os.Parcel; import android.telephony.CellSignalStrengthCdma; import android.test.AndroidTestCase; import android.test.suitebuilder.annotation.SmallTest; /** Unit tests for {@link CellSignalStrengthCdma}. */ public class CellSignalStrengthCdmaTest extends AndroidTestCase { private static final int CDMA_DBM = 74; private static final int CDMA_ECIO = 124; private static final int EVDO_DBM = 23; private static final int EVDO_ECIO = 108; private static final int EVDO_SNR = 7; @SmallTest public void testConstructor() { CellSignalStrengthCdma css = new CellSignalStrengthCdma( CDMA_DBM, CDMA_ECIO, EVDO_DBM, EVDO_ECIO, EVDO_SNR); assertEquals(-CDMA_DBM, css.getCdmaDbm()); assertEquals(-CDMA_ECIO, css.getCdmaEcio()); assertEquals(-EVDO_DBM, css.getEvdoDbm()); assertEquals(-EVDO_ECIO, css.getEvdoEcio()); assertEquals(EVDO_SNR, css.getEvdoSnr()); } @SmallTest public void testInvalidConstructor() { CellSignalStrengthCdma css = new CellSignalStrengthCdma(-1, -1, -1, -1, -1); assertEquals(Integer.MAX_VALUE, css.getCdmaDbm()); assertEquals(Integer.MAX_VALUE, css.getCdmaEcio()); assertEquals(Integer.MAX_VALUE, css.getEvdoDbm()); assertEquals(Integer.MAX_VALUE, css.getEvdoEcio()); assertEquals(Integer.MAX_VALUE, css.getEvdoSnr()); } @SmallTest public void testDefaultConstructor() { CellSignalStrengthCdma css = new CellSignalStrengthCdma(); assertEquals(Integer.MAX_VALUE, css.getCdmaDbm()); assertEquals(Integer.MAX_VALUE, css.getCdmaEcio()); assertEquals(Integer.MAX_VALUE, css.getEvdoDbm()); assertEquals(Integer.MAX_VALUE, css.getEvdoEcio()); assertEquals(Integer.MAX_VALUE, css.getEvdoSnr()); } @SmallTest public void testEquals() { assertTrue(new CellSignalStrengthCdma( CDMA_DBM, CDMA_ECIO, EVDO_DBM, EVDO_ECIO, EVDO_SNR).equals( new CellSignalStrengthCdma( CDMA_DBM, CDMA_ECIO, EVDO_DBM, EVDO_ECIO, EVDO_SNR))); assertFalse(new CellSignalStrengthCdma( CDMA_DBM, CDMA_ECIO, EVDO_DBM, EVDO_ECIO, EVDO_SNR).equals( new CellSignalStrengthCdma(CDMA_DBM, CDMA_ECIO, -1, EVDO_ECIO, EVDO_SNR))); } @SmallTest public void testParcel() { CellSignalStrengthCdma css = new CellSignalStrengthCdma( CDMA_DBM, CDMA_ECIO, EVDO_DBM, EVDO_ECIO, EVDO_SNR); Parcel p = Parcel.obtain(); css.writeToParcel(p, 0); p.setDataPosition(0); CellSignalStrengthCdma newCss = CellSignalStrengthCdma.CREATOR.createFromParcel(p); assertEquals(css, newCss); } }
tests/telephonytests/src/com/android/internal/telephony/RILTest.java +7 −7 Original line number Original line Diff line number Diff line Loading @@ -188,7 +188,7 @@ public class RILTest extends TelephonyTest { private static final int RSSNR = 2147483647; private static final int RSSNR = 2147483647; private static final int RSRP = 96; private static final int RSRP = 96; private static final int RSRQ = 10; private static final int RSRQ = 10; private static final int SIGNAL_NOICE_RATIO = 6; private static final int SIGNAL_NOISE_RATIO = 6; private static final int SIGNAL_STRENGTH = 24; private static final int SIGNAL_STRENGTH = 24; private static final int SYSTEM_ID = 65533; private static final int SYSTEM_ID = 65533; private static final int TAC = 65535; private static final int TAC = 65535; Loading Loading @@ -1159,7 +1159,7 @@ public class RILTest extends TelephonyTest { cellinfo.signalStrengthCdma.ecio = ECIO; cellinfo.signalStrengthCdma.ecio = ECIO; cellinfo.signalStrengthEvdo.dbm = DBM; cellinfo.signalStrengthEvdo.dbm = DBM; cellinfo.signalStrengthEvdo.ecio = ECIO; cellinfo.signalStrengthEvdo.ecio = ECIO; cellinfo.signalStrengthEvdo.signalNoiseRatio = SIGNAL_NOICE_RATIO; cellinfo.signalStrengthEvdo.signalNoiseRatio = SIGNAL_NOISE_RATIO; android.hardware.radio.V1_0.CellInfo record = new android.hardware.radio.V1_0.CellInfo(); android.hardware.radio.V1_0.CellInfo record = new android.hardware.radio.V1_0.CellInfo(); record.cellInfoType = TYPE_CDMA; record.cellInfoType = TYPE_CDMA; record.registered = false; record.registered = false; Loading @@ -1182,7 +1182,7 @@ public class RILTest extends TelephonyTest { NETWORK_ID, SYSTEM_ID, BASESTATION_ID, LONGITUDE, LATITUDE, NETWORK_ID, SYSTEM_ID, BASESTATION_ID, LONGITUDE, LATITUDE, EMPTY_ALPHA_LONG, EMPTY_ALPHA_SHORT); EMPTY_ALPHA_LONG, EMPTY_ALPHA_SHORT); CellSignalStrengthCdma cs = new CellSignalStrengthCdma( CellSignalStrengthCdma cs = new CellSignalStrengthCdma( -DBM, -ECIO, -DBM, -ECIO, SIGNAL_NOICE_RATIO); DBM, ECIO, DBM, ECIO, SIGNAL_NOISE_RATIO); expected.setCellIdentity(ci); expected.setCellIdentity(ci); expected.setCellSignalStrength(cs); expected.setCellSignalStrength(cs); expected.setCellConnectionStatus(CellInfo.CONNECTION_UNKNOWN); expected.setCellConnectionStatus(CellInfo.CONNECTION_UNKNOWN); Loading Loading @@ -1393,7 +1393,7 @@ public class RILTest extends TelephonyTest { NETWORK_ID, SYSTEM_ID, BASESTATION_ID, LONGITUDE, LATITUDE, NETWORK_ID, SYSTEM_ID, BASESTATION_ID, LONGITUDE, LATITUDE, ALPHA_LONG, ALPHA_SHORT); ALPHA_LONG, ALPHA_SHORT); CellSignalStrengthCdma cs = new CellSignalStrengthCdma( CellSignalStrengthCdma cs = new CellSignalStrengthCdma( -DBM, -ECIO, -DBM, -ECIO, SIGNAL_NOICE_RATIO); DBM, ECIO, DBM, ECIO, SIGNAL_NOISE_RATIO); expected.setCellIdentity(ci); expected.setCellIdentity(ci); expected.setCellSignalStrength(cs); expected.setCellSignalStrength(cs); expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE); expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE); Loading @@ -1401,7 +1401,7 @@ public class RILTest extends TelephonyTest { } } @Test @Test public void testConvertHalCellInfoList_1_2ForCdmaWithEmptyOperatorInfd() throws Exception { public void testConvertHalCellInfoList_1_2ForCdmaWithEmptyOperatorInfo() throws Exception { ArrayList<CellInfo> ret = getCellInfoListForCdma(EMPTY_ALPHA_LONG, EMPTY_ALPHA_SHORT); ArrayList<CellInfo> ret = getCellInfoListForCdma(EMPTY_ALPHA_LONG, EMPTY_ALPHA_SHORT); assertEquals(1, ret.size()); assertEquals(1, ret.size()); Loading @@ -1414,7 +1414,7 @@ public class RILTest extends TelephonyTest { NETWORK_ID, SYSTEM_ID, BASESTATION_ID, LONGITUDE, LATITUDE, NETWORK_ID, SYSTEM_ID, BASESTATION_ID, LONGITUDE, LATITUDE, EMPTY_ALPHA_LONG, EMPTY_ALPHA_SHORT); EMPTY_ALPHA_LONG, EMPTY_ALPHA_SHORT); CellSignalStrengthCdma cs = new CellSignalStrengthCdma( CellSignalStrengthCdma cs = new CellSignalStrengthCdma( -DBM, -ECIO, -DBM, -ECIO, SIGNAL_NOICE_RATIO); DBM, ECIO, DBM, ECIO, SIGNAL_NOISE_RATIO); expected.setCellIdentity(ci); expected.setCellIdentity(ci); expected.setCellSignalStrength(cs); expected.setCellSignalStrength(cs); expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE); expected.setCellConnectionStatus(CellInfo.CONNECTION_NONE); Loading Loading @@ -1525,7 +1525,7 @@ public class RILTest extends TelephonyTest { cellinfo.signalStrengthCdma.ecio = ECIO; cellinfo.signalStrengthCdma.ecio = ECIO; cellinfo.signalStrengthEvdo.dbm = DBM; cellinfo.signalStrengthEvdo.dbm = DBM; cellinfo.signalStrengthEvdo.ecio = ECIO; cellinfo.signalStrengthEvdo.ecio = ECIO; cellinfo.signalStrengthEvdo.signalNoiseRatio = SIGNAL_NOICE_RATIO; cellinfo.signalStrengthEvdo.signalNoiseRatio = SIGNAL_NOISE_RATIO; android.hardware.radio.V1_2.CellInfo record = new android.hardware.radio.V1_2.CellInfo(); android.hardware.radio.V1_2.CellInfo record = new android.hardware.radio.V1_2.CellInfo(); record.cellInfoType = TYPE_CDMA; record.cellInfoType = TYPE_CDMA; record.registered = false; record.registered = false; Loading