Bug 1386712 - Load about:blank in CustomTabsActivity.finish() to immediately stop media playback. r=snorp
authorDylan Roeh <droeh@mozilla.com>
Tue, 19 Sep 2017 15:09:16 -0500
changeset 433123 c86578718e191af2dac78dfde75b002448ea80ec
parent 433122 2558072d1c5f1d951a0e9011c07f043676212ee7
child 433124 8871efefdba925fd4fa7e8741cb545dd64131271
push id8114
push userjlorenzo@mozilla.com
push dateThu, 02 Nov 2017 16:33:21 +0000
treeherdermozilla-beta@73e0d89a540f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp
bugs1386712
milestone58.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 1386712 - Load about:blank in CustomTabsActivity.finish() to immediately stop media playback. r=snorp
mobile/android/base/java/org/mozilla/gecko/customtabs/CustomTabsActivity.java
--- a/mobile/android/base/java/org/mozilla/gecko/customtabs/CustomTabsActivity.java
+++ b/mobile/android/base/java/org/mozilla/gecko/customtabs/CustomTabsActivity.java
@@ -213,16 +213,18 @@ public class CustomTabsActivity extends 
             return IntentUtil.getAnimationPackageName(new SafeIntent(getIntent()));
         } else {
             return super.getPackageName();
         }
     }
 
     @Override
     public void finish() {
+        mGeckoView.loadUri("about:blank");
+
         super.finish();
 
         final SafeIntent intent = new SafeIntent(getIntent());
         // When 3rd party app launch this Activity, it could also specify custom exit-animation.
         if (IntentUtil.hasExitAnimation(intent)) {
             usingCustomAnimation = true;
             overridePendingTransition(IntentUtil.getEnterAnimationRes(intent),
                     IntentUtil.getExitAnimationRes(intent));