diff options
author | John Reck <jreck@google.com> | 2012-06-05 09:22:59 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2012-06-14 13:32:07 -0700 |
commit | 38b3965028e4ac433de9d43c02d3167ff0ef208c (patch) | |
tree | 231187b7128fffe0ed6d54591eb9c544ab4abe9d /src/com/android/browser/Tab.java | |
parent | c41c31925e30a989f12e2e20bfd6714e9975a0b1 (diff) | |
download | packages_apps_browser-38b3965028e4ac433de9d43c02d3167ff0ef208c.zip packages_apps_browser-38b3965028e4ac433de9d43c02d3167ff0ef208c.tar.gz packages_apps_browser-38b3965028e4ac433de9d43c02d3167ff0ef208c.tar.bz2 |
Disable URL overriding on redirects
Bug: 5334118
When sending an intent for a URL with specialized handlers, tag
it with an extra that will surpress subsequent redirections
Change-Id: I997aa79192baea86c58958ab213200d57ec4c4f9
Diffstat (limited to 'src/com/android/browser/Tab.java')
-rw-r--r-- | src/com/android/browser/Tab.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/com/android/browser/Tab.java b/src/com/android/browser/Tab.java index 0cf598f..7cb00d9 100644 --- a/src/com/android/browser/Tab.java +++ b/src/com/android/browser/Tab.java @@ -156,6 +156,7 @@ class Tab implements PictureListener { // If true, the tab is in page loading state (after onPageStarted, // before onPageFinsihed) private boolean mInPageLoad; + private boolean mDisableOverrideUrlLoading; // The last reported progress of the current page private int mPageLoadProgress; // The time the load started, used to find load page time @@ -373,6 +374,7 @@ class Tab implements PictureListener { @Override public void onPageFinished(WebView view, String url) { + mDisableOverrideUrlLoading = false; if (!isPrivateBrowsingEnabled()) { LogTag.logPageFinishedLoading( url, SystemClock.uptimeMillis() - mLoadStartTime); @@ -384,7 +386,7 @@ class Tab implements PictureListener { // return true if want to hijack the url to let another app to handle it @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { - if (mInForeground) { + if (!mDisableOverrideUrlLoading && mInForeground) { return mWebViewController.shouldOverrideUrlLoading(Tab.this, view, url); } else { @@ -1895,6 +1897,10 @@ class Tab implements PictureListener { } } + public void disableUrlOverridingForLoad() { + mDisableOverrideUrlLoading = true; + } + protected void capture() { if (mMainView == null || mCapture == null) return; if (mMainView.getContentWidth() <= 0 || mMainView.getContentHeight() <= 0) { |