forked from organicmaps/organicmaps
Merge pull request #4387 from alexzatsepin/crash-with-default-fabric-configuration
Fixed the crash during default Fabric initialization for external con…
This commit is contained in:
commit
306b0bd2ab
1 changed files with 9 additions and 1 deletions
|
@ -100,6 +100,11 @@ public class MwmApplication extends Application
|
|||
return sSelf.mPrefs;
|
||||
}
|
||||
|
||||
private static boolean isCrashlyticsEnabled()
|
||||
{
|
||||
return !BuildConfig.FABRIC_API_KEY.startsWith("0000");
|
||||
}
|
||||
|
||||
@SuppressWarnings("ResultOfMethodCallIgnored")
|
||||
@Override
|
||||
public void onCreate()
|
||||
|
@ -189,7 +194,7 @@ public class MwmApplication extends Application
|
|||
|
||||
private void initCrashlytics()
|
||||
{
|
||||
if (BuildConfig.FABRIC_API_KEY.startsWith("0000"))
|
||||
if (!isCrashlyticsEnabled())
|
||||
return;
|
||||
|
||||
Fabric.with(this, new Crashlytics(), new CrashlyticsNdk());
|
||||
|
@ -199,6 +204,9 @@ public class MwmApplication extends Application
|
|||
|
||||
private static boolean setInstallationIdToCrashlytics()
|
||||
{
|
||||
if (!isCrashlyticsEnabled())
|
||||
return false;
|
||||
|
||||
final String installationId = Utils.getInstallationId();
|
||||
// If installation id is not found this means id was not
|
||||
// generated by alohalytics yet and it is a first run.
|
||||
|
|
Loading…
Add table
Reference in a new issue