Bug 1524868 - StartActivity must be called from Activity context and not Application context.;r=VladBaicu a=jcristau
authorBrad Arant <brad.arant@softvision.com>
Fri, 24 May 2019 15:11:23 +0000
changeset 536694 11ffae4160639b957b802235977a93ffe8bdfce9
parent 536693 4bd74b23ffb6ede616a02b8e834c09c6ae31d898
child 536695 023ce53e3a94f9d306aef2ed07e5587784dc5a3a
push id2082
push userffxbld-merge
push dateMon, 01 Jul 2019 08:34:18 +0000
treeherdermozilla-release@2fb19d0466d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersVladBaicu, jcristau
bugs1524868
milestone68.0
Bug 1524868 - StartActivity must be called from Activity context and not Application context.;r=VladBaicu a=jcristau Differential Revision: https://phabricator.services.mozilla.com/D32481
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
@@ -1138,17 +1138,17 @@ public class BrowserApp extends GeckoApp
         super.onPictureInPictureModeChanged(isInPictureInPictureMode, newConfig);
 
         if (!isInPictureInPictureMode) {
             mPipController.cleanResources();
 
             // User clicked a new link to be opened in Firefox.
             // We returned from Picture-in-picture mode and now must try to open that link.
             if (startingIntentAfterPip != null) {
-                getApplication().startActivity(startingIntentAfterPip);
+                startActivity(startingIntentAfterPip);
                 startingIntentAfterPip = null;
             } else {
                 // Get if the user pressed in the PIP window to return to full app or closed it entirely
                 // by checking if the activity received onStop() or not.
                 final boolean userReturnedToFullApp = !isApplicationInBackground();
 
                 // After returning from Picture-in-picture mode the video can still be playing
                 // in fullscreen. But now we have the status bar showing.