mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 1245368 - Add telemetry for home panel customizations. r=margaret
--HG-- extra : commitid : FzwCo2JUj16 extra : rebase_source : 3d6feee846a39f3f8effe989105865744f44207a
This commit is contained in:
parent
f3588d3bb3
commit
2377b84030
@ -33,7 +33,9 @@ import org.mozilla.gecko.gfx.ImmutableViewportMetrics;
|
||||
import org.mozilla.gecko.gfx.LayerView;
|
||||
import org.mozilla.gecko.home.BrowserSearch;
|
||||
import org.mozilla.gecko.home.HomeBanner;
|
||||
import org.mozilla.gecko.home.HomeConfig;
|
||||
import org.mozilla.gecko.home.HomeConfig.PanelType;
|
||||
import org.mozilla.gecko.home.HomeConfigPrefsBackend;
|
||||
import org.mozilla.gecko.home.HomePager;
|
||||
import org.mozilla.gecko.home.HomePager.OnUrlOpenInBackgroundListener;
|
||||
import org.mozilla.gecko.home.HomePager.OnUrlOpenListener;
|
||||
@ -1748,6 +1750,9 @@ public class BrowserApp extends GeckoApp
|
||||
Telemetry.addToHistogram("BROWSER_IS_USER_DEFAULT", (isDefaultBrowser(Intent.ACTION_VIEW) ? 1 : 0));
|
||||
Telemetry.addToHistogram("FENNEC_TABQUEUE_ENABLED", (TabQueueHelper.isTabQueueEnabled(BrowserApp.this) ? 1 : 0));
|
||||
Telemetry.addToHistogram("FENNEC_CUSTOM_HOMEPAGE", (TextUtils.isEmpty(getHomepage()) ? 0 : 1));
|
||||
final SharedPreferences prefs = GeckoSharedPrefs.forProfile(getContext());
|
||||
final boolean hasCustomHomepanels = prefs.contains(HomeConfigPrefsBackend.PREFS_CONFIG_KEY) || prefs.contains(HomeConfigPrefsBackend.PREFS_CONFIG_KEY_OLD);
|
||||
Telemetry.addToHistogram("FENNEC_HOMEPANELS_CUSTOM", hasCustomHomepanels ? 1 : 0);
|
||||
|
||||
if (Versions.feature16Plus) {
|
||||
Telemetry.addToHistogram("BROWSER_IS_ASSIST_DEFAULT", (isDefaultBrowser(Intent.ACTION_ASSIST) ? 1 : 0));
|
||||
|
@ -33,17 +33,17 @@ import android.support.v4.content.LocalBroadcastManager;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
class HomeConfigPrefsBackend implements HomeConfigBackend {
|
||||
public class HomeConfigPrefsBackend implements HomeConfigBackend {
|
||||
private static final String LOGTAG = "GeckoHomeConfigBackend";
|
||||
|
||||
// Increment this to trigger a migration.
|
||||
private static final int VERSION = 3;
|
||||
|
||||
// This key was originally used to store only an array of panel configs.
|
||||
private static final String PREFS_CONFIG_KEY_OLD = "home_panels";
|
||||
public static final String PREFS_CONFIG_KEY_OLD = "home_panels";
|
||||
|
||||
// This key is now used to store a version number with the array of panel configs.
|
||||
private static final String PREFS_CONFIG_KEY = "home_panels_with_version";
|
||||
public static final String PREFS_CONFIG_KEY = "home_panels_with_version";
|
||||
|
||||
// Keys used with JSON object stored in prefs.
|
||||
private static final String JSON_KEY_PANELS = "panels";
|
||||
|
@ -5156,6 +5156,13 @@
|
||||
"description": "Time for the home screen Top Sites query to return with no filter set (ms)",
|
||||
"cpp_guard": "ANDROID"
|
||||
},
|
||||
"FENNEC_HOMEPANELS_CUSTOM": {
|
||||
"expires_in_version": "54",
|
||||
"kind": "boolean",
|
||||
"bug_numbers": [1245368],
|
||||
"description": "Whether the user has customized their homepanels",
|
||||
"cpp_guard": "ANDROID"
|
||||
},
|
||||
"FENNEC_WAS_KILLED": {
|
||||
"expires_in_version": "never",
|
||||
"kind": "flag",
|
||||
|
Loading…
Reference in New Issue
Block a user