Flavor differentiation for statistics switching.

This commit is contained in:
Dmitry Yunitsky 2015-02-10 12:25:17 +03:00 committed by Alex Zolotarev
parent 46f5390e00
commit c8fe5e913c
2 changed files with 3 additions and 12 deletions

View file

@ -1,6 +1,5 @@
package com.mapswithme.maps.settings;
import android.app.ActionBar;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.BroadcastReceiver;
@ -9,7 +8,6 @@ import android.content.DialogInterface;
import android.content.Intent;
import android.net.MailTo;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.preference.CheckBoxPreference;
import android.preference.ListPreference;
@ -45,7 +43,7 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
private static final String COPYRIGHT_HTML_URL = "file:///android_asset/copyright.html";
private static final String FAQ_HTML_URL = "file:///android_asset/faq.html";
private Preference mStoragePreference = null;
private Preference mStoragePreference;
private StoragePathManager mPathManager = new StoragePathManager();
@SuppressWarnings("deprecation")
@ -54,14 +52,7 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
{
super.onCreate(savedInstanceState);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB)
{
// http://stackoverflow.com/questions/6867076/getactionbar-returns-null
final ActionBar bar = getActionBar();
if (bar != null)
bar.setDisplayHomeAsUpEnabled(true);
}
// TODO refactor. use preference fragments instead.
addPreferencesFromResource(R.xml.preferences);
initPreferences();
yotaSetup();

View file

@ -365,7 +365,7 @@ public enum Statistics
// We track if user turned on/off
// statistics to understand data better.
post(mEventBuilder
.setName(EventName.STATISTICS_STATUS_CHANGED)
.setName(EventName.STATISTICS_STATUS_CHANGED + " " + MWMApplication.get().getFirstInstallFlavor())
.addParam(EventParam.ENABLED, String.valueOf(isEnabled))
.buildEvent());
}