diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-09-28 06:49:35 -0400 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-09-28 06:49:35 -0400 |
commit | cbb77455ffea06b527e75a8abcea3d590cbe65b8 (patch) | |
tree | 1e6de177e8d3f62d016314aa4f65f42be4bc5a86 | |
parent | fbaf61eae57f46580bc48bc76185eef7dd797fa6 (diff) | |
parent | b7cc8b439dc595dc48e1c2183b35d23ad72dfbe5 (diff) | |
download | packages_apps_Browser-cbb77455ffea06b527e75a8abcea3d590cbe65b8.zip packages_apps_Browser-cbb77455ffea06b527e75a8abcea3d590cbe65b8.tar.gz packages_apps_Browser-cbb77455ffea06b527e75a8abcea3d590cbe65b8.tar.bz2 |
Merge change 27416 into eclair
* changes:
Only update the bookmark screenshot if the page completed loading fully (i.e. do not save a screenshot if the user canceled loading.
-rw-r--r-- | src/com/android/browser/BrowserActivity.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java index 91d4fd1..fd06d90 100644 --- a/src/com/android/browser/BrowserActivity.java +++ b/src/com/android/browser/BrowserActivity.java @@ -2276,6 +2276,7 @@ public class BrowserActivity extends Activity } /* package */ void stopLoading() { + mDidStopLoad = true; resetTitleAndRevertLockIcon(); WebView w = getTopWindow(); w.stopLoading(); @@ -2557,6 +2558,7 @@ public class BrowserActivity extends Activity CookieSyncManager.getInstance().resetSync(); mInLoad = true; + mDidStopLoad = false; showFakeTitleBar(); updateInLoadMenuItems(); if (!mIsNetworkUp) { @@ -2572,7 +2574,12 @@ public class BrowserActivity extends Activity // Reset the title and icon in case we stopped a provisional // load. resetTitleAndIcon(view); - updateScreenshot(view); + + if (!mDidStopLoad) { + // Only update the bookmark screenshot if the user did not + // cancel the load early. + updateScreenshot(view); + } // Update the lock icon image only once we are done loading updateLockIconToLatest(); @@ -4394,6 +4401,7 @@ public class BrowserActivity extends Activity private boolean mInLoad; private boolean mIsNetworkUp; + private boolean mDidStopLoad; private boolean mPageStarted; private boolean mActivityInPause = true; |