Project

General

Profile

Bug #73 ยป fix_authenticated_download.patch

Soren Stoutner, 01/23/2017 01:18 PM

View differences:

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();
    (1-1/1)