// Path: app/src/main/java/com/ftinc/showcase/utils/CrashlyticsTree.java
// public class CrashlyticsTree extends Timber.Tree {
// 
//     /**
//      * Constructor
//      * @param ctx
//      */
//     public CrashlyticsTree(Context ctx){
//         Fabric.with(ctx, new Crashlytics());
//     }
// 
//     @Override
//     protected void log(int priority, String tag, String message, Throwable t) {
//         throwShade(priority, tag, message, t);
//     }
// 
//     private void throwShade(int priority, String tag, String message, Throwable t) {
//         if (message == null || message.length() == 0) {
//             if (t != null) {
//                 message = Log.getStackTraceString(t);
//             } else {
//                 // Swallow message if it's null and there's no throwable.
//                 return;
//             }
//         } else if (t != null) {
//             message += "\n" + Log.getStackTraceString(t);
//         }
// 
//         if (message.length() < 4000) {
//             log(priority, tag, message);
//         } else {
//             // It's rare that the message will be this large, so we're ok with the perf hit of splitting
//             // and calling Log.println N times.  It's possible but unlikely that a single line will be
//             // longer than 4000 characters: we're explicitly ignoring this case here.
//             String[] lines = message.split("\n");
//             for (String line : lines) {
//                 log(priority, tag, line);
//             }
//         }
//     }
// 
//     /**
//      * Convienence function for logging to the crashlytics server
//      *
//      * @param priority      the logging priority
//      * @param tag           the log tag
//      * @param message       the log message
//      */
//     private void log(int priority, String tag, String message){
//         Crashlytics.log(priority, tag, message);
//     }
// }


import android.app.Application;
import android.app.Service;
import android.content.Context;
import com.crashlytics.android.Crashlytics;
import com.r0adkll.postoffice.PostOffice;
import com.r0adkll.postoffice.model.Design;
import com.r0adkll.postoffice.model.Stamp;
import com.ftinc.showcase.utils.CrashlyticsTree;
import dagger.ObjectGraph;
import hugo.weaving.DebugLog;
import io.fabric.sdk.android.Fabric;
import ollie.Ollie;
import timber.log.Timber;
package com.ftinc.showcase;




/**
 * Created by drew.heavner on 2/27/14.
 */
public class ShowcaseApp extends Application {

    public static final String DB_NAME = "Showcase.db";
    public static final int DB_VERSION = 1;

    private ObjectGraph objectGraph;

    @Override
    public void onCreate() {

        if(BuildConfig.DEBUG){
            Timber.plant(new Timber.DebugTree());
// Path: app/src/main/java/com/ftinc/showcase/utils/CrashlyticsTree.java
// public class CrashlyticsTree extends Timber.Tree {
// 
//     /**
//      * Constructor
//      * @param ctx
//      */
//     public CrashlyticsTree(Context ctx){
//         Fabric.with(ctx, new Crashlytics());
//     }
// 
//     @Override
//     protected void log(int priority, String tag, String message, Throwable t) {
//         throwShade(priority, tag, message, t);
//     }
// 
//     private void throwShade(int priority, String tag, String message, Throwable t) {
//         if (message == null || message.length() == 0) {
//             if (t != null) {
//                 message = Log.getStackTraceString(t);
//             } else {
//                 // Swallow message if it's null and there's no throwable.
//                 return;
//             }
//         } else if (t != null) {
//             message += "\n" + Log.getStackTraceString(t);
//         }
// 
//         if (message.length() < 4000) {
//             log(priority, tag, message);
//         } else {
//             // It's rare that the message will be this large, so we're ok with the perf hit of splitting
//             // and calling Log.println N times.  It's possible but unlikely that a single line will be
//             // longer than 4000 characters: we're explicitly ignoring this case here.
//             String[] lines = message.split("\n");
//             for (String line : lines) {
//                 log(priority, tag, line);
//             }
//         }
//     }
// 
//     /**
//      * Convienence function for logging to the crashlytics server
//      *
//      * @param priority      the logging priority
//      * @param tag           the log tag
//      * @param message       the log message
//      */
//     private void log(int priority, String tag, String message){
//         Crashlytics.log(priority, tag, message);
//     }
// }


// Path: app/src/main/java/com/ftinc/showcase/ShowcaseApp.java
import android.app.Application;
import android.app.Service;
import android.content.Context;
import com.crashlytics.android.Crashlytics;
import com.r0adkll.postoffice.PostOffice;
import com.r0adkll.postoffice.model.Design;
import com.r0adkll.postoffice.model.Stamp;
import com.ftinc.showcase.utils.CrashlyticsTree;
import dagger.ObjectGraph;
import hugo.weaving.DebugLog;
import io.fabric.sdk.android.Fabric;
import ollie.Ollie;
import timber.log.Timber;

package com.ftinc.showcase;




/**
 * Created by drew.heavner on 2/27/14.
 */
public class ShowcaseApp extends Application {

    public static final String DB_NAME = "Showcase.db";
    public static final int DB_VERSION = 1;

    private ObjectGraph objectGraph;

    @Override
    public void onCreate() {

        if(BuildConfig.DEBUG){
            Timber.plant(new Timber.DebugTree());
            Timber.plant(new CrashlyticsTree(this));