// Path: src/org/ebookdroid/common/cache/CacheManager.java
// public static interface ICacheListener {
// 
//     void onThumbnailChanged(ThumbnailFile tf);
// 
// }


import org.ebookdroid.common.bitmaps.BitmapManager;
import org.ebookdroid.common.cache.CacheManager.ICacheListener;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Rect;
import the.pdfviewer3.R;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.concurrent.atomic.AtomicReference;
import org.emdev.ui.tasks.AsyncTask;
import org.emdev.ui.tasks.AsyncTaskExecutor;
        listener = l;
        executor.execute(new LoadingTask());
    }

    protected synchronized void onImageLoaded(final Bitmap result) {
        ref.set(result);
        if (listener != null) {
            listener.onImageLoaded(result);
        }
    }

    public Bitmap getRawImage() {
        Bitmap bitmap = ref.get();
        if (bitmap == null || bitmap.isRecycled()) {
            try {
                bitmap = load(true);
                ref.set(bitmap);
            } catch (final OutOfMemoryError ex) {
            }
        }
        return bitmap;
    }

    public void setImage(final Bitmap image) {
        if (image != null) {
            ref.set(paint(image));
            store(image);
        } else {
            this.delete();
        }
// Path: src/org/ebookdroid/common/cache/CacheManager.java
// public static interface ICacheListener {
// 
//     void onThumbnailChanged(ThumbnailFile tf);
// 
// }


// Path: src/org/ebookdroid/common/cache/ThumbnailFile.java
import org.ebookdroid.common.bitmaps.BitmapManager;
import org.ebookdroid.common.cache.CacheManager.ICacheListener;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Rect;
import the.pdfviewer3.R;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.concurrent.atomic.AtomicReference;
import org.emdev.ui.tasks.AsyncTask;
import org.emdev.ui.tasks.AsyncTaskExecutor;

        listener = l;
        executor.execute(new LoadingTask());
    }

    protected synchronized void onImageLoaded(final Bitmap result) {
        ref.set(result);
        if (listener != null) {
            listener.onImageLoaded(result);
        }
    }

    public Bitmap getRawImage() {
        Bitmap bitmap = ref.get();
        if (bitmap == null || bitmap.isRecycled()) {
            try {
                bitmap = load(true);
                ref.set(bitmap);
            } catch (final OutOfMemoryError ex) {
            }
        }
        return bitmap;
    }

    public void setImage(final Bitmap image) {
        if (image != null) {
            ref.set(paint(image));
            store(image);
        } else {
            this.delete();
        }
        final ICacheListener l = CacheManager.listeners.getListener();