diff options
author | John Reck <jreck@google.com> | 2011-07-11 09:28:24 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-07-11 09:28:25 -0700 |
commit | aec28a4b000c1e476c7c730f609cc04c0c8dc5b9 (patch) | |
tree | 2b65cc6198ac40aebfc2f3a808b38fe655dd62ef | |
parent | c994b5d66cc0c5f0b52f52caa49c51d7fec9b186 (diff) | |
parent | a169628f9424256e5bcf45807869c4c4eaa114c0 (diff) | |
download | packages_apps_browser-aec28a4b000c1e476c7c730f609cc04c0c8dc5b9.zip packages_apps_browser-aec28a4b000c1e476c7c730f609cc04c0c8dc5b9.tar.gz packages_apps_browser-aec28a4b000c1e476c7c730f609cc04c0c8dc5b9.tar.bz2 |
Merge "Fix bing images crash"
-rw-r--r-- | src/com/android/browser/Controller.java | 13 | ||||
-rw-r--r-- | src/com/android/browser/Tab.java | 5 |
2 files changed, 13 insertions, 5 deletions
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java index 09c7cd1..f4563bd 100644 --- a/src/com/android/browser/Controller.java +++ b/src/com/android/browser/Controller.java @@ -819,13 +819,16 @@ public class Controller if (!tab.isPrivateBrowsingEnabled() && !TextUtils.isEmpty(tab.getUrl()) && !tab.isSnapshot()) { + // Only update the bookmark screenshot if the user did not + // cancel the load early and there is not already + // a pending update for the tab. if (tab.inForeground() && !didUserStopLoading() || !tab.inForeground()) { - // Only update the bookmark screenshot if the user did not - // cancel the load early. - mHandler.sendMessageDelayed(mHandler.obtainMessage( - UPDATE_BOOKMARK_THUMBNAIL, 0, 0, tab), - 500); + if (!mHandler.hasMessages(UPDATE_BOOKMARK_THUMBNAIL, tab)) { + mHandler.sendMessageDelayed(mHandler.obtainMessage( + UPDATE_BOOKMARK_THUMBNAIL, 0, 0, tab), + 500); + } } } // pause the WebView timer and release the wake lock if it is finished diff --git a/src/com/android/browser/Tab.java b/src/com/android/browser/Tab.java index d8a3af9..62b574d 100644 --- a/src/com/android/browser/Tab.java +++ b/src/com/android/browser/Tab.java @@ -555,6 +555,11 @@ class Tab { @Override public void onPageFinished(WebView view, String url) { + if (!mInPageLoad) { + // In page navigation links (www.something.com#footer) will + // trigger an onPageFinished which we don't care about. + return; + } if (!isPrivateBrowsingEnabled()) { LogTag.logPageFinishedLoading( url, SystemClock.uptimeMillis() - mLoadStartTime); |