wantDownloaded.remove(loadPicture);
wantDownloaded.remove(pictureShowWant);
	public boolean next(boolean user) {		if (loadPicture != null && wantDownloaded.contains(loadPicture) && (loadPicture != userPicture || user)) {			// we no longer want the current picture			wantDownloaded.remove(loadPicture);		}		Picture picture;		synchronized(this) {			wantIndex++;			if (wantIndex >= pictures.size()) {				if (GalleryRemote._().properties.getBooleanProperty(SLIDESHOW_LOOP)) {					wantIndex = 0;				} else {					wantIndex = pictures.size() - 1;					return false;				}			}			// display next picture			picture = (Picture) pictures.get(wantIndex);			Log.log(Log.LEVEL_TRACE, MODULE, "Next picture: " + picture);		}		if (user) {			userPicture = picture;			updateProgress(picture, STATE_SKIPPING);			Log.log(Log.LEVEL_TRACE, MODULE, "Skipping sleep");			try {				Thread.sleep(skipTime);			} catch (InterruptedException e) {}			Log.log(Log.LEVEL_TRACE, MODULE, "Skipping wake");			// if user moved to a different picture in the meantime, cancel			if (userPicture != picture) {				Log.log(Log.LEVEL_TRACE, MODULE, "User skipped again, not even loading " + picture);				return true;			}		} else if (userPicture != null && userPicture != picture) {			// automatic move trying to move away from user-chosen picture			// add delay to prevent endless loop			try {				Thread.sleep(1000);			} catch (InterruptedException e) {}			return true;		}		wantDownloaded.add(picture);		updateProgress(picture, STATE_NONE);		displayPicture(picture, false);		// and cache the one after it		if (wantIndex + 1< pictures.size() && (imageIcons.get(picture = (Picture) pictures.get(wantIndex + 1))) == null) {			wantDownloaded.add(picture);			previewLoader.loadPreview(picture, true);		}		return true;	}