MCPcopy Create free account
hub / github.com/XCSoar/XCSoar / enqueue

Method enqueue

android/src/DownloadUtil.java:162–177  ·  view source on GitHub ↗

@param path the absolute destination path

(String uri, String finalPath)

Source from the content-addressed store, hash-verified

160 * @param path the absolute destination path
161 */
162 long enqueue(String uri, String finalPath) {
163 DownloadManager.Request request =
164 new DownloadManager.Request(Uri.parse(uri));
165
166 /* Unfortunately, we cannot use the simpler "ExternalPublicDir"
167 Android feature, because on some Samsung products, we need to
168 explicitly use the "external_sd" mount instead of the built-in
169 storage. Here, we must use whatever was returned by
170 FindDataPath() in LocalPath.cpp. */
171 //request.setDestinationInExternalPublicDir("XCSoarData", path);
172 request.setDestinationUri(Uri.fromFile(toTmpFile(finalPath)));
173
174 request.setAllowedOverRoaming(false);
175 request.setShowRunningNotification(true);
176 return dm.enqueue(request);
177 }
178
179 /**
180 * Find a download with the specified URI. Returns -1 if none was

Callers

nothing calls this directly

Calls 1

toTmpFileMethod · 0.95

Tested by

no test coverage detected