summaryrefslogtreecommitdiff
path: root/remoteExample
diff options
context:
space:
mode:
Diffstat (limited to 'remoteExample')
-rw-r--r--remoteExample/src/main/AndroidManifest.xml3
-rw-r--r--remoteExample/src/main/java/de/blinkt/openvpn/remote/RemoteExampleApplication.java29
2 files changed, 31 insertions, 1 deletions
diff --git a/remoteExample/src/main/AndroidManifest.xml b/remoteExample/src/main/AndroidManifest.xml
index 2dce4ae9..8ba7ec79 100644
--- a/remoteExample/src/main/AndroidManifest.xml
+++ b/remoteExample/src/main/AndroidManifest.xml
@@ -11,7 +11,8 @@
<uses-permission android:name="android.permission.INTERNET" />
<application
- android:allowBackup="true"
+ android:name=".RemoteExampleApplication"
+ android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
diff --git a/remoteExample/src/main/java/de/blinkt/openvpn/remote/RemoteExampleApplication.java b/remoteExample/src/main/java/de/blinkt/openvpn/remote/RemoteExampleApplication.java
new file mode 100644
index 00000000..e3c6e5f5
--- /dev/null
+++ b/remoteExample/src/main/java/de/blinkt/openvpn/remote/RemoteExampleApplication.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2012-2021 Arne Schwabe
+ * Distributed under the GNU GPL v2 with additional terms. For full terms see the file doc/LICENSE.txt
+ */
+
+package de.blinkt.openvpn.remote;
+
+import android.app.Application;
+import android.os.Build;
+import android.os.StrictMode;
+
+public class RemoteExampleApplication extends Application {
+ @Override
+ public void onCreate() {
+ super.onCreate();
+ if (BuildConfig.BUILD_TYPE.equals("debug"))
+ enableStrictModes();
+
+ }
+ private void enableStrictModes() {
+ StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder()
+ .detectAll()
+ .penaltyLog();
+ //builder.penaltyDeath();
+
+ StrictMode.VmPolicy policy = builder.build();
+ StrictMode.setVmPolicy(policy);
+ }
+}