docs: @Override
    public CloseableReference<Bitmap> decodeFromEncodedImageWithColorSpace(
        EncodedImage encodedImage,
        Bitmap.Config bitmapConfig,
        @Nullable Rect regionToDecode,
        @Nullable final ColorSpace colorSpace) {
      final BitmapFactory.Options options = getDecodeOptionsForStream(encodedImage, bitmapConfig);
      boolean retryOnFail = options.inPreferredConfig != Bitmap.Config.ARGB_8888;
      try {
        return decodeFromStream(encodedImage.getInputStream(), options, regionToDecode, colorSpace);
      } catch (RuntimeException re) {
        if (retryOnFail) {
          return decodeFromEncodedImageWithColorSpace(
              encodedImage, Bitmap.Config.ARGB_8888, regionToDecode, colorSpace);
        }
        throw re;
      }
    }