From 68bc9d986e8eb882dc5f15defea0dab45c440ab6 Mon Sep 17 00:00:00 2001 From: Chris Wren Date: Thu, 25 Oct 2012 14:50:28 -0400 Subject: handle image queues of length one. Bug: 7414275 Change-Id: Id105490bc30ef6f6fcdbcd9e5f5afd10c35f3c99 --- src/com/android/dreams/phototable/PhotoSource.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/android/dreams/phototable/PhotoSource.java b/src/com/android/dreams/phototable/PhotoSource.java index a1ca289..7f1dd51 100644 --- a/src/com/android/dreams/phototable/PhotoSource.java +++ b/src/com/android/dreams/phototable/PhotoSource.java @@ -124,8 +124,9 @@ public abstract class PhotoSource { imageData = mImageQueue.poll(); } - if (!mImageQueue.isEmpty()) { + if (imageData != null) { image = load(imageData, options, longSide, shortSide); + imageData = null; } tries++; -- cgit v1.2.3