Bug 1351556 - Collect information on the number of users using PWA. r=sebastian
authorNevin Chen <cnevinchen@gmail.com>
Thu, 06 Apr 2017 17:29:53 +0800
changeset 352142 ac21e09b76bd385e0d853f1c788b4040281771be
parent 352141 4721f0c609d4d9bdd5c8e860ec0fee29921e5f69
child 352143 eaeef79b2bbfe1421a66c47a38af931761015ed1
push id31632
push userkwierso@gmail.com
push dateMon, 10 Apr 2017 21:54:18 +0000
treeherdermozilla-central@d7b81b700d75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssebastian
bugs1351556
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1351556 - Collect information on the number of users using PWA. r=sebastian MozReview-Commit-ID: CyVFQUtd5Aw
mobile/android/base/java/org/mozilla/gecko/webapps/WebAppActivity.java
--- a/mobile/android/base/java/org/mozilla/gecko/webapps/WebAppActivity.java
+++ b/mobile/android/base/java/org/mozilla/gecko/webapps/WebAppActivity.java
@@ -26,16 +26,18 @@ import android.widget.TextView;
 import org.json.JSONObject;
 import org.json.JSONException;
 
 import org.mozilla.gecko.AppConstants;
 import org.mozilla.gecko.EventDispatcher;
 import org.mozilla.gecko.GeckoApp;
 import org.mozilla.gecko.GeckoAppShell;
 import org.mozilla.gecko.GeckoProfile;
+import org.mozilla.gecko.Telemetry;
+import org.mozilla.gecko.TelemetryContract;
 import org.mozilla.gecko.icons.decoders.FaviconDecoder;
 import org.mozilla.gecko.mozglue.SafeIntent;
 import org.mozilla.gecko.R;
 import org.mozilla.gecko.Tab;
 import org.mozilla.gecko.Tabs;
 import org.mozilla.gecko.util.ColorUtil;
 import org.mozilla.gecko.util.EventCallback;
 import org.mozilla.gecko.util.FileUtils;
@@ -50,16 +52,18 @@ public class WebAppActivity extends Geck
 
     private TextView mUrlView;
     private String mManifestPath;
 
     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
 
+        Telemetry.sendUIEvent(TelemetryContract.Event.LOAD_URL, TelemetryContract.Method.INTENT, "webapp");
+
         if (savedInstanceState != null) {
             mManifestPath = savedInstanceState.getString(WebAppActivity.MANIFEST_PATH, null);
         } else {
             mManifestPath = getIntent().getStringExtra(WebAppActivity.MANIFEST_PATH);
         }
         loadManifest(mManifestPath);
 
         final Toolbar toolbar = (Toolbar) findViewById(R.id.actionbar);
@@ -149,16 +153,17 @@ public class WebAppActivity extends Geck
 
         final SafeIntent intent = new SafeIntent(externalIntent);
         final String launchUrl = intent.getDataString();
         final String currentUrl = Tabs.getInstance().getSelectedTab().getURL();
         final boolean isSameDomain = Uri.parse(currentUrl).getHost()
             .equals(Uri.parse(launchUrl).getHost());
 
         if (!isSameDomain) {
+            Telemetry.sendUIEvent(TelemetryContract.Event.LOAD_URL, TelemetryContract.Method.INTENT, "webapp");
             mManifestPath = externalIntent.getStringExtra(WebAppActivity.MANIFEST_PATH);
             loadManifest(mManifestPath);
             Tabs.getInstance().loadUrl(launchUrl);
         }
     }
 
     private void loadManifest(String manifestPath) {
         if (manifestPath == null) {