Merge "Change the SIM color for passing the GAR" into sc-qpr1-dev am: adc41a55d5
am: ebdc0e26f6
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/15751403 Change-Id: Ia6abb73f2bfde7ad4c13ca0bcea28cfe6460968c
This commit is contained in:
@@ -159,7 +159,7 @@ public class RenameMobileNetworkDialogFragmentTest {
|
||||
eq(SubscriptionManager.NAME_SOURCE_USER_INPUT));
|
||||
assertThat(captor.getValue()).isEqualTo("test2");
|
||||
verify(mSubscriptionMgr)
|
||||
.setIconTint(eq(Color.parseColor("#ff00796b" /* teal */)), eq(mSubscriptionId));
|
||||
.setIconTint(eq(Color.parseColor("#ff006D74" /* cyan */)), eq(mSubscriptionId));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -174,6 +174,34 @@ public class RenameMobileNetworkDialogFragmentTest {
|
||||
assertThat(view.findViewById(R.id.number_label).getVisibility()).isEqualTo(View.GONE);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void populateView_getPreviousSimColor_setCorrectSelection() {
|
||||
final View view = LayoutInflater.from(mActivity).inflate(
|
||||
R.layout.dialog_mobile_network_rename, null);
|
||||
when(mSubscriptionInfo.getIconTint())
|
||||
.thenReturn(Color.parseColor("#ff3367d6"/* blue700 */));
|
||||
|
||||
startDialog();
|
||||
mFragment.populateView(view);
|
||||
|
||||
final Spinner colorSpinnerView = mFragment.getColorSpinnerView();
|
||||
assertThat(colorSpinnerView.getSelectedItemPosition()).isEqualTo(1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void populateView_getUpdatedSimColor_setCorrectSelection() {
|
||||
final View view = LayoutInflater.from(mActivity).inflate(
|
||||
R.layout.dialog_mobile_network_rename, null);
|
||||
when(mSubscriptionInfo.getIconTint())
|
||||
.thenReturn(Color.parseColor("#ff137333"/* Green800 */));
|
||||
|
||||
startDialog();
|
||||
mFragment.populateView(view);
|
||||
|
||||
final Spinner colorSpinnerView = mFragment.getColorSpinnerView();
|
||||
assertThat(colorSpinnerView.getSelectedItemPosition()).isEqualTo(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to start the dialog
|
||||
*/
|
||||
|
Reference in New Issue
Block a user