Ejemplo n.º 1
0
 public void putBitmap(String url, Bitmap bitmap) {
   try {
     mImageCache.putBitmap(createKey(url), bitmap);
     if (mSecondCache != null) {
       mSecondCache.putBitmap(createKey(url), bitmap);
     }
   } catch (NullPointerException e) {
     throw new IllegalStateException("Disk Cache Not initialized");
   }
 }
Ejemplo n.º 2
0
 public Bitmap getBitmap(String url) {
   try {
     Bitmap bm = mImageCache.getBitmap(createKey(url));
     if (bm == null && mSecondCache != null) {
       bm = mSecondCache.getBitmap(createKey(url));
     }
     return bm;
   } catch (NullPointerException e) {
     throw new IllegalStateException("Disk Cache Not initialized");
   }
 }