import android.net.Uri;
import android.os.Bundle;
// `android.support.v7.app.AlertDialog` uses more of the horizontal screen real estate versus `android.app.AlertDialog's` smaller width.
-import android.support.v4.content.ContextCompat;
import android.support.v7.app.AlertDialog;
import android.view.KeyEvent;
import android.view.LayoutInflater;
Bundle argumentsBundle = new Bundle();
String fileNameString;
- if (!contentDisposition.isEmpty()) { // Extract `fileNameString` from `contentDisposition` using the substring beginning after `filename="` and ending one character before the end of `contentDisposition`.
- fileNameString = contentDisposition.substring(contentDisposition.indexOf("filename=\"") + 10, contentDisposition.length() - 1);
+ if (!contentDisposition.isEmpty()) { // Extract `fileNameString` from `contentDisposition` using the substring beginning after `filename="` and ending with the next `"`.
+ fileNameString = contentDisposition.substring(contentDisposition.indexOf("filename=\"") + 10, contentDisposition.indexOf("\"", contentDisposition.indexOf("filename=\"") + 10));
} else { // `contentDisposition` is empty, so use the last path segment of the URL as the file name.
Uri downloadUri = Uri.parse(urlString);
fileNameString = downloadUri.getLastPathSegment();
<!-- Save As. -->
<string name="save_as">Speichern unter</string>
<string name="file_name">Dateiname</string>
+ <string name="unknown_size">Unbekannte Größe</string>
<string name="download">Download</string>
<!-- Custom App Bar. -->
</string-array>
<string name="swipe_to_refresh_enabled">Herunterziehen zum Aktualisieren</string>
<string name="swipe_to_refresh_enabled_summary">Einige Websites funktionieren nicht, wenn "Herunterziehen zum Aktualisieren" eingeschaltet ist.</string>
+ <string name="display_additional_app_bar_icons">Weitere Icons in der Titelleiste</string>
+ <string name="display_additional_app_bar_icons_summary">Icons zum Umschalten von Cookies, DOM-Speicher und Formulardaten neben der Adresszeile anzeigen, wenn noch Platz dafür da ist.</string>
<!-- Orbot. -->
<string name="orbot_proxy_not_installed">Orbot-Proxy wird nicht funktionieren, solange Orbot nicht installiert ist.</string>
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:2.2.0'
+ classpath 'com.android.tools.build:gradle:2.2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files