Merge "Only display options to save and cancel edits to the displayed APN if the APN is editable." am: ad045f62ca
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/12907677 Change-Id: I7bea4b2671d69a9a6f38da4d8a0e5b8222d19763
This commit is contained in:
@@ -805,8 +805,11 @@ 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 && !mReadOnlyApn) {
|
if (!mNewApn) {
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user