@Test public void calculateInSampleSizeKeepAspectRatioWithHeight() { final BitmapFactory.Options options = new BitmapFactory.Options(); Request data = new Request.Builder(URI_1).resize(0, 100).build(); calculateInSampleSize(data.targetWidth, data.targetHeight, 800, 200, options, data); assertThat(options.inSampleSize).isEqualTo(2); }
static void calculateInSampleSize(int reqWidth, int reqHeight, BitmapFactory.Options options, Request request) { calculateInSampleSize(reqWidth, reqHeight, options.outWidth, options.outHeight, options, request); }
RequestHandler { static void calculateInSampleSize(int reqWidth, int reqHeight, BitmapFactory.Options options, Request request) { calculateInSampleSize(reqWidth, reqHeight, options.outWidth, options.outHeight, options, request); } }
RequestHandler { static void calculateInSampleSize(int reqWidth, int reqHeight, BitmapFactory.Options options, Request request) { calculateInSampleSize(reqWidth, reqHeight, options.outWidth, options.outHeight, options, request); }  }
RequestHandler { static void calculateInSampleSize(int reqWidth, int reqHeight, BitmapFactory.Options options, Request request) { calculateInSampleSize(reqWidth, reqHeight, options.outWidth, options.outHeight, options, request); }  abstract boolean canHandleRequest(Request data); @Nullable abstract Result load(Request request, int networkPolicy); }
RequestHandler { static void calculateInSampleSize(int reqWidth, int reqHeight, BitmapFactory.Options options, Request request) { calculateInSampleSize(reqWidth, reqHeight, options.outWidth, options.outHeight, options, request); }  abstract boolean canHandleRequest(Request data); @Nullable abstract Result load(Request request, int networkPolicy);  }