Handle fragment breadcrumbs for deep-linked settings launches.

This adds meta-data to the manifest for specifying the parent fragment and enabling a link
in the breadcrumbs to navigate "up" a level even if the parent is not in the back-stack.

Bug: 3236568

Fix a monkey issue in VpnSettings.
This commit is contained in:
Amith Yamasani
2010-12-14 14:38:16 -08:00
parent 3f0f998aa7
commit c9fdfa8a72
4 changed files with 168 additions and 3 deletions

View File

@@ -196,6 +196,17 @@ public class VpnSettings extends SettingsPreferenceFragment
super.onDestroyView();
}
@Override
public void onDestroy() {
super.onDestroy();
// Remove any onClick listeners
if (mVpnListContainer != null) {
for (int i = 0; i < mVpnListContainer.getPreferenceCount(); i++) {
mVpnListContainer.getPreference(i).setOnPreferenceClickListener(null);
}
}
}
@Override
public Dialog onCreateDialog (int id) {
switch (id) {
@@ -1050,6 +1061,7 @@ public class VpnSettings extends SettingsPreferenceFragment
changeState(p, VpnState.IDLE);
}
}
if (getActivity() == null) return;
getActivity().unbindService(this);
showPreferences();
}
@@ -1058,6 +1070,7 @@ public class VpnSettings extends SettingsPreferenceFragment
cv.open();
setDefaultState(list);
if (getActivity() == null) return;
getActivity().unbindService(this);
showPreferences();
}