Bug 1415778 - Pre: Don't use ANDROID_PACKAGE_NAME in GeckoView. r=jchen
authorNick Alexander <nalexander@mozilla.com>
Wed, 08 Nov 2017 21:15:12 -0800
changeset 443536 69e4021ca5407b40db6972dab22b90f7ca41aa5b
parent 443535 4eebab7d065ec743f96343bd32906b4c1dfdd70c
child 443537 cf5e219ebfdaa3267ce408809414fca54cedadca
push id8527
push userCallek@gmail.com
push dateThu, 11 Jan 2018 21:05:50 +0000
treeherdermozilla-beta@95342d212a7a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjchen
bugs1415778
milestone59.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 1415778 - Pre: Don't use ANDROID_PACKAGE_NAME in GeckoView. r=jchen MozReview-Commit-ID: FswHnEIBM35
mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoAppShell.java
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoAppShell.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoAppShell.java
@@ -108,17 +108,21 @@ public class GeckoAppShell
     private static final String LOGTAG = "GeckoAppShell";
 
     // We have static members only.
     private GeckoAppShell() { }
 
     private static final CrashHandler CRASH_HANDLER = new CrashHandler() {
         @Override
         protected String getAppPackageName() {
-            return AppConstants.ANDROID_PACKAGE_NAME;
+            final Context appContext = getAppContext();
+            if (appContext == null) {
+                return "<unknown>";
+            }
+            return appContext.getPackageName();
         }
 
         @Override
         protected Context getAppContext() {
             return getApplicationContext();
         }
 
         @Override