Update signal strength on ServiceState in service

Test: make RunSettingsRobotTests
Bug: 167643728
Change-Id: Ibf69f9e9ec2acafef1316069d37b8d2a27d7d4d7
Merged-In: Ibf69f9e9ec2acafef1316069d37b8d2a27d7d4d7
(cherry picked from commit 3b3704d693)
This commit is contained in:
Sarah Chin
2020-11-06 11:30:45 -08:00
parent 7ea9985044
commit 62efb18365
2 changed files with 13 additions and 7 deletions

View File

@@ -42,6 +42,7 @@ import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.robolectric.Shadows.shadowOf;
@@ -293,7 +294,7 @@ public class SimStatusDialogControllerTest {
final String signalStrengthString =
mContext.getString(R.string.sim_signal_strength, lteDbm, lteAsu);
verify(mDialog).setText(SIGNAL_STRENGTH_VALUE_ID, signalStrengthString);
verify(mDialog, times(2)).setText(SIGNAL_STRENGTH_VALUE_ID, signalStrengthString);
}
@Test
@@ -310,7 +311,7 @@ public class SimStatusDialogControllerTest {
final String signalStrengthString =
mContext.getString(R.string.sim_signal_strength, lteDbm, lteAsu);
verify(mDialog).setText(SIGNAL_STRENGTH_VALUE_ID, signalStrengthString);
verify(mDialog, times(2)).setText(SIGNAL_STRENGTH_VALUE_ID, signalStrengthString);
}
@Test
@@ -330,7 +331,7 @@ public class SimStatusDialogControllerTest {
final String signalStrengthString =
mContext.getString(R.string.sim_signal_strength, lteDbm, lteAsu);
verify(mDialog).setText(SIGNAL_STRENGTH_VALUE_ID, signalStrengthString);
verify(mDialog, times(2)).setText(SIGNAL_STRENGTH_VALUE_ID, signalStrengthString);
}
@Test
@@ -394,8 +395,8 @@ public class SimStatusDialogControllerTest {
mController.initialize();
verify(mDialog).removeSettingFromScreen(SIGNAL_STRENGTH_LABEL_ID);
verify(mDialog).removeSettingFromScreen(SIGNAL_STRENGTH_VALUE_ID);
verify(mDialog, times(2)).removeSettingFromScreen(SIGNAL_STRENGTH_LABEL_ID);
verify(mDialog, times(2)).removeSettingFromScreen(SIGNAL_STRENGTH_VALUE_ID);
}
@Test
@@ -405,7 +406,7 @@ public class SimStatusDialogControllerTest {
mController.initialize();
verify(mDialog).setText(eq(SIGNAL_STRENGTH_VALUE_ID), any());
verify(mDialog, times(2)).setText(eq(SIGNAL_STRENGTH_VALUE_ID), any());
verify(mDialog).removeSettingFromScreen(ICCID_INFO_LABEL_ID);
verify(mDialog).removeSettingFromScreen(ICCID_INFO_VALUE_ID);
}