[android] Fixed jni crash when statistics was disabled.

This commit is contained in:
Alex Zolotarev 2015-09-23 09:04:41 -07:00
parent b206273860
commit 749937a6c5

View file

@ -274,10 +274,12 @@ public enum Statistics
myParams.setTrackingPreinstallsEnabled(true);
myParams.setTrackingLaunchEnabled(true);
MRMyTracker.initTracker();
org.alohalytics.Statistics.setDebugMode(BuildConfig.DEBUG);
org.alohalytics.Statistics.setup(PrivateVariables.alohalyticsUrl(), context);
}
// At the moment, need to always initialize engine for correct JNI http part reusing.
// Statistics is still enabled/disabled separately and never sent anywhere if turned off.
// TODO(AlexZ): Remove this initialization dependency from JNI part.
org.alohalytics.Statistics.setDebugMode(BuildConfig.DEBUG);
org.alohalytics.Statistics.setup(PrivateVariables.alohalyticsUrl(), context);
}
public void stopActivity(Activity activity)