Merge "Update string for discarding changes to a particular APN's settings."
This commit is contained in:
committed by
Android (Google) Code Review
commit
e092a54381
@@ -3683,7 +3683,7 @@
|
|||||||
<!-- Edit access point screen menu option to save the user's changes for this APN to the persistent storage -->
|
<!-- Edit access point screen menu option to save the user's changes for this APN to the persistent storage -->
|
||||||
<string name="menu_save">Save</string>
|
<string name="menu_save">Save</string>
|
||||||
<!-- Edit access point screen menu option to discard the user's changes for this APN -->
|
<!-- Edit access point screen menu option to discard the user's changes for this APN -->
|
||||||
<string name="menu_cancel">Discard</string>
|
<string name="menu_cancel">Cancel</string>
|
||||||
<!-- APN error dialog title -->
|
<!-- APN error dialog title -->
|
||||||
<string name="error_title"></string>
|
<string name="error_title"></string>
|
||||||
<!-- APN error dialog messages: -->
|
<!-- APN error dialog messages: -->
|
||||||
|
@@ -805,16 +805,15 @@ public class ApnEditor extends SettingsPreferenceFragment
|
|||||||
@Override
|
@Override
|
||||||
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
||||||
super.onCreateOptionsMenu(menu, inflater);
|
super.onCreateOptionsMenu(menu, inflater);
|
||||||
if (mReadOnlyApn) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
// If it's a new APN, then cancel will delete the new entry in onPause
|
// 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)
|
menu.add(0, MENU_DELETE, 0, R.string.menu_delete)
|
||||||
.setIcon(R.drawable.ic_delete);
|
.setIcon(R.drawable.ic_delete);
|
||||||
}
|
}
|
||||||
menu.add(0, MENU_SAVE, 0, R.string.menu_save)
|
if (!mReadOnlyApn) {
|
||||||
.setIcon(android.R.drawable.ic_menu_save);
|
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)
|
menu.add(0, MENU_CANCEL, 0, R.string.menu_cancel)
|
||||||
.setIcon(android.R.drawable.ic_menu_close_clear_cancel);
|
.setIcon(android.R.drawable.ic_menu_close_clear_cancel);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user