File tree Expand file tree Collapse file tree
java/com/stealthcotper/networktools Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 <uses-permission android : name =" android.permission.INTERNET" />
77
88 <application
9+ android : name =" .ANTApplication"
910 android : allowBackup =" true"
1011 android : icon =" @mipmap/ic_launcher"
1112 android : label =" @string/app_name"
Original file line number Diff line number Diff line change 1+ package com .stealthcotper .networktools ;
2+
3+ import android .app .Application ;
4+ import android .os .StrictMode ;
5+
6+ public class ANTApplication extends Application {
7+
8+ @ Override
9+ public void onCreate () {
10+ initStrictMode ();
11+ super .onCreate ();
12+ }
13+
14+ private void initStrictMode () {
15+ if (BuildConfig .DEBUG ) {
16+
17+ // Let's be super strict so that we can discover bugs during testing
18+
19+ StrictMode .setThreadPolicy (new StrictMode .ThreadPolicy .Builder ()
20+ .detectAll ()
21+ .penaltyLog ()
22+ .penaltyDeath ()
23+ .build ());
24+
25+ StrictMode .setVmPolicy (new StrictMode .VmPolicy .Builder ()
26+ .detectAll ()
27+ .penaltyLog ()
28+ .penaltyDeath ()
29+ .build ());
30+ }
31+ }
32+
33+
34+ }
You can’t perform that action at this time.
0 commit comments