package com.wkovacs64.mtorch;

import android.app.Application;
import android.os.Build;
import android.os.StrictMode;

import timber.log.Timber;

public final class CustomApplication extends Application {

    @Override
    public void onCreate() {
        if (BuildConfig.DEBUG) {
            // Initialize Timber logging library
            Timber.plant(new Timber.DebugTree());

            // Enable StrictMode for debug builds
            enabledStrictMode();
        }

        super.onCreate();
    }

    private void enabledStrictMode() {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) {
            StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
                    .detectAll()
                    .penaltyLog()
                    .penaltyDialog()
                    .build());
            StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
                    .detectAll()
                    .penaltyLog()
                    .build());
        }
    }
}

@@ -60,33 +60,8 @@
 on;%0A
-import android.os.Build;%0A
 impo
@@ -86,16 +86,16 @@
 ctMode;%0A
+
 %0Aimport 
@@ -520,84 +520,8 @@
 ) %7B%0A
-        if (Build.VERSION.SDK_INT %3E= Build.VERSION_CODES.GINGERBREAD) %7B%0A    
     
@@ -597,36 +597,32 @@
                 
-    
 .detectAll()%0A   
@@ -626,36 +626,32 @@
                 
-  
-  
 .penaltyLog()%0A  
@@ -640,36 +640,32 @@
   .penaltyLog()%0A
-    
                 
@@ -689,36 +689,32 @@
                 
- 
-   
 .build());%0A     
@@ -704,28 +704,24 @@
  .build());%0A
-    
         Stri
@@ -781,36 +781,32 @@
                 
-    
 .detectAll()%0A   
@@ -794,36 +794,32 @@
    .detectAll()%0A
-    
                 
@@ -840,36 +840,32 @@
                 
-    
 .build());%0A     
@@ -859,26 +859,16 @@
 ild());%0A
-        %7D%0A
     %7D%0A%7D%0A

Remove unnecessary Gingerbread check around strict mode