    public void run() {
        while (!shutdown) {
            if (paused) {
                try {
                    Thread.sleep(100);
                } catch (InterruptedException e) {
                }
            } else {
                if (!photosToLoad.isEmpty()) {
                    for (final ImageView icon : photosToLoad.keySet()) {
                        Long contactId = photosToLoad.get(icon);
                        Drawable drawable = null;
                        InputStream photoStream;
                        if ((photoStream = BirthdayProvider.openPhoto(ctx, contactId)) != null) {
                            drawable = Drawable.createFromStream(photoStream, "src");
                        }
                        cache.put(contactId, drawable == null ? DEFAULT_PHOTO : drawable);
                        photosToLoad.remove(icon);
                        updateImage(icon, drawable);
                    }
                }
            }
        }
    }

    public void run() {
        while (!shutdown) {
            if (paused) {
                try {
                    Thread.sleep(100);
                } catch (InterruptedException e) {
                }
            } else {
                if (!photosToLoad.isEmpty()) {
                    for (final ImageView icon : photosToLoad.keySet()) {
                        Long contactId = photosToLoad.get(icon);
                        Drawable drawable = null;
                        InputStream photoStream;
                        if ((photoStream = BirthdayProvider.openPhoto(ctx, contactId)) != null) {
                            try {
                                drawable = Drawable.createFromStream(photoStream, "src");
                            } catch (Throwable e) {
                                Log.i("PhotoLoader", "Error loading photo.", e);
                            }
                        }
                        cache.put(contactId, drawable == null ? DEFAULT_PHOTO : drawable);
                        photosToLoad.remove(icon);
                        updateImage(icon, drawable);
                    }
                }
            }
        }
    }
