From 8d735ccb43f65bad65894c70cd5caa9a376789db Mon Sep 17 00:00:00 2001 From: Fabian Kozynski Date: Mon, 29 Apr 2019 10:44:10 -0400 Subject: [PATCH] Remove STOPSHIP code from CarrierTextControllerTest This code was added when the path to obtain the Subscription List was changed to droidfood Telephony code. With the new behavior controlled by the variable CarrierTextController#mDisplayOpportunisticSubscriptionCarrierText we don't need the extra code. This change makes the tests more constrained Test: this test Fixes: 131433453 Change-Id: Iae911858f3271509e47de295773fe8d46ea195a8 --- .../keyguard/CarrierTextControllerTest.java | 34 +------------------ 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/packages/SystemUI/tests/src/com/android/keyguard/CarrierTextControllerTest.java b/packages/SystemUI/tests/src/com/android/keyguard/CarrierTextControllerTest.java index 212c8f52a19e4..e312990c7f8e4 100644 --- a/packages/SystemUI/tests/src/com/android/keyguard/CarrierTextControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/keyguard/CarrierTextControllerTest.java @@ -189,10 +189,6 @@ public class CarrierTextControllerTest extends SysuiTestCase { when(mKeyguardUpdateMonitor.getSimState(anyInt())).thenReturn(IccCardConstants.State.READY); when(mKeyguardUpdateMonitor.getSubscriptionInfo(anyBoolean())).thenReturn(list); - // STOPSHIP(b/130246708) This line makes sure that SubscriptionManager provides the - // same answer as KeyguardUpdateMonitor. Remove when this is addressed - when(mSubscriptionManager.getActiveSubscriptionInfoList(anyBoolean())).thenReturn(list); - mKeyguardUpdateMonitor.mServiceStates = new HashMap<>(); ArgumentCaptor captor = @@ -217,10 +213,6 @@ public class CarrierTextControllerTest extends SysuiTestCase { when(mKeyguardUpdateMonitor.getSimState(anyInt())).thenReturn(IccCardConstants.State.READY); when(mKeyguardUpdateMonitor.getSubscriptionInfo(anyBoolean())).thenReturn(list); - // STOPSHIP(b/130246708) This line makes sure that SubscriptionManager provides the - // same answer as KeyguardUpdateMonitor. Remove when this is addressed - when(mSubscriptionManager.getActiveSubscriptionInfoList(anyBoolean())).thenReturn(list); - mKeyguardUpdateMonitor.mServiceStates = new HashMap<>(); ArgumentCaptor captor = @@ -243,11 +235,6 @@ public class CarrierTextControllerTest extends SysuiTestCase { when(mKeyguardUpdateMonitor.getSubscriptionInfo(anyBoolean())).thenReturn( new ArrayList<>()); - // STOPSHIP(b/130246708) This line makes sure that SubscriptionManager provides the - // same answer as KeyguardUpdateMonitor. Remove when this is addressed - when(mSubscriptionManager.getActiveSubscriptionInfoList(anyBoolean())).thenReturn( - new ArrayList<>()); - ArgumentCaptor captor = ArgumentCaptor.forClass( CarrierTextController.CarrierTextCallbackInfo.class); @@ -271,10 +258,6 @@ public class CarrierTextControllerTest extends SysuiTestCase { when(mKeyguardUpdateMonitor.getSimState(anyInt())).thenReturn(IccCardConstants.State.READY); when(mKeyguardUpdateMonitor.getSubscriptionInfo(anyBoolean())).thenReturn(list); - // STOPSHIP(b/130246708) This line makes sure that SubscriptionManager provides the - // same answer as KeyguardUpdateMonitor. Remove when this is addressed - when(mSubscriptionManager.getActiveSubscriptionInfoList(anyBoolean())).thenReturn(list); - mKeyguardUpdateMonitor.mServiceStates = new HashMap<>(); ArgumentCaptor captor = @@ -300,10 +283,6 @@ public class CarrierTextControllerTest extends SysuiTestCase { .thenReturn(IccCardConstants.State.NOT_READY); when(mKeyguardUpdateMonitor.getSubscriptionInfo(anyBoolean())).thenReturn(list); - // STOPSHIP(b/130246708) This line makes sure that SubscriptionManager provides the - // same answer as KeyguardUpdateMonitor. Remove when this is addressed - when(mSubscriptionManager.getActiveSubscriptionInfoList(anyBoolean())).thenReturn(list); - mKeyguardUpdateMonitor.mServiceStates = new HashMap<>(); ArgumentCaptor captor = @@ -329,10 +308,6 @@ public class CarrierTextControllerTest extends SysuiTestCase { .thenReturn(IccCardConstants.State.READY); when(mKeyguardUpdateMonitor.getSubscriptionInfo(anyBoolean())).thenReturn(list); - // STOPSHIP(b/130246708) This line makes sure that SubscriptionManager provides the - // same answer as KeyguardUpdateMonitor. Remove when this is addressed - when(mSubscriptionManager.getActiveSubscriptionInfoList(anyBoolean())).thenReturn(list); - mKeyguardUpdateMonitor.mServiceStates = new HashMap<>(); ArgumentCaptor captor = @@ -361,10 +336,6 @@ public class CarrierTextControllerTest extends SysuiTestCase { when(mKeyguardUpdateMonitor.getSubscriptionInfo(anyBoolean())).thenReturn(list); mKeyguardUpdateMonitor.mServiceStates = new HashMap<>(); - // STOPSHIP(b/130246708) This line makes sure that SubscriptionManager provides the - // same answer as KeyguardUpdateMonitor. Remove when this is addressed - when(mSubscriptionManager.getActiveSubscriptionInfoList(anyBoolean())).thenReturn(list); - ArgumentCaptor captor = ArgumentCaptor.forClass( CarrierTextController.CarrierTextCallbackInfo.class); @@ -385,12 +356,9 @@ public class CarrierTextControllerTest extends SysuiTestCase { list.add(TEST_SUBSCRIPTION_2); when(mKeyguardUpdateMonitor.getSimState(anyInt())) .thenReturn(IccCardConstants.State.READY); - when(mKeyguardUpdateMonitor.getSubscriptionInfo(anyBoolean())).thenReturn(list); + mKeyguardUpdateMonitor.mServiceStates = new HashMap<>(); mCarrierTextController.updateDisplayOpportunisticSubscriptionCarrierText(); - - // STOPSHIP(b/130246708) This line makes sure that SubscriptionManager provides the - // same answer as KeyguardUpdateMonitor. Remove when this is addressed when(mSubscriptionManager.getActiveSubscriptionInfoList(anyBoolean())).thenReturn(list); ArgumentCaptor captor =