Bug 1221646 - Report getInstallerPackageName() in telemetry. r=ahunt,liuche
authorSebastian Kaspari <s.kaspari@gmail.com>
Wed, 20 Jul 2016 11:58:35 +0200
changeset 331356 6a77bd1526331c3a09675d9950103c46a9ca5135
parent 331355 3b35d43491f5d0af16f35ea9d15aa9a451d5248f
child 331357 cde1abb38839b442944b5fb0f07b5543defb078b
push id9858
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 14:37:10 +0000
treeherdermozilla-aurora@203106ef6cb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahunt, liuche
bugs1221646
milestone50.0a1
Bug 1221646 - Report getInstallerPackageName() in telemetry. r=ahunt,liuche MozReview-Commit-ID: EiPNDsVam0x
mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
--- a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
+++ b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
@@ -761,16 +761,20 @@ public class BrowserApp extends GeckoApp
                       .run();
         }
 
         AudioFocusAgent.getInstance().attachToContext(this);
 
         for (final BrowserAppDelegate delegate : delegates) {
             delegate.onCreate(this, savedInstanceState);
         }
+
+        // We want to get an understanding of how our user base is spread (bug 1221646).
+        final String installerPackageName = getPackageManager().getInstallerPackageName(getPackageName());
+        Telemetry.sendUIEvent(TelemetryContract.Event.LAUNCH, TelemetryContract.Method.SYSTEM, "installer_" + installerPackageName);
     }
 
     /**
      * Gets whether or not we're in automation from the passed in environment variables.
      *
      * We need to read environment variables from the intent string
      * extra because environment variables from our test harness aren't set
      * until Gecko is loaded, and we need to know this before then.