blob: e3c6e5f5be15e6ad99ef824afa1c52ed5103c3d3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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);
}
}
|