private HttpResponseCache getTileCache() { if (act.getExternalCacheDir() == null) { return null; } HttpResponseCache cache = null; try { File cacheDir = new File(act.getExternalCacheDir().getAbsolutePath() + "/tile-cache"); int cacheSize = CACHE_SIZE; cache = new HttpResponseCache(cacheDir, cacheSize); Logger.d("cache hit count: " + String.valueOf(cache.getHitCount())); Logger.d("cache info max size: " + String.valueOf(cache.getMaxSize())); Logger.d("cache info size: " + String.valueOf(cache.getSize())); } catch (IOException e) { Logger.e("cant attach a cache"); } return cache; }
public void setInstructions(ArrayList<Instruction> instructions) { Logger.d("instructions: " + instructions); this.instructions = instructions; }