Bug 1396065 - [3.0] Only handle external links in the navigation listener in the example app. r=snorp
authorEugen Sawin <esawin@mozilla.com>
Fri, 01 Sep 2017 20:41:51 +0200
changeset 428496 8886840becc88c60eb76a42531a30123414fc154
parent 428495 83e6e35ab72be905a8bca44aed31e5b5fda5dffb
child 428497 24aaf120e7a9f19ce3ba1134c471938c8e4d3278
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp
bugs1396065
milestone57.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 1396065 - [3.0] Only handle external links in the navigation listener in the example app. r=snorp
mobile/android/geckoview_example/src/main/java/org/mozilla/geckoview_example/GeckoViewActivity.java
--- a/mobile/android/geckoview_example/src/main/java/org/mozilla/geckoview_example/GeckoViewActivity.java
+++ b/mobile/android/geckoview_example/src/main/java/org/mozilla/geckoview_example/GeckoViewActivity.java
@@ -281,13 +281,16 @@ public class GeckoViewActivity extends A
         public void onCanGoForward(GeckoView view, boolean value) {
         }
 
         @Override
         public boolean onLoadUri(final GeckoView view, final String uri,
                                  final TargetWindow where) {
             Log.d(LOGTAG, "onLoadUri=" + uri +
                           " where=" + where);
+            if (where != TargetWindow.NEW) {
+                return false;
+            }
             view.loadUri(uri);
             return true;
         }
     }
 }