Bug 1524868 - StartActivity must be called from Activity context and not Application context.;r=VladBaicu
authorBrad Arant <brad.arant@softvision.com>
Fri, 24 May 2019 15:11:23 +0000
changeset 535579 8194de6da1c74fe2d5332409c66f6e684e380e44
parent 535578 c22d5fec86279089d33bea9a356bbd3f310a4f8b
child 535580 5de195a1e854f83fe5a5ae8f86af8cfc48a4d2d2
push id11522
push userffxbld-merge
push dateMon, 01 Jul 2019 09:00:55 +0000
treeherdermozilla-beta@53ea74d2bd09 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersVladBaicu
bugs1524868
milestone69.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 1524868 - StartActivity must be called from Activity context and not Application context.;r=VladBaicu 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.