Home
last modified time | relevance | path

Searched refs:contentLength (Results 1 – 5 of 5) sorted by relevance

/packages/modules/CaptivePortalLogin/src/com/android/captiveportallogin/
DDownloadService.java293 long contentLength = CONTENT_LENGTH_UNKNOWN; in processDownload() local
301 contentLength = httpConn.getContentLengthLong(); in processDownload()
309 if (!downloadToFile(is, fop, contentLength, task, nm)) { in processDownload()
337 long contentLength, @NonNull DownloadTask task, in downloadToFile() argument
341 final long maxRead = contentLength == CONTENT_LENGTH_UNKNOWN in downloadToFile()
342 ? Long.MAX_VALUE : contentLength; in downloadToFile()
359 final Integer progress = getProgress(contentLength, allRead); in downloadToFile()
382 private Integer getProgress(long contentLength, long totalRead) { in getProgress() argument
383 if (contentLength == CONTENT_LENGTH_UNKNOWN || contentLength == 0) return null; in getProgress()
384 return (int) (totalRead * 100 / contentLength); in getProgress()
DCaptivePortalLoginActivity.java866 String mimetype, long contentLength) { in onDownloadStart() argument
/packages/modules/Wifi/service/java/com/android/server/wifi/hotspot2/soap/
DHttpsServiceConnection.java96 public void setFixedLengthStreamingMode(int contentLength) { in setFixedLengthStreamingMode() argument
97 mConnection.setFixedLengthStreamingMode(contentLength); in setFixedLengthStreamingMode()
/packages/modules/NetworkStack/src/com/android/server/connectivity/
DNetworkMonitor.java2496 long contentLength = urlConnection.getContentLengthLong(); in sendHttpProbe() local
2501 } else if (contentLength == -1) { in sendHttpProbe()
2510 } else if (matchesHttpContentLength(contentLength)) { in sendHttpProbe()
2512 final String content = readAsString(is, (int) contentLength, in sendHttpProbe()
2524 + contentLength + ", content matches custom regexp, interpreted" in sendHttpProbe()
2528 } else if (contentLength <= 4) { in sendHttpProbe()
2586 boolean matchesHttpContentLength(final long contentLength) { in matchesHttpContentLength() argument
2589 if (contentLength <= 0) return false; in matchesHttpContentLength()
2590 if (contentLength > Integer.MAX_VALUE) { in matchesHttpContentLength()
2591 logw("matchesHttpContentLength : Get invalid contentLength = " + contentLength); in matchesHttpContentLength()
[all …]
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/
DPublicApiFunctionalTest.java244 int contentLength = STRING_1K.length() * numPackets; in buildContinuingResponse() local
246 .setHeader("Content-length", contentLength) in buildContinuingResponse()