package de.markusfisch.android.shadereditor.app;

import de.markusfisch.android.shadereditor.database.DataSource;
import de.markusfisch.android.shadereditor.preference.Preferences;

import android.app.Application;

public class ShaderEditorApplication extends Application
{
	public static final Preferences preferences = new Preferences();
	public static final DataSource dataSource = new DataSource();

	@Override
	public void onCreate()
	{
		super.onCreate();

		preferences.init( this );
		dataSource.openAsync( this );
	}
}

@@ -173,16 +173,72 @@
 erences;
+%0Aimport de.markusfisch.android.shadereditor.BuildConfig;
 %0A%0Aimport
@@ -262,16 +262,46 @@
 ication;
+%0Aimport android.os.StrictMode;
 %0A%0Apublic
@@ -570,16 +570,16 @@
 this );%0A
-
 %09%09dataSo
@@ -601,14 +601,370 @@
  this );
+%0A%0A%09%09if( BuildConfig.DEBUG )%0A%09%09%7B%0A%09%09%09StrictMode.setThreadPolicy(%0A%09%09%09%09new StrictMode.ThreadPolicy.Builder()%0A%09%09%09%09%09.detectAll()%0A%09%09%09%09%09.penaltyLog()%0A%09%09%09%09%09.build() );%0A%0A%09%09%09StrictMode.setVmPolicy(%0A%09%09%09%09new StrictMode.VmPolicy.Builder()%0A%09%09%09%09%09.detectLeakedSqlLiteObjects()%0A%09%09%09%09%09.detectLeakedClosableObjects()%0A%09%09%09%09%09.penaltyLog()%0A%09%09%09%09%09.penaltyDeath()%0A%09%09%09%09%09.build() );%0A%09%09%7D
 %0A%09%7D%0A%7D%0A

Use strict mode in debug build