diff --git a/app/src/debug/AndroidManifest.xml b/app/src/debug/AndroidManifest.xml index 031212a..31f78a8 100644 --- a/app/src/debug/AndroidManifest.xml +++ b/app/src/debug/AndroidManifest.xml @@ -1,9 +1,12 @@ - + - + + android:label="@string/title_activity_fragment_test" /> diff --git a/app/src/debug/java/org/bspeice/minimalbible/MinimalBible.java b/app/src/debug/java/org/bspeice/minimalbible/MinimalBible.java deleted file mode 100644 index 21f701b..0000000 --- a/app/src/debug/java/org/bspeice/minimalbible/MinimalBible.java +++ /dev/null @@ -1,66 +0,0 @@ -package org.bspeice.minimalbible; - -import android.app.Application; -import android.content.Context; -import android.util.Log; - -import org.acra.ACRA; -import org.acra.ReportingInteractionMode; -import org.acra.annotation.ReportsCrashes; -import org.crosswire.jsword.book.sword.SwordBookPath; - -import java.io.File; - -import dagger.ObjectGraph; - -/** - * Created by bspeice on 9/12/14. - */ -@ReportsCrashes(formKey = "", - mailTo = "bspeice.nc@gmail.com", - mode = ReportingInteractionMode.SILENT -) -public class MinimalBible extends Application implements Injector { - private String TAG = "MinimalBible"; - private ObjectGraph mObjectGraph; - - public static MinimalBible get(Context ctx) { - return (MinimalBible) ctx.getApplicationContext(); - } - - @Override - public void onCreate() { - super.onCreate(); - buildObjGraph(); - setJswordHome(); - ACRA.init(this); - } - - public void buildObjGraph() { - mObjectGraph = ObjectGraph.create(Modules.list(this)); - } - - public void inject(Object o) { - mObjectGraph.inject(o); - } - - public ObjectGraph plus(Object... modules) { - return mObjectGraph.plus(modules); - } - - /** - * Notify jSword that it needs to store files in the Android internal directory - * NOTE: Android will uninstall these files if you uninstall MinimalBible. - */ - @SuppressWarnings("null") - private void setJswordHome() { - // We need to set the download directory for jSword to stick with - // Android. - String home = this.getFilesDir().toString(); - Log.d(TAG, "Setting jsword.home to: " + home); - System.setProperty("jsword.home", home); - System.setProperty("sword.home", home); - SwordBookPath.setDownloadDir(new File(home)); - Log.d(TAG, "Sword download path: " + SwordBookPath.getSwordDownloadDir()); - } -} \ No newline at end of file diff --git a/app/src/debug/java/org/bspeice/minimalbible/MinimalBibleDebug.java b/app/src/debug/java/org/bspeice/minimalbible/MinimalBibleDebug.java new file mode 100644 index 0000000..01fee4f --- /dev/null +++ b/app/src/debug/java/org/bspeice/minimalbible/MinimalBibleDebug.java @@ -0,0 +1,22 @@ +package org.bspeice.minimalbible; + +import org.acra.ACRA; +import org.acra.ReportingInteractionMode; +import org.acra.annotation.ReportsCrashes; + +/** + * Create a MinimalBible application that we can extend from the main release + * Currently it's not doing much, but would allow for shenanigans during testing in the future + */ +@ReportsCrashes(formKey = "", + mailTo = "bspeice.nc@gmail.com", + mode = ReportingInteractionMode.SILENT +) +public class MinimalBibleDebug extends MinimalBible implements Injector { + + @Override + public void onCreate() { + super.onCreate(); + ACRA.init(this); + } +} \ No newline at end of file diff --git a/app/src/debug/java/org/bspeice/minimalbible/Modules.java b/app/src/debug/java/org/bspeice/minimalbible/Modules.java deleted file mode 100644 index aeb22bc..0000000 --- a/app/src/debug/java/org/bspeice/minimalbible/Modules.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.bspeice.minimalbible; - -/** - * List modules to be used during testing - * Also the entry point for setting whether or not we are using testing mode - */ -public class Modules { - - public static TestModules testModules = new TestModules(); - - private Modules() { - } - - public static Object[] list(MinimalBible app) { - return new Object[]{ - new MinimalBibleModules(app), - testModules - }; - } -} diff --git a/app/src/release/java/org/bspeice/minimalbible/MinimalBible.java b/app/src/main/java/org/bspeice/minimalbible/MinimalBible.java similarity index 95% rename from app/src/release/java/org/bspeice/minimalbible/MinimalBible.java rename to app/src/main/java/org/bspeice/minimalbible/MinimalBible.java index 177bb46..c9a85da 100644 --- a/app/src/release/java/org/bspeice/minimalbible/MinimalBible.java +++ b/app/src/main/java/org/bspeice/minimalbible/MinimalBible.java @@ -1,6 +1,3 @@ -/** - * Created by bspeice on 9/12/14. - */ package org.bspeice.minimalbible; import android.app.Application; @@ -14,7 +11,7 @@ import java.io.File; import dagger.ObjectGraph; /** - * Created by bspeice on 9/12/14. + * Set up the application! */ public class MinimalBible extends Application implements Injector { private String TAG = "MinimalBible"; diff --git a/app/src/release/java/org/bspeice/minimalbible/Modules.java b/app/src/main/java/org/bspeice/minimalbible/Modules.java similarity index 80% rename from app/src/release/java/org/bspeice/minimalbible/Modules.java rename to app/src/main/java/org/bspeice/minimalbible/Modules.java index 2e6f518..fddd1f9 100644 --- a/app/src/release/java/org/bspeice/minimalbible/Modules.java +++ b/app/src/main/java/org/bspeice/minimalbible/Modules.java @@ -4,10 +4,11 @@ package org.bspeice.minimalbible; * List modules used by default MinimalBible configuration */ public class Modules { - private Modules() {} + private Modules() { + } public static Object[] list(MinimalBible app) { - return new Object[] { + return new Object[]{ new MinimalBibleModules(app) }; }