Searched refs:extractCharset (Results 1 – 2 of 2) sorted by relevance
71 import static com.android.server.connectivity.NetworkMonitor.extractCharset;3358 assertEquals(StandardCharsets.UTF_8, extractCharset(null)); in testExtractCharset()3359 assertEquals(StandardCharsets.UTF_8, extractCharset("text/html;charset=utf-8")); in testExtractCharset()3360 assertEquals(StandardCharsets.UTF_8, extractCharset("text/html;charset=UtF-8")); in testExtractCharset()3361 assertEquals(StandardCharsets.UTF_8, extractCharset("text/html; Charset=\"utf-8\"")); in testExtractCharset()3362 assertEquals(StandardCharsets.UTF_8, extractCharset("image/png")); in testExtractCharset()3363 assertEquals(StandardCharsets.UTF_8, extractCharset("Text/HTML;")); in testExtractCharset()3364 assertEquals(StandardCharsets.UTF_8, extractCharset("multipart/form-data; boundary=-aa*-")); in testExtractCharset()3365 assertEquals(StandardCharsets.UTF_8, extractCharset("text/plain;something=else")); in testExtractCharset()3366 assertEquals(StandardCharsets.UTF_8, extractCharset("text/plain;charset=ImNotACharset")); in testExtractCharset()[all …]
3056 extractCharset(urlConnection.getContentType())); in sendHttpProbe()3184 protected static Charset extractCharset(@Nullable String contentTypeHeader) { in extractCharset() method in NetworkMonitor3294 final Charset charset = extractCharset(conn.getHeaderField(CONTENT_TYPE_HEADER)); in sendCapportApiProbe()