package io.sentry.nativesample;

import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import io.sentry.core.Sentry;
import timber.log.Timber;

public class MainActivity extends AppCompatActivity {

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    Timber.i("Sentry.isEnabled() = %s", Sentry.isEnabled());

    findViewById(R.id.native_capture).setOnClickListener(view -> NativeSample.message());
  }
}

@@ -52,16 +52,47 @@
 Bundle;%0A
+import android.os.StrictMode;%0A%0A
 import a
@@ -132,16 +132,16 @@
 tivity;%0A
-
 import i
@@ -311,16 +311,36 @@
 tate) %7B%0A
+    districtMode();%0A
     supe
@@ -412,24 +412,67 @@
 ity_main);%0A%0A
+    Timber.plant(new Timber.DebugTree());%0A%0A
     Timber.i
@@ -517,24 +517,24 @@
 nabled());%0A%0A
-
     findView
@@ -614,11 +614,533 @@
 ());%0A  %7D
+%0A%0A  private void districtMode() %7B%0A    //    https://developer.android.com/reference/android/os/StrictMode%0A    //    StrictMode is a developer tool which detects things you might be doing by accident and%0A    //    brings them to your attention so you can fix them.%0A    if (BuildConfig.DEBUG) %7B%0A      StrictMode.setThreadPolicy(%0A              new StrictMode.ThreadPolicy.Builder().detectAll().penaltyLog().build());%0A%0A      StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder().detectAll().penaltyLog().build());%0A    %7D%0A  %7D
 %0A%7D%0A

enable timber on sample (getsentry/sentry-android#221)