summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/SettingsPreferenceFragment.java
diff options
context:
space:
mode:
authorDaisuke Miyakawa <dmiyakawa@google.com>2010-09-12 15:42:56 -0700
committerDaisuke Miyakawa <dmiyakawa@google.com>2010-09-12 17:43:10 -0700
commit21c1abcef77b6db18590215b6f7bc8e6dfda28bf (patch)
tree7c3ecfa35bd07a52f6b430ae9b9dae53e2d2ac45 /src/com/android/settings/SettingsPreferenceFragment.java
parent2712fb5d7992c78425a4845ffb23853de30f3a2a (diff)
downloadpackages_apps_Settings-21c1abcef77b6db18590215b6f7bc8e6dfda28bf.tar.gz
packages_apps_Settings-21c1abcef77b6db18590215b6f7bc8e6dfda28bf.tar.bz2
packages_apps_Settings-21c1abcef77b6db18590215b6f7bc8e6dfda28bf.zip
Fragmentize ProxySettings.
Change-Id: I2c962726b0adc8811c18dd6df7ff7bdc93c31a07
Diffstat (limited to 'src/com/android/settings/SettingsPreferenceFragment.java')
-rw-r--r--src/com/android/settings/SettingsPreferenceFragment.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/com/android/settings/SettingsPreferenceFragment.java b/src/com/android/settings/SettingsPreferenceFragment.java
index bddfb2b7b..2d376417b 100644
--- a/src/com/android/settings/SettingsPreferenceFragment.java
+++ b/src/com/android/settings/SettingsPreferenceFragment.java
@@ -32,10 +32,15 @@ import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
+interface DialogCreatable {
+ public Dialog onCreateDialog(int dialogId);
+}
+
/**
* Base class for Settings fragments, with some helper functions and dialog management.
*/
-public class SettingsPreferenceFragment extends PreferenceFragment {
+public class SettingsPreferenceFragment extends PreferenceFragment
+ implements DialogCreatable {
private static final String TAG = "SettingsPreferenceFragment";
@@ -121,9 +126,10 @@ public class SettingsPreferenceFragment extends PreferenceFragment {
Log.e(TAG, "Old dialog fragment not null!");
}
mDialogFragment = new SettingsDialogFragment(this, dialogId);
- mDialogFragment.show(getActivity(), Integer.toString(dialogId));
+ mDialogFragment.show(getActivity().getFragmentManager(), Integer.toString(dialogId));
}
+ @Override
public Dialog onCreateDialog(int dialogId) {
return null;
}
@@ -139,9 +145,9 @@ public class SettingsPreferenceFragment extends PreferenceFragment {
static class SettingsDialogFragment extends DialogFragment {
private int mDialogId;
- private SettingsPreferenceFragment mFragment;
+ private DialogCreatable mFragment;
- SettingsDialogFragment(SettingsPreferenceFragment fragment, int dialogId) {
+ SettingsDialogFragment(DialogCreatable fragment, int dialogId) {
mDialogId = dialogId;
mFragment = fragment;
}