summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlikaid <likaid@codeaurora.org>2015-09-02 17:15:22 +0800
committerlikaid <likaid@codeaurora.org>2015-09-02 17:15:22 +0800
commitbdaae0e11d5ff15a08b15c7681a94f9882b57043 (patch)
treef5923f4aca3f0869b806fd5bcbfc620a59ef5678 /src
parent8c1ad5f993284e888a719e301d50eca41643d0fb (diff)
downloadandroid_packages_apps_Snap-bdaae0e11d5ff15a08b15c7681a94f9882b57043.tar.gz
android_packages_apps_Snap-bdaae0e11d5ff15a08b15c7681a94f9882b57043.tar.bz2
android_packages_apps_Snap-bdaae0e11d5ff15a08b15c7681a94f9882b57043.zip
SnapdragonCamera: Fix the preview thumbnail issue
When set the preview thumbnail imageView to visible, it used the drawable resource in cache which was set since last time. That caused we still could see the preview thumbnail though the bitmap was invalid. Clear the drawable resource in cache when the preview thumbnail is invalid. Change-Id: Id37620d32b8dff8dd3cad0f33da678b8709e6ee1 CRs-Fixed: 899905
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/CameraActivity.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/com/android/camera/CameraActivity.java b/src/com/android/camera/CameraActivity.java
index 35d3a8140..0bd45cdcd 100644
--- a/src/com/android/camera/CameraActivity.java
+++ b/src/com/android/camera/CameraActivity.java
@@ -798,6 +798,8 @@ public class CameraActivity extends Activity
protected void onPostExecute(Bitmap bitmap) {
if (bitmap == null) {
if (mThumbnail != null) {
+ // Clear the image resource when the bitmap is invalid.
+ mThumbnail.setImageDrawable(null);
mThumbnail.setVisibility(View.GONE);
}
} else {