diff --git a/android/src/com/mapswithme/maps/MwmApplication.java b/android/src/com/mapswithme/maps/MwmApplication.java index f12bc7a506..7bf3d5ceef 100644 --- a/android/src/com/mapswithme/maps/MwmApplication.java +++ b/android/src/com/mapswithme/maps/MwmApplication.java @@ -107,9 +107,6 @@ public class MwmApplication extends Application initHockeyApp(); initCrashlytics(); initPushWoosh(); - // Workaround to initialize alohalytics for transferring http requests. - // Http wrapper should be cut out from the alohalytics in the future. - Statistics s = Statistics.INSTANCE; String settingsPath = getSettingsPath(); new File(settingsPath).mkdirs(); @@ -119,6 +116,10 @@ public class MwmApplication extends Application nativeInitPlatform(getApkPath(), getStoragePath(settingsPath), getTempPath(), getObbGooglePath(), BuildConfig.FLAVOR, BuildConfig.BUILD_TYPE, UiUtils.isTablet()); + // Workaround to initialize alohalytics for transferring http requests. + // Http wrapper should be cut out from the alohalytics in the future. + Statistics s = Statistics.INSTANCE; + mPrefs = getSharedPreferences(getString(R.string.pref_file_name), MODE_PRIVATE); mBackgroundTracker = new AppBackgroundTracker(); TrackRecorder.init();