diff --git a/android/src/com/mapswithme/maps/DownloadResourcesActivity.java b/android/src/com/mapswithme/maps/DownloadResourcesActivity.java index a02cbc8d5e..639c3539a5 100644 --- a/android/src/com/mapswithme/maps/DownloadResourcesActivity.java +++ b/android/src/com/mapswithme/maps/DownloadResourcesActivity.java @@ -343,7 +343,7 @@ public class DownloadResourcesActivity extends MapsWithMeBaseActivity } else { - if (!MWMApplication.get().isYota() && + if (!mApplication.isYota() && (getPackageIntent("com.mapswithme.maps") != null || getPackageIntent("com.mapswithme.maps.samsung") != null)) { @@ -368,7 +368,6 @@ public class DownloadResourcesActivity extends MapsWithMeBaseActivity super.onCreate(savedInstanceState); mApplication = (MWMApplication)getApplication(); - mApplication.onMwmStart(this); final boolean isPro = mApplication.isProVersion(); if (checkLiteProPackages(isPro)) diff --git a/android/src/com/mapswithme/maps/MWMActivity.java b/android/src/com/mapswithme/maps/MWMActivity.java index 57778eecfd..d8007c610c 100644 --- a/android/src/com/mapswithme/maps/MWMActivity.java +++ b/android/src/com/mapswithme/maps/MWMActivity.java @@ -649,6 +649,9 @@ public class MWMActivity extends NvEventQueueActivity super.onCreate(savedInstanceState); mApplication = (MWMApplication) getApplication(); + // Log app start events - successful installation means that user has passed DownloadResourcesActivity + mApplication.onMwmStart(this); + // Do not turn off the screen while benchmarking if (mApplication.nativeIsBenchmarking()) getWindow().addFlags(android.view.WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); diff --git a/android/src/com/mapswithme/util/FbUtil.java b/android/src/com/mapswithme/util/FbUtil.java index 357a26b5f4..b7372e9f71 100644 --- a/android/src/com/mapswithme/util/FbUtil.java +++ b/android/src/com/mapswithme/util/FbUtil.java @@ -14,35 +14,11 @@ public class FbUtil public static Logger mLogger = SimpleLogger.get("MWM_FB"); - public final static String[] SUPPORTED_PACKAGES = { - "com.mapswithme.maps", - "com.mapswithme.maps.pro", - }; - public static void activate(Context context) { if (!Statistics.INSTANCE.isStatisticsEnabled(context)) return; - final String thisPackageName = context.getPackageName(); - - boolean supported = false; - for (final String pkg : SUPPORTED_PACKAGES) - { - if (pkg.equals(thisPackageName)) - { - supported = true; - break; - } - } - - // do not try to activate if package is not registered in FB - if (!supported) - { - mLogger.d("SKIPPING ACTIVATION"); - return; - } - mLogger.d("ACTIVATING"); AppEventsLogger.activateApp(context, context.getString(R.string.fb_app_id)); }