package com.epson.memcardacc;

import android.content.Context;

import java.io.File;

public class MemcardBitmapCache extends BitmapCache {
    protected static MemcardBitmapCache sBitmapCache;
    protected boolean mDirOk;

    public static MemcardBitmapCache getInstance(Context context) {
        MemcardBitmapCache memcardBitmapCache = new MemcardBitmapCache();
        File externalCacheDir = context.getExternalCacheDir();
        if (externalCacheDir != null && memcardBitmapCache.setDirectory(new File(externalCacheDir, MemcardConfig.THUMBNAIL_CACHE_DIRECTORY), new File(externalCacheDir, MemcardConfig.DOWNLOAD_DIRECTORY))) {
            return memcardBitmapCache;
        }
        return null;
    }

    protected MemcardBitmapCache() {
    }

    public boolean checkEnv() {
        return checkSettings();
    }
}
