Searched refs:extractCharset (Results 1 – 2 of 2) sorted by relevance
56 import static com.android.server.connectivity.NetworkMonitor.extractCharset;2360 assertEquals(StandardCharsets.UTF_8, extractCharset(null));2361 assertEquals(StandardCharsets.UTF_8, extractCharset("text/html;charset=utf-8"));2362 assertEquals(StandardCharsets.UTF_8, extractCharset("text/html;charset=UtF-8"));2363 assertEquals(StandardCharsets.UTF_8, extractCharset("text/html; Charset=\"utf-8\""));2364 assertEquals(StandardCharsets.UTF_8, extractCharset("image/png"));2365 assertEquals(StandardCharsets.UTF_8, extractCharset("Text/HTML;"));2366 assertEquals(StandardCharsets.UTF_8, extractCharset("multipart/form-data; boundary=-aa*-"));2367 assertEquals(StandardCharsets.UTF_8, extractCharset("text/plain;something=else"));2368 assertEquals(StandardCharsets.UTF_8, extractCharset("text/plain;charset=ImNotACharset"));[all …]
2478 extractCharset(urlConnection.getContentType())); in sendHttpProbe()2597 protected static Charset extractCharset(@Nullable String contentTypeHeader) { in extractCharset() method in NetworkMonitor2704 final Charset charset = extractCharset(conn.getHeaderField(CONTENT_TYPE_HEADER)); in sendCapportApiProbe()