Merge "Lost the registered cellinfo item after the aggregation" into sc-v2-dev am: f0a3348ceb
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16262279 Change-Id: I38ea72134e9f0bf453d6125763e4d6af6f323487
This commit is contained in:
@@ -166,6 +166,19 @@ public class NetworkSelectSettingsTest {
|
||||
assertThat(mNetworkSelectSettings.doAggregation(testList)).isEqualTo(expected);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void doAggregation_hasDuplicateItemsDiffMccMncCase3_removeSamePlmnRatItem() {
|
||||
List<CellInfo> testList = Arrays.asList(
|
||||
createLteCellInfo(false, 123, "123", "232", "CarrierA"),
|
||||
createLteCellInfo(false, 124, "123", "233", "CarrierA"),
|
||||
createLteCellInfo(true, 125, "123", "234", "CarrierA"),
|
||||
createGsmCellInfo(false, 126, "456", "232", "CarrierA"));
|
||||
List<CellInfo> expected = Arrays.asList(
|
||||
createLteCellInfo(true, 125, "123", "234", "CarrierA"),
|
||||
createGsmCellInfo(false, 126, "456", "232", "CarrierA"));
|
||||
assertThat(mNetworkSelectSettings.doAggregation(testList)).isEqualTo(expected);
|
||||
}
|
||||
|
||||
private CellInfoLte createLteCellInfo(boolean registered, int cellId, String mcc, String mnc,
|
||||
String plmnName) {
|
||||
CellIdentityLte cil = new CellIdentityLte(
|
||||
|
Reference in New Issue
Block a user