don't crash when crashlytics didn't get built in correctly

This commit is contained in:
Eric House 2017-06-27 07:34:04 -07:00
parent d454ffb3e8
commit 33838e6a14

View file

@ -31,11 +31,11 @@ public class CrashTrack {
private static final String TAG = CrashTrack.class.getSimpleName();
public static void init( Context context ) {
if ( 0 < BuildConfig.FABRIC_API_KEY.length() ) {
// Crashlytics/Fabric sample code wants this between onCreate()'s
// super() call and the call to setContentView(). We'll see if
// this works.
try {
Fabric.with( context, new Crashlytics() );
// Now crash as a test
@ -53,6 +53,9 @@ public class CrashTrack {
}
} ).start();
}
} catch ( Exception ex ) {
Log.d( TAG, "problem initing crashlytics" );
}
}
}
}