mirror of
https://github.com/schwabe/ics-openvpn.git
synced 2024-09-20 03:52:27 +02:00
Add Strictmode to remoteExample
This commit is contained in:
parent
bcb6673af6
commit
609fd8e292
@ -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" >
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user