Use a separate executor for network loads to avoid stalling cached loads. Optimize background cache fill loads.

This commit is contained in:
Cameron Gutman
2015-03-02 18:34:21 -05:00
parent 56c8a9e6fe
commit 899387caa1
4 changed files with 73 additions and 61 deletions
@@ -19,6 +19,10 @@ public class DiskAssetLoader {
this.cacheDir = cacheDir;
}
public boolean checkCacheExists(CachedAppAssetLoader.LoaderTuple tuple) {
return CacheHelper.cacheFileExists(cacheDir, "boxart", tuple.computer.uuid.toString(), tuple.app.getAppId() + ".png");
}
public Bitmap loadBitmapFromCache(CachedAppAssetLoader.LoaderTuple tuple, int sampleSize) {
InputStream in = null;
Bitmap bmp = null;