summaryrefslogtreecommitdiffstats
path: root/src/com/android/photos/drawables
diff options
context:
space:
mode:
authorBobby Georgescu <georgescu@google.com>2013-03-04 11:44:49 -0800
committerBobby Georgescu <georgescu@google.com>2013-03-05 17:37:31 -0800
commit8485a62af07a376e6741ff7c6b8c7c6b6d9ebc61 (patch)
tree0cb2cfc0e184118f28e5dcafaf976b85659ba485 /src/com/android/photos/drawables
parent542c3832c24909c6f43b9b91fed4931a850b2fef (diff)
downloadandroid_packages_apps_Snap-8485a62af07a376e6741ff7c6b8c7c6b6d9ebc61.tar.gz
android_packages_apps_Snap-8485a62af07a376e6741ff7c6b8c7c6b6d9ebc61.tar.bz2
android_packages_apps_Snap-8485a62af07a376e6741ff7c6b8c7c6b6d9ebc61.zip
Preliminary AlbumSet UI
Change-Id: Ie99bd2939bfcb47c80605cbb22b84b1064098e91
Diffstat (limited to 'src/com/android/photos/drawables')
-rw-r--r--src/com/android/photos/drawables/AutoThumbnailDrawable.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/photos/drawables/AutoThumbnailDrawable.java b/src/com/android/photos/drawables/AutoThumbnailDrawable.java
index 09b344147..b51b6709f 100644
--- a/src/com/android/photos/drawables/AutoThumbnailDrawable.java
+++ b/src/com/android/photos/drawables/AutoThumbnailDrawable.java
@@ -167,7 +167,9 @@ public abstract class AutoThumbnailDrawable<T> extends Drawable {
}
private void refreshSampleSizeLocked() {
- if (mBounds.isEmpty()) return;
+ if (mBounds.isEmpty() || mImageWidth == 0 || mImageHeight == 0) {
+ return;
+ }
int sampleSize = calculateSampleSizeLocked(mImageWidth, mImageHeight);
if (sampleSize != mSampleSize || mBitmap == null) {