// `android.support.v7.app.AlertDialog` uses more of the horizontal screen real estate versus `android.app.AlertDialog's` smaller width.
import android.support.v7.app.AlertDialog;
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.v7.app.AlertDialog;
@@ -45,13+47,12 @@ public class DownloadFile extends DialogFragment {
// Create `argumentsBundle`.
Bundle argumentsBundle = new Bundle();
// Create `argumentsBundle`.
Bundle argumentsBundle = new Bundle();
- // If `contentDisposition` is empty, use Android's standard string of `downloadfile.bin`.
String fileNameString;
String fileNameString;
- if (contentDisposition.isEmpty()) {
- fileNameString = "downloadfile.bin";
- } else {
- // Extract `fileNameString` from `contentDisposition` using the substring beginning after `filename="` and ending one character before the end of `contentDisposition`.
+ if (!contentDisposition.isEmpty()) { // Extract `fileNameString` from `contentDisposition` using the substring beginning after `filename="` and ending one character before the end of `contentDisposition`.