Bug #73 ยป fix_authenticated_download.patch
app/src/main/java/com/stoutner/privacybrowser/activities/MainWebView.java | ||
---|---|---|
// Parse `downloadUrl`.
|
||
DownloadManager.Request downloadRequest = new DownloadManager.Request(Uri.parse(downloadUrl));
|
||
// Pass Cookies to DownloadManager if Cookies are enabled
|
||
if (cookieManager.hasCookies() && cookieManager.acceptCookie()) {
|
||
String cookie = cookieManager.getCookie(downloadUrl);
|
||
downloadRequest.addRequestHeader("Cookie", cookie);
|
||
}
|
||
// Get the file name from `dialogFragment`.
|
||
EditText downloadFileNameEditText = (EditText) dialogFragment.getDialog().findViewById(R.id.download_file_name);
|
||
String fileName = downloadFileNameEditText.getText().toString();
|