summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/Tab.java
diff options
context:
space:
mode:
authorMichael Kolb <kolby@google.com>2012-05-03 15:42:15 -0700
committerMichael Kolb <kolby@google.com>2012-05-07 16:03:33 -0700
commit7286427ee44435acf5f0ccd1146d9d0b15a36d02 (patch)
tree9212c24efe30c10ddb1c02329543daeabe4bf99b /src/com/android/browser/Tab.java
parent52eafbb7601eac6ce0011edeb2a73ffccb6fb751 (diff)
downloadpackages_apps_Browser-7286427ee44435acf5f0ccd1146d9d0b15a36d02.zip
packages_apps_Browser-7286427ee44435acf5f0ccd1146d9d0b15a36d02.tar.gz
packages_apps_Browser-7286427ee44435acf5f0ccd1146d9d0b15a36d02.tar.bz2
Don't capture picture
Bug: 6439427 Change-Id: I7704d8c81bbb9e612faf3a3206cee245e746035b
Diffstat (limited to 'src/com/android/browser/Tab.java')
-rw-r--r--src/com/android/browser/Tab.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/com/android/browser/Tab.java b/src/com/android/browser/Tab.java
index 712e30a..28734bd 100644
--- a/src/com/android/browser/Tab.java
+++ b/src/com/android/browser/Tab.java
@@ -185,6 +185,7 @@ class Tab implements PictureListener {
private int mCaptureHeight;
private Bitmap mCapture;
private Handler mHandler;
+ private boolean mUpdateThumbnail;
/**
* See {@link #clearBackStackWhenItemAdded(String)}.
@@ -334,6 +335,7 @@ class Tab implements PictureListener {
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
mInPageLoad = true;
+ mUpdateThumbnail = true;
mPageLoadProgress = INITIAL_PROGRESS;
mCurrentState = new PageState(mContext,
view.isPrivateBrowsingEnabled(), url, favicon);
@@ -792,6 +794,9 @@ class Tab implements PictureListener {
mInPageLoad = false;
}
mWebViewController.onProgressChanged(Tab.this);
+ if (mUpdateThumbnail && newProgress == 100) {
+ mUpdateThumbnail = false;
+ }
}
@Override
@@ -1203,6 +1208,10 @@ class Tab implements PictureListener {
};
}
+ public boolean shouldUpdateThumbnail() {
+ return mUpdateThumbnail;
+ }
+
/**
* This is used to get a new ID when the tab has been preloaded, before it is displayed and
* added to TabControl. Preloaded tabs can be created before restoreInstanceState, leading
@@ -1925,7 +1934,6 @@ class Tab implements PictureListener {
@Override
public void onNewPicture(WebView view, Picture picture) {
- //update screenshot
postCapture();
}