Merge "Include always ask button in SIM picker dialog" into qt-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
d414c64dc3
@@ -78,23 +78,24 @@ public class SimDialogActivity extends FragmentActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private SimDialogFragment createFragment(int dialogType) {
|
private SimDialogFragment createFragment(int dialogType) {
|
||||||
switch(dialogType) {
|
switch (dialogType) {
|
||||||
case DATA_PICK:
|
case DATA_PICK:
|
||||||
return SimListDialogFragment.newInstance(dialogType, R.string.select_sim_for_data,
|
return SimListDialogFragment.newInstance(dialogType, R.string.select_sim_for_data,
|
||||||
false /* includeAskEveryTime */);
|
false /* includeAskEveryTime */);
|
||||||
case CALLS_PICK:
|
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 */);
|
true /* includeAskEveryTime */);
|
||||||
case SMS_PICK:
|
case SMS_PICK:
|
||||||
return SimListDialogFragment.newInstance(dialogType, R.string.select_sim_for_sms,
|
return SimListDialogFragment.newInstance(dialogType, R.string.select_sim_for_sms,
|
||||||
false /* includeAskEveryTime */);
|
true /* includeAskEveryTime */);
|
||||||
case PREFERRED_PICK:
|
case PREFERRED_PICK:
|
||||||
if (!getIntent().hasExtra(PREFERRED_SIM)) {
|
if (!getIntent().hasExtra(PREFERRED_SIM)) {
|
||||||
throw new IllegalArgumentException("Missing required extra " + PREFERRED_SIM);
|
throw new IllegalArgumentException("Missing required extra " + PREFERRED_SIM);
|
||||||
}
|
}
|
||||||
return PreferredSimDialogFragment.newInstance();
|
return PreferredSimDialogFragment.newInstance();
|
||||||
default:
|
default:
|
||||||
throw new IllegalArgumentException( "Invalid dialog type " + dialogType + " sent.");
|
throw new IllegalArgumentException("Invalid dialog type " + dialogType + " sent.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user