code: public BitmapDrawable createBitmapDrawable(Resources resources, Bitmap bitmap) {
          if (bitmap == null) {
              return null;
          }
          BitmapDrawable drawable = null;
          if (bitmap != null) {
              if (Version.hasHoneycomb()) {
                  // Running on Honeycomb or newer, so wrap in a standard BitmapDrawable
                  drawable = new BitmapDrawable(resources, bitmap);
              } else {
                  // Running on Gingerbread or older, so wrap in a RecyclingBitmapDrawable
                  // which will recycle automatically
                  drawable = new RecyclingBitmapDrawable(resources, bitmap);
              }
          }
          return drawable;
      }
docs: Create a BitmapDrawable which can be managed in ImageProvider
  
  @param resources
  @param bitmap
  @return