/*
 * Copyright (C) 2015 Square, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.example.leakcanary;

import android.app.Application;
import android.os.StrictMode;
import com.squareup.leakcanary.LeakCanary;

public class ExampleApplication extends Application {

  @Override public void onCreate() {
    super.onCreate();
    enabledStrictMode();
    LeakCanary.install(this);
  }

  private void enabledStrictMode() {
    StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder() //
        .detectAll() //
        .penaltyLog() //
        .penaltyDeath() //
        .build());
  }
}

@@ -733,16 +733,123 @@
 anary;%0A%0A
+import static android.os.Build.VERSION.SDK_INT;%0Aimport static android.os.Build.VERSION_CODES.GINGERBREAD;%0A%0A
 public c
@@ -1047,24 +1047,60 @@
 ictMode() %7B%0A
+    if (SDK_INT %3E= GINGERBREAD) %7B%0A  
     StrictMo
@@ -1155,24 +1155,26 @@
 uilder() //%0A
+  
         .det
@@ -1185,32 +1185,34 @@
 ll() //%0A        
+  
 .penaltyLog() //
@@ -1208,24 +1208,26 @@
 ltyLog() //%0A
+  
         .pen
@@ -1237,24 +1237,26 @@
 yDeath() //%0A
+  
         .bui
@@ -1262,14 +1262,20 @@
 ild());%0A
+    %7D%0A
   %7D%0A%7D%0A

Fix build