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:
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user