summaryrefslogtreecommitdiff
path: root/main/src
diff options
context:
space:
mode:
Diffstat (limited to 'main/src')
-rw-r--r--main/src/main/java/de/blinkt/openvpn/api/ExternalAppDatabase.java2
-rw-r--r--main/src/main/java/de/blinkt/openvpn/core/VPNLaunchHelper.java10
-rw-r--r--main/src/ui/java/de/blinkt/openvpn/fragments/AboutFragment.java3
3 files changed, 6 insertions, 9 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/api/ExternalAppDatabase.java b/main/src/main/java/de/blinkt/openvpn/api/ExternalAppDatabase.java
index c6cc1beb..57e82778 100644
--- a/main/src/main/java/de/blinkt/openvpn/api/ExternalAppDatabase.java
+++ b/main/src/main/java/de/blinkt/openvpn/api/ExternalAppDatabase.java
@@ -29,7 +29,7 @@ public class ExternalAppDatabase {
mContext =c;
}
- private final String PREFERENCES_KEY = "allowed_apps";
+ private final static String PREFERENCES_KEY = "allowed_apps";
boolean isAllowed(String packagename) {
Set<String> allowedapps = getExtAppList();
diff --git a/main/src/main/java/de/blinkt/openvpn/core/VPNLaunchHelper.java b/main/src/main/java/de/blinkt/openvpn/core/VPNLaunchHelper.java
index 7c1722e0..7fb01032 100644
--- a/main/src/main/java/de/blinkt/openvpn/core/VPNLaunchHelper.java
+++ b/main/src/main/java/de/blinkt/openvpn/core/VPNLaunchHelper.java
@@ -51,7 +51,7 @@ public class VPNLaunchHelper {
}
}
- throw new RuntimeException("Cannot find any execulte for this device's ABIs " + abis.toString());
+ throw new RuntimeException("Cannot find any execulte for this device's ABIs " + Arrays.toString(abis));
}
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
@@ -79,17 +79,13 @@ public class VPNLaunchHelper {
String binaryName = writeMiniVPN(c);
// Add fixed paramenters
//args.add("/data/data/de.blinkt.openvpn/lib/openvpn");
- if (binaryName == null) {
- VpnStatus.logError("Error writing minivpn binary");
- return null;
- }
args.add(binaryName);
args.add("--config");
args.add(getConfigFilePath(c));
- return args.toArray(new String[args.size()]);
+ return args.toArray(new String[0]);
}
private static boolean writeMiniVPNBinary(Context context, String abi, File mvpnout) {
@@ -106,7 +102,7 @@ public class VPNLaunchHelper {
FileOutputStream fout = new FileOutputStream(mvpnout);
- byte buf[] = new byte[4096];
+ byte[] buf = new byte[4096];
int lenread = mvpn.read(buf);
while (lenread > 0) {
diff --git a/main/src/ui/java/de/blinkt/openvpn/fragments/AboutFragment.java b/main/src/ui/java/de/blinkt/openvpn/fragments/AboutFragment.java
index 6ab6e2cc..ec07a77c 100644
--- a/main/src/ui/java/de/blinkt/openvpn/fragments/AboutFragment.java
+++ b/main/src/ui/java/de/blinkt/openvpn/fragments/AboutFragment.java
@@ -45,6 +45,7 @@ import java.util.Vector;
import de.blinkt.openvpn.R;
import de.blinkt.openvpn.core.VpnStatus;
+import kotlin.text.Charsets;
public class AboutFragment extends Fragment implements View.OnClickListener {
@@ -305,7 +306,7 @@ public class AboutFragment extends Fragment implements View.OnClickListener {
try {
mvpn = getActivity().getAssets().open("full_licenses.html");
- BufferedReader reader = new BufferedReader(new InputStreamReader(mvpn));
+ BufferedReader reader = new BufferedReader(new InputStreamReader(mvpn, Charsets.UTF_8));
StringBuilder sb = new StringBuilder();
String line = null;
while ((line = reader.readLine()) != null) {