@Override
        public final void accept(final Drawable newDrawable) {
            final boolean needsRedraw;
            synchronized (lock) {
                // Check for emptiness inside the call to match the behaviour in redrawQueuedDrawables().
                needsRedraw = REDRAW_QUEUE.isEmpty();
                REDRAW_QUEUE.add(ImmutablePair.of(this, newDrawable));
            }
            if (needsRedraw) {
                AndroidSchedulers.mainThread().scheduleDirect(REDRAW_QUEUED_DRAWABLES);
            }
        }
Container which can hold a drawable (initially an empty one) and get a newer version when it
becomes available. It also invalidates the view the container belongs to, so that it is
redrawn properly.
<p/>
When a new version of the drawable is available, it is put into a queue and, if needed (no other elements
waiting in the queue), a refresh is launched on the UI thread. This refresh will empty the queue (including
elements arrived in the meantime) and ensures that the view is uploaded only once all the queued requests have
been handled.
main/src/main/java/cgeo/geocaching/utils/ImageUtils.java