package com.sometrik.framework;

class BitmapCache {
  private AssetManager assetManager;
  private float displayScale;
  private HashMap<String, Bitmap> bitmaps = new HashMap<>();

  public BitmapCache(AssetManager assetManager, float displayScale) {
    this.assetManager = assetManager;
    this.displayScale = displayScale;
  }
    
  public Bitmap loadBitmap(String filename) {
    Bitmap bitmap = bitmaps.get(filename);
    if (bitmap == null) {
      try {       
	InputStream stream = assetManager.open(filename);
	if (stream != null) {
	  bitmap = BitmapFactory.decodeStream(stream);
	  bitmaps.set(filename, bitmap);
	  stream.close();
	}
      } catch (IOException e) {
	e.printStackTrace();
      }      
    }
    return bitmap;
  }
};

@@ -26,16 +26,212 @@
 ework;%0A%0A
+import java.io.IOException;%0Aimport java.io.InputStream;%0Aimport java.util.HashMap;%0A%0Aimport android.content.res.AssetManager;%0Aimport android.graphics.Bitmap;%0Aimport android.graphics.BitmapFactory;%0A%0A
 class Bi
@@ -365,16 +365,30 @@
 HashMap%3C
+String, Bitmap
 %3E();%0A%0A  
@@ -807,18 +807,18 @@
 bitmaps.
-se
+pu
 t(filena

add imports, add type to HashMap, fix typo