Bug 1509342 - Move startService() call to BrowserApp.onResume() to guarantee we're foregrounded. r=snorp
authorDylan Roeh <droeh@mozilla.com>
Tue, 27 Nov 2018 10:10:06 -0600
changeset 504849 c59f82a36a288b620ab0825110ccb0bc6f4f180f
parent 504848 7930771be5507d20e7b06cdf66f26840ad6e4978
child 504850 052522c1bc3b62b1c8589dd58dc8be01d67e239a
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp
bugs1509342
milestone65.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 1509342 - Move startService() call to BrowserApp.onResume() to guarantee we're foregrounded. r=snorp
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
@@ -611,19 +611,16 @@ public class BrowserApp extends GeckoApp
         }
         return super.onKeyUp(keyCode, event);
     }
 
     @Override
     public void onCreate(Bundle savedInstanceState) {
         final Context appContext = getApplicationContext();
 
-        final Intent killerIntent = new Intent(this, FennecKiller.class);
-        startService(killerIntent);
-
         showSplashScreen = true;
 
         safeStartingIntent = new SafeIntent(getIntent());
         isInAutomation = IntentUtils.getIsInAutomationFromEnvironment(safeStartingIntent);
 
         GeckoProfile.setIntentArgs(safeStartingIntent.getStringExtra("args"));
 
         if (!isInAutomation && AppConstants.MOZ_ANDROID_DOWNLOAD_CONTENT_SERVICE) {
@@ -1021,16 +1018,19 @@ public class BrowserApp extends GeckoApp
     @Override
     public void onResume() {
         super.onResume();
 
         if (mIsAbortingAppLaunch) {
             return;
         }
 
+        final Intent killerIntent = new Intent(this, FennecKiller.class);
+        startService(killerIntent);
+
         if (!mHasResumed) {
             getAppEventDispatcher().unregisterUiThreadListener(this, "Prompt:ShowTop");
             mHasResumed = true;
         }
 
         processTabQueue();
 
         for (BrowserAppDelegate delegate : delegates) {