Update string for discarding changes to a particular APN's settings.

Previously was unclear whether the changes, or the entire APN was
being discarded. The word "Cancel" more closely implies that the most
recent changes to the screen will be discarded rather than the entire
APN.

This only changes the resource for english. However, many other
languages have a menu_cancel string that seems much closer
to "Cancel" than "Discard" as well.

i.e. http://cs/android/packages/apps/Settings/res/values-zu/strings.xml?l=1029&rcl=a7397bec91183a7a32561fd8d67b0478af6c65bb
http://cs/android/packages/apps/Settings/res/values-es/strings.xml?l=1029&rcl=a7397bec91183a7a32561fd8d67b0478af6c65bb

Bug: 171538880
Test: N/A
Change-Id: I80fde04dbc36078d5c53e68231fcc4e5c3cf94e6
This commit is contained in:
Jeremy Goldman
2020-10-23 04:58:49 +00:00
parent f36154fe6c
commit 7a16e45290
2 changed files with 6 additions and 7 deletions

View File

@@ -805,16 +805,15 @@ public class ApnEditor extends SettingsPreferenceFragment
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
super.onCreateOptionsMenu(menu, inflater);
if (mReadOnlyApn) {
return;
}
// If it's a new APN, then cancel will delete the new entry in onPause
if (!mNewApn) {
if (!mNewApn && !mReadOnlyApn) {
menu.add(0, MENU_DELETE, 0, R.string.menu_delete)
.setIcon(R.drawable.ic_delete);
}
menu.add(0, MENU_SAVE, 0, R.string.menu_save)
.setIcon(android.R.drawable.ic_menu_save);
if (!mReadOnlyApn) {
menu.add(0, MENU_SAVE, 0, R.string.menu_save)
.setIcon(android.R.drawable.ic_menu_save);
}
menu.add(0, MENU_CANCEL, 0, R.string.menu_cancel)
.setIcon(android.R.drawable.ic_menu_close_clear_cancel);
}