diff options
Diffstat (limited to 'remoteExample/src/main/java')
-rw-r--r-- | remoteExample/src/main/java/de/blinkt/openvpn/remote/RemoteExampleApplication.java | 29 |
1 files changed, 29 insertions, 0 deletions
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); + } +} |