summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/OpenVpnPreferencesFragment.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/de/blinkt/openvpn/OpenVpnPreferencesFragment.java')
-rw-r--r--src/de/blinkt/openvpn/OpenVpnPreferencesFragment.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/de/blinkt/openvpn/OpenVpnPreferencesFragment.java b/src/de/blinkt/openvpn/OpenVpnPreferencesFragment.java
index 10378a80..4cf3b10b 100644
--- a/src/de/blinkt/openvpn/OpenVpnPreferencesFragment.java
+++ b/src/de/blinkt/openvpn/OpenVpnPreferencesFragment.java
@@ -13,11 +13,11 @@ public abstract class OpenVpnPreferencesFragment extends PreferenceFragment {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- // Make sure there is an instance of the profile manager
- ProfileManager.getInstance(getActivity());
-
+
String profileUUID = getArguments().getString(getActivity().getPackageName() + ".profileUUID");
- mProfile = ProfileManager.get(profileUUID);
+ mProfile = ProfileManager.get(getActivity(),profileUUID);
+ getActivity().setTitle(getString(R.string.edit_profile_title, mProfile.getName()));
+
}
@Override
@@ -31,8 +31,7 @@ public abstract class OpenVpnPreferencesFragment extends PreferenceFragment {
super.onActivityCreated(savedInstanceState);
if(savedInstanceState!=null) {
String profileUUID=savedInstanceState.getString(VpnProfile.EXTRA_PROFILEUUID);
- ProfileManager.getInstance(getActivity());
- mProfile = ProfileManager.get(profileUUID);
+ mProfile = ProfileManager.get(getActivity(),profileUUID);
loadSettings();
}
}