Remove use of SingleServerProfile.

* changes
  + mv SingleServerEditor.java VpnProfileEditor.java
  + Add loadExtraPreferecesTo() to VpnProfileEditor
  + Make L2tpIpsecEditor extend VpnProfileEditor and use loadExtraPreferencesTo()
  + Modify VpnEditor.getEditor() accordingly
This commit is contained in:
Hung-ying Tyan
2009-06-15 12:36:04 +08:00
parent a55ae92a13
commit 84cfb0dc9b
4 changed files with 98 additions and 127 deletions

View File

@@ -158,10 +158,8 @@ public class VpnEditor extends PreferenceActivity {
private VpnProfileEditor getEditor(VpnProfile p) {
if (p instanceof L2tpIpsecProfile) {
return new L2tpIpsecEditor((L2tpIpsecProfile) p);
} else if (p instanceof SingleServerProfile) {
return new SingleServerEditor((SingleServerProfile) p);
} else {
throw new RuntimeException("Unknown profile type: " + p.getType());
return new VpnProfileEditor(p);
}
}