String changes for some SIM switch confirmation dialogs

These are changes for strings used in two scenarios:

-When switching which SIM is used for mobile data. This is an update to
 some existing strings.

-Enabling an eSIM when another one is already enabled (so the first one
 will need to be disabled). These are new strings.

Bug: 129156640
Test: compile, plus manual (run a device in DSDS mode, go to details for
SIM that isn't currently used for mobile data, and tap on mobile data
switch)

Change-Id: Ie9dfe23c466cb454bbad916ba83b833967a0da0e
This commit is contained in:
Antony Sargent
2019-03-22 16:30:30 -07:00
parent fb93cb224f
commit fcc9440a52
2 changed files with 45 additions and 8 deletions

View File

@@ -93,14 +93,18 @@ public class MobileDataDialogFragment extends InstrumentedDialogFragment impleme
R.string.sim_selection_required_pref)
: nextSubInfo.getDisplayName().toString();
final String newName = (currentSubInfo == null)
? getContext().getResources().getString(
R.string.sim_selection_required_pref)
: currentSubInfo.getDisplayName().toString();
return new AlertDialog.Builder(context)
.setTitle(R.string.sim_change_data_title)
.setTitle(context.getString(R.string.sim_change_data_title, newName))
.setMessage(context.getString(R.string.sim_change_data_message,
currentSubInfo != null
? currentSubInfo.getDisplayName()
: "",
previousName))
.setPositiveButton(android.R.string.ok, this)
newName, previousName))
.setPositiveButton(
context.getString(R.string.sim_change_data_ok, newName),
this)
.setNegativeButton(R.string.cancel, null)
.create();
default: