Back to project page RadioStudent-Android.
The source code is released under:
GNU General Public License
If you think the Android project RadioStudent-Android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.radiostudent.radiostudentstream; //from w ww .jav a 2 s . c om import android.content.Context; import android.content.pm.ApplicationInfo; import android.os.StrictMode; public class StrictModeWrapper { public static void init(Context context) { // check if android:debuggable is set to true int applicationFlags = context.getApplicationInfo().flags; if ((applicationFlags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) { StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder() .detectDiskReads() .detectDiskWrites() .detectNetwork() .penaltyLog() .build()); StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder() .detectLeakedSqlLiteObjects() .penaltyLog() .penaltyDeath() .build()); } } }