@Test public void truncatesFilePrefix() throws IOException { Uri uri = Uri.parse("file: Request request = new Request.Builder(uri).build(); String actual = AssetRequestHandler.getFilePath(request); assertThat(actual).isEqualTo("foo/bar.png"); }
static String getFilePath(Request request) { return request.uri.toString().substring(ASSET_PREFIX_LENGTH); }
AssetRequestHandler extends RequestHandler { static String getFilePath(Request request) { return request.uri.toString().substring(ASSET_PREFIX_LENGTH); } }
AssetRequestHandler extends RequestHandler { static String getFilePath(Request request) { return request.uri.toString().substring(ASSET_PREFIX_LENGTH); } AssetRequestHandler(Context context); }
AssetRequestHandler extends RequestHandler { static String getFilePath(Request request) { return request.uri.toString().substring(ASSET_PREFIX_LENGTH); } AssetRequestHandler(Context context); @Override boolean canHandleRequest(Request data); @Override Result load(Request request, int networkPolicy); }
AssetRequestHandler extends RequestHandler { static String getFilePath(Request request) { return request.uri.toString().substring(ASSET_PREFIX_LENGTH); } AssetRequestHandler(Context context); @Override boolean canHandleRequest(Request data); @Override Result load(Request request, int networkPolicy);  }