Include always ask button in SIM picker dialog

Fixes: 129433330
Test: manual
Change-Id: Ia7e5af56541aaf66df9e1749c1cc6e7f97d55a0b
This commit is contained in:
Fan Zhang
2019-04-24 14:11:50 -07:00
parent f3365e911d
commit e83d718ff9

View File

@@ -78,23 +78,24 @@ public class SimDialogActivity extends FragmentActivity {
}
private SimDialogFragment createFragment(int dialogType) {
switch(dialogType) {
switch (dialogType) {
case DATA_PICK:
return SimListDialogFragment.newInstance(dialogType, R.string.select_sim_for_data,
false /* includeAskEveryTime */);
case CALLS_PICK:
return CallsSimListDialogFragment.newInstance(dialogType, R.string.select_sim_for_calls,
return CallsSimListDialogFragment.newInstance(dialogType,
R.string.select_sim_for_calls,
true /* includeAskEveryTime */);
case SMS_PICK:
return SimListDialogFragment.newInstance(dialogType, R.string.select_sim_for_sms,
false /* includeAskEveryTime */);
true /* includeAskEveryTime */);
case PREFERRED_PICK:
if (!getIntent().hasExtra(PREFERRED_SIM)) {
throw new IllegalArgumentException("Missing required extra " + PREFERRED_SIM);
}
return PreferredSimDialogFragment.newInstance();
default:
throw new IllegalArgumentException( "Invalid dialog type " + dialogType + " sent.");
throw new IllegalArgumentException("Invalid dialog type " + dialogType + " sent.");
}
}