diff options
author | Chih-Chung Chang <chihchung@google.com> | 2009-05-25 11:16:48 +0800 |
---|---|---|
committer | Chih-Chung Chang <chihchung@google.com> | 2009-05-25 19:08:48 +0800 |
commit | 3b63aaa8fcd64b79dfd9f6921df538c313133474 (patch) | |
tree | b6fdd199ee2983f5fea2409989c9231c401e691e /src/com/android | |
parent | 059daa36dc6e83ca24a16d9b99925e71010bcceb (diff) | |
download | LegacyCamera-3b63aaa8fcd64b79dfd9f6921df538c313133474.zip LegacyCamera-3b63aaa8fcd64b79dfd9f6921df538c313133474.tar.gz LegacyCamera-3b63aaa8fcd64b79dfd9f6921df538c313133474.tar.bz2 |
Fix 1850846.
Drop the result from a previous request.
Diffstat (limited to 'src/com/android')
-rw-r--r-- | src/com/android/camera/ViewImage.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/android/camera/ViewImage.java b/src/com/android/camera/ViewImage.java index e28ccd8..9a78908 100644 --- a/src/com/android/camera/ViewImage.java +++ b/src/com/android/camera/ViewImage.java @@ -463,6 +463,13 @@ public class ViewImage extends Activity implements View.OnClickListener { public void imageLoaded(int pos, int offset, Bitmap bitmap, boolean isThumb) { // shouldn't get here after onPause() + + // We may get a result from a previous request. Ignore it. + if (pos != mCurrentPosition) { + bitmap.recycle(); + return; + } + if (isThumb) { mCache.put(pos + offset, bitmap); } |