summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorMichael Kolb <kolby@google.com>2011-08-02 11:27:12 -0700
committerMichael Kolb <kolby@google.com>2011-08-02 11:34:39 -0700
commitbd4c00a61a44637e04efeb837da490a2b51b11c1 (patch)
tree70d53626aae24a5adee51d71cfaf6c9cc1a3814b /src/com
parentdcffae4ac85da22ce6fb441e943527ebf4491ec2 (diff)
downloadpackages_apps_Browser-bd4c00a61a44637e04efeb837da490a2b51b11c1.zip
packages_apps_Browser-bd4c00a61a44637e04efeb837da490a2b51b11c1.tar.gz
packages_apps_Browser-bd4c00a61a44637e04efeb837da490a2b51b11c1.tar.bz2
fix restore capture bug
Bug: 5101265 Not totally sure why this happens; we keep the crash happening so but add some error log line which will help us track down the cause of this Change-Id: I409f8bd20b25a8411ab5e2592903efafd96a2432
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/browser/Tab.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com/android/browser/Tab.java b/src/com/android/browser/Tab.java
index a4bcc99..cd209ed 100644
--- a/src/com/android/browser/Tab.java
+++ b/src/com/android/browser/Tab.java
@@ -2041,7 +2041,12 @@ class Tab implements PictureListener {
if (mCapture == null) {
return;
}
- mCapture.copyPixelsFromBuffer(ByteBuffer.wrap(blob));
+ ByteBuffer buffer = ByteBuffer.wrap(blob);
+ if (buffer.capacity() != blob.length) {
+ Log.e(LOGTAG, "Load capture has mismatched sizes: "
+ + buffer.capacity() + " vs " + blob.length);
+ }
+ mCapture.copyPixelsFromBuffer(buffer);
}
}