// Get the intent that started the app.
Intent intent = getIntent();
+ // Reset the intent. This prevents a duplicate tab from being created on restart.
+ setIntent(new Intent());
+
// Get the information from the intent.
String intentAction = intent.getAction();
Uri intentUriData = intent.getData();
}
// Get the file name from the content disposition.
- String fileNameString = PrepareSaveDialog.getFileNameFromContentDisposition(this, contentDisposition, downloadUrl);
+ String fileNameString = PrepareSaveDialog.getFileNameFromHeaders(this, contentDisposition, mimetype, downloadUrl);
// Instantiate the save dialog.
DialogFragment saveDialogFragment = SaveWebpageDialog.saveWebpage(StoragePermissionDialog.SAVE_URL, downloadUrl, formattedFileSizeString, fileNameString, userAgent,
// Get the intent that started the app.
Intent launchingIntent = getIntent();
+ // Reset the intent. This prevents a duplicate tab from being created on restart.
+ setIntent(new Intent());
+
// Get the information from the intent.
String launchingIntentAction = launchingIntent.getAction();
Uri launchingIntentUriData = launchingIntent.getData();