summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/fragments
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2014-02-04 10:03:13 +0100
committerArne Schwabe <arne@rfc2549.org>2014-02-04 10:03:13 +0100
commit1705a3d66d5c2bc8b0c59b2e53c56ed7f6003f56 (patch)
tree2af9a91382e16ee10f021646272fd07af5f9e9de /src/de/blinkt/openvpn/fragments
parentde196596a6f93c797e4332c8dc463ccb90ece3f5 (diff)
Add UI/config parsing for excluded routes
Diffstat (limited to 'src/de/blinkt/openvpn/fragments')
-rw-r--r--src/de/blinkt/openvpn/fragments/Settings_Routing.java17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/de/blinkt/openvpn/fragments/Settings_Routing.java b/src/de/blinkt/openvpn/fragments/Settings_Routing.java
index 7216e0ff..c6f0dcf8 100644
--- a/src/de/blinkt/openvpn/fragments/Settings_Routing.java
+++ b/src/de/blinkt/openvpn/fragments/Settings_Routing.java
@@ -14,17 +14,22 @@ public class Settings_Routing extends OpenVpnPreferencesFragment implements OnPr
private CheckBoxPreference mUseDefaultRoutev6;
private CheckBoxPreference mRouteNoPull;
private CheckBoxPreference mLocalVPNAccess;
+ private EditTextPreference mExcludedRoutes;
+ private EditTextPreference mExcludedRoutesv6;
- @Override
+ @Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Load the preferences from an XML resource
addPreferencesFromResource(R.xml.vpn_routing);
- mCustomRoutes = (EditTextPreference) findPreference("customRoutes");
+ mCustomRoutes = (EditTextPreference) findPreference("customRoutes");
mUseDefaultRoute = (CheckBoxPreference) findPreference("useDefaultRoute");
mCustomRoutesv6 = (EditTextPreference) findPreference("customRoutesv6");
mUseDefaultRoutev6 = (CheckBoxPreference) findPreference("useDefaultRoutev6");
+ mExcludedRoutes = (EditTextPreference) findPreference("excludedRoutes");
+ mExcludedRoutesv6 = (EditTextPreference) findPreference("excludedRoutesv6");
+
mRouteNoPull = (CheckBoxPreference) findPreference("routenopull");
mLocalVPNAccess = (CheckBoxPreference) findPreference("unblockLocal");
@@ -43,6 +48,9 @@ public class Settings_Routing extends OpenVpnPreferencesFragment implements OnPr
mCustomRoutes.setText(mProfile.mCustomRoutes);
mCustomRoutesv6.setText(mProfile.mCustomRoutesv6);
+ mExcludedRoutes.setText(mProfile.mExcludedRoutes);
+ mExcludedRoutes.setText(mProfile.mExcludedRoutesv6);
+
mRouteNoPull.setChecked(mProfile.mRoutenopull);
mLocalVPNAccess.setChecked(mProfile.mAllowLocalLAN);
@@ -61,12 +69,15 @@ public class Settings_Routing extends OpenVpnPreferencesFragment implements OnPr
mProfile.mCustomRoutesv6 = mCustomRoutesv6.getText();
mProfile.mRoutenopull = mRouteNoPull.isChecked();
mProfile.mAllowLocalLAN =mLocalVPNAccess.isChecked();
+ mProfile.mExcludedRoutes = mExcludedRoutes.getText();
+ mProfile.mExcludedRoutesv6 = mExcludedRoutesv6.getText();
}
@Override
public boolean onPreferenceChange(Preference preference,
Object newValue) {
- if( preference == mCustomRoutes || preference == mCustomRoutesv6 )
+ if( preference == mCustomRoutes || preference == mCustomRoutesv6
+ || preference == mExcludedRoutes || preference == mExcludedRoutesv6)
preference.setSummary((String)newValue);
saveSettings();