Home | History | Annotate | Download | only in com.example.android.mediabrowserservice

Lines Matching defs:bitmap

19 import android.graphics.Bitmap;
48 private final LruCache<String, Bitmap[]> mCache;
61 mCache = new LruCache<String, Bitmap[]>(maxSize) {
63 protected int sizeOf(String key, Bitmap[] value) {
70 public Bitmap getBigImage(String artUrl) {
71 Bitmap[] result = mCache.get(artUrl);
75 public Bitmap getIconImage(String artUrl) {
76 Bitmap[] result = mCache.get(artUrl);
83 // requests and bitmap rescales. For production-level apps, we recommend you use
85 Bitmap[] bitmap = mCache.get(artUrl);
86 if (bitmap != null) {
88 listener.onFetched(artUrl, bitmap[BIG_BITMAP_INDEX], bitmap[ICON_BITMAP_INDEX]);
93 new AsyncTask<Void, Void, Bitmap[]>() {
95 protected Bitmap[] doInBackground(Void[] objects) {
96 Bitmap[] bitmaps;
98 Bitmap bitmap = BitmapHelper.fetchAndRescaleBitmap(artUrl,
100 Bitmap icon = BitmapHelper.scaleBitmap(bitmap,
102 bitmaps = new Bitmap[] {bitmap, icon};
107 LogHelper.d(TAG, "doInBackground: putting bitmap in cache. cache size=" +
113 protected void onPostExecute(Bitmap[] bitmaps) {
125 public abstract void onFetched(String artUrl, Bitmap bigImage, Bitmap iconImage);