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.java56 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 …]
/packages/modules/NetworkStack/src/com/android/server/connectivity/
DNetworkMonitor.java2478 extractCharset(urlConnection.getContentType())); in sendHttpProbe()
2597 protected static Charset extractCharset(@Nullable String contentTypeHeader) { in extractCharset() method in NetworkMonitor
2704 final Charset charset = extractCharset(conn.getHeaderField(CONTENT_TYPE_HEADER)); in sendCapportApiProbe()