Home
last modified time | relevance | path

Searched refs:extractCharset (Results 1 – 2 of 2) sorted by relevance

/packages/modules/NetworkStack/tests/unit/src/com/android/server/connectivity/
DNetworkMonitorTest.java58 import static com.android.server.connectivity.NetworkMonitor.extractCharset;
2531 assertEquals(StandardCharsets.UTF_8, extractCharset(null));
2532 assertEquals(StandardCharsets.UTF_8, extractCharset("text/html;charset=utf-8"));
2533 assertEquals(StandardCharsets.UTF_8, extractCharset("text/html;charset=UtF-8"));
2534 assertEquals(StandardCharsets.UTF_8, extractCharset("text/html; Charset=\"utf-8\""));
2535 assertEquals(StandardCharsets.UTF_8, extractCharset("image/png"));
2536 assertEquals(StandardCharsets.UTF_8, extractCharset("Text/HTML;"));
2537 assertEquals(StandardCharsets.UTF_8, extractCharset("multipart/form-data; boundary=-aa*-"));
2538 assertEquals(StandardCharsets.UTF_8, extractCharset("text/plain;something=else"));
2539 assertEquals(StandardCharsets.UTF_8, extractCharset("text/plain;charset=ImNotACharset"));
[all …]
/packages/modules/NetworkStack/src/com/android/server/connectivity/
DNetworkMonitor.java2513 extractCharset(urlConnection.getContentType())); in sendHttpProbe()
2641 protected static Charset extractCharset(@Nullable String contentTypeHeader) { in extractCharset() method in NetworkMonitor
2750 final Charset charset = extractCharset(conn.getHeaderField(CONTENT_TYPE_HEADER)); in sendCapportApiProbe()