From be90341c808ac5b17149eb42eac966906c6f2041 Mon Sep 17 00:00:00 2001 From: Stuart Scott Date: Thu, 24 Jul 2014 19:22:06 -0700 Subject: Add option to reset network settings to factory bug:16161518 Change-Id: I7c0cc58d5385352c6c9af2b27af23a744b5df977 --- src/com/android/settings/MasterClear.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/com/android/settings/MasterClear.java') diff --git a/src/com/android/settings/MasterClear.java b/src/com/android/settings/MasterClear.java index 18b51d9fe..9604a3c81 100644 --- a/src/com/android/settings/MasterClear.java +++ b/src/com/android/settings/MasterClear.java @@ -77,9 +77,8 @@ public class MasterClear extends Fragment { */ private boolean runKeyguardConfirmation(int request) { Resources res = getActivity().getResources(); - return new ChooseLockSettingsHelper(getActivity(), this) - .launchConfirmationActivity(request, null, - res.getText(R.string.master_clear_gesture_explanation)); + return new ChooseLockSettingsHelper(getActivity(), this).launchConfirmationActivity(request, + null, res.getText(R.string.master_clear_gesture_explanation)); } @Override @@ -100,11 +99,10 @@ public class MasterClear extends Fragment { } private void showFinalConfirmation() { - Preference preference = new Preference(getActivity()); - preference.setFragment(MasterClearConfirm.class.getName()); - preference.setTitle(R.string.master_clear_confirm_title); - preference.getExtras().putBoolean(ERASE_EXTERNAL_EXTRA, mExternalStorage.isChecked()); - ((SettingsActivity) getActivity()).onPreferenceStartFragment(null, preference); + Bundle args = new Bundle(); + args.putBoolean(ERASE_EXTERNAL_EXTRA, mExternalStorage.isChecked()); + ((SettingsActivity) getActivity()).startPreferencePanel(MasterClearConfirm.class.getName(), + args, R.string.master_clear_confirm_title, null, null, 0); } /** -- cgit v1.2.3