package treehou.se.habit;

import android.content.Context;
import android.support.multidex.MultiDex;

import treehou.se.habit.connector.TrustModifier;

public class HabitApplication extends com.activeandroid.app.Application {

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

        // TODO Remove when support for self signed certificates
        TrustModifier.NukeSSLCerts.nuke();
    }

    @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base);
        MultiDex.install(this);
    }
}

@@ -511,16 +511,35 @@
 (base);%0A
+%0A        try %7B%0A    
         
@@ -562,16 +562,713 @@
 (this);%0A
+        %7D catch (RuntimeException multiDexException) %7B%0A            // Work around Robolectric causing multi dex installation to fail, see%0A            // https://code.google.com/p/android/issues/detail?id=82007.%0A            boolean isUnderUnitTest;%0A%0A            try %7B%0A                Class%3C?%3E robolectric = Class.forName(%22org.robolectric.Robolectric%22);%0A                isUnderUnitTest = (robolectric != null);%0A            %7D catch (ClassNotFoundException e) %7B%0A                isUnderUnitTest = false;%0A            %7D%0A%0A            if (!isUnderUnitTest) %7B%0A                // Re-throw if this does not seem to be triggered by Robolectric.%0A                throw multiDexException;%0A            %7D%0A        %7D%0A
     %7D%0A%7D%0A

Fix application class to support robolectric with multidex