aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/fil/libre/repwifiapp/ActivityLauncher.java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/fil/libre/repwifiapp/ActivityLauncher.java')
-rw-r--r--app/src/fil/libre/repwifiapp/ActivityLauncher.java46
1 files changed, 44 insertions, 2 deletions
diff --git a/app/src/fil/libre/repwifiapp/ActivityLauncher.java b/app/src/fil/libre/repwifiapp/ActivityLauncher.java
index 00a8d50..5e9c31d 100644
--- a/app/src/fil/libre/repwifiapp/ActivityLauncher.java
+++ b/app/src/fil/libre/repwifiapp/ActivityLauncher.java
@@ -1,3 +1,23 @@
+//
+// Copyright 2017 Filippo "Fil" Bergamo <fil.bergamo@riseup.net>
+//
+// This file is part of RepWifiApp.
+//
+// RepWifiApp is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// RepWifiApp is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with RepWifiApp. If not, see <http://www.gnu.org/licenses/>.
+//
+// ********************************************************************
+
package fil.libre.repwifiapp;
import android.app.Activity;
@@ -5,10 +25,12 @@ import android.content.Intent;
import android.widget.Toast;
import fil.libre.repwifiapp.activities.InputPasswordActivity;
import fil.libre.repwifiapp.activities.InputSsidActivity;
+import fil.libre.repwifiapp.activities.Ipv4SettingsActivity;
import fil.libre.repwifiapp.activities.LongTaskActivity;
import fil.libre.repwifiapp.activities.NetworkDetailsActivity;
import fil.libre.repwifiapp.activities.SelectNetworkActivity;
import fil.libre.repwifiapp.activities.ShowStatusActivity;
+import fil.libre.repwifiapp.activities.VpnSettingsActivity;
import fil.libre.repwifiapp.helpers.AccessPointInfo;
import fil.libre.repwifiapp.helpers.ConnectionStatus;
import fil.libre.repwifiapp.helpers.NetworkManager;
@@ -39,6 +61,7 @@ public class ActivityLauncher {
public static final int CONNECT_HIDDEN = 10;
public static final int USB_ATTACHED = 11;
public static final int USB_DETACHED = 12;
+ public static final int VPN_PERMISSION = 13;
}
@@ -59,7 +82,7 @@ public class ActivityLauncher {
}
public void launchLongTaskActivityConnect(AccessPointInfo info) {
-
+
Intent intent = new Intent(currentContext, LongTaskActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
intent.putExtra(ActivityLauncher.EXTRA_REQCODE, RequestCode.CONNECT);
@@ -102,7 +125,7 @@ public class ActivityLauncher {
nets = manager.getKnownNetworks();
if (nets == null || nets.length == 0) {
- Toast toast = Toast.makeText(currentContext, "No saved network", Toast.LENGTH_LONG);
+ Toast toast = Toast.makeText(currentContext, Commons.msgNoSavedNetwork, Toast.LENGTH_LONG);
toast.show();
return;
}
@@ -130,6 +153,24 @@ public class ActivityLauncher {
currentContext.startActivityForResult(intent, RequestCode.DETAILS_SHOW);
}
+
+ public void launchIpSettingsActivity(AccessPointInfo info) {
+
+ Intent intent = new Intent(currentContext, Ipv4SettingsActivity.class);
+ // intent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
+ intent.putExtra(EXTRA_APINFO, info);
+ currentContext.startActivity(intent);
+
+ }
+
+ public void launchVpnSettingsActivity(AccessPointInfo info) {
+
+ Intent intent = new Intent(currentContext, VpnSettingsActivity.class);
+ // intent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
+ intent.putExtra(EXTRA_APINFO, info);
+ currentContext.startActivity(intent);
+
+ }
public void launchInputSsidActivity() {
@@ -139,5 +180,6 @@ public class ActivityLauncher {
currentContext.startActivityForResult(intent, RequestCode.CONNECT_HIDDEN);
}
+
}