package net.rdrei.android.wakimail;

import org.acra.ACRA;
import org.acra.annotation.ReportsCrashes;

import android.app.Application;

/**
 * Sets up settings that are required for the application to run.
 * 
 * @author pascal
 */
@ReportsCrashes(
	formUri = "http://www.bugsense.com/api/acra?api_key=2b0a6e7c",
	formKey = "")
public class WAKiMailApplication extends Application {
	@Override
	public void onCreate() {
		// The following line triggers the initialization of ACRA
		ACRA.init(this);
		super.onCreate();
	}
}

@@ -127,16 +127,46 @@
 ication;
+%0Aimport android.os.StrictMode;
 %0A%0A/**%0A *
@@ -271,18 +271,16 @@
 Crashes(
-%0A%09
 formUri 
@@ -333,18 +333,17 @@
 0a6e7c%22,
-%0A%09
+ 
 formKey 
@@ -446,102 +446,499 @@
 %7B%0A%09%09
-// The following line triggers the initialization of ACRA%0A%09%09ACRA.init(this);%0A%09%09super.onCreate(
+super.onCreate();%0A%0A%09%09if (BuildConfig.DEBUG) %7B%0A%09%09%09enableStrictMode();%0A%09%09%7D else %7B%0A%09%09%09// Only if DEBUG is disabled.%0A%09%09%09ACRA.init(this);%0A%09%09%7D%0A%09%7D%0A%0A%09private void enableStrictMode() %7B%0A%09%09StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()%0A%09%09%09%09.detectAll().penaltyLog().build());%0A%09%09StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()%0A%09%09%09%09.detectLeakedSqlLiteObjects()%0A%09%09%09%09// Only on 11+ if I'm not mistaken.%0A%09%09%09%09.detectLeakedClosableObjects().penaltyLog().penaltyDeath()%0A%09%09%09%09.build()
 );%0A%09

Enable StrictMode in DEBUG env, disable ACRA there