From 4d9a07165931f4da7ced90f73c58513793f6c294 Mon Sep 17 00:00:00 2001 From: Vladimir Vukicevic Date: Thu, 28 Jun 2012 09:42:32 -0400 Subject: [PATCH] b=766998; fennec profiling broken by webapp intent changes; r=wesj --- mobile/android/base/GeckoApp.java | 2 +- mobile/android/base/GeckoThread.java | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/mobile/android/base/GeckoApp.java b/mobile/android/base/GeckoApp.java index b8d6f287722f..c143dd8cb997 100644 --- a/mobile/android/base/GeckoApp.java +++ b/mobile/android/base/GeckoApp.java @@ -2152,7 +2152,7 @@ abstract public class GeckoApp return uri; final String action = intent.getAction(); - if (action.startsWith(ACTION_WEBAPP_PREFIX) || ACTION_BOOKMARK.equals(action)) { + if ((action != null && action.startsWith(ACTION_WEBAPP_PREFIX)) || ACTION_BOOKMARK.equals(action)) { uri = intent.getStringExtra("args"); if (uri != null && uri.startsWith("--url=")) { uri.replace("--url=", ""); diff --git a/mobile/android/base/GeckoThread.java b/mobile/android/base/GeckoThread.java index 7980c71ac0ea..e8d050d58229 100644 --- a/mobile/android/base/GeckoThread.java +++ b/mobile/android/base/GeckoThread.java @@ -73,9 +73,12 @@ public class GeckoThread extends Thread { // find the right intent type final String action = mIntent.getAction(); - String type = action.startsWith(GeckoApp.ACTION_WEBAPP_PREFIX) ? "-webapp" : - GeckoApp.ACTION_BOOKMARK.equals(action) ? "-bookmark" : - null; + String type = null; + + if (action != null && action.startsWith(GeckoApp.ACTION_WEBAPP_PREFIX)) + type = "-webapp"; + else if (GeckoApp.ACTION_BOOKMARK.equals(action)) + type = "-bookmark"; String args = mIntent.getStringExtra("args");