fix argument order screwup in FileHelper
This commit is contained in:
@@ -451,7 +451,7 @@ public class BackupCodeFragment extends CryptoOperationFragment<BackupKeyringPar
|
||||
|
||||
// for kitkat and above, we have the document api
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
FileHelper.saveDocument(this, Constants.MIME_TYPE_ENCRYPTED_ALTERNATE, filename, REQUEST_SAVE);
|
||||
FileHelper.saveDocument(this, filename, Constants.MIME_TYPE_ENCRYPTED_ALTERNATE, REQUEST_SAVE);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -269,7 +269,7 @@ public class DecryptListFragment
|
||||
}
|
||||
|
||||
// requires >=kitkat
|
||||
FileHelper.saveDocument(this, metadata.getMimeType(), filename, REQUEST_CODE_OUTPUT);
|
||||
FileHelper.saveDocument(this, filename, metadata.getMimeType(), REQUEST_CODE_OUTPUT);
|
||||
}
|
||||
|
||||
private void saveFile(Uri saveUri) {
|
||||
|
||||
@@ -88,7 +88,7 @@ public class FileHelper {
|
||||
|
||||
/** Opens the storage browser on Android 4.4 or later for saving a file. */
|
||||
@TargetApi(VERSION_CODES.KITKAT)
|
||||
public static void saveDocument(Fragment fragment, String mimeType, String suggestedName, int requestCode) {
|
||||
public static void saveDocument(Fragment fragment, String suggestedName, String mimeType, int requestCode) {
|
||||
Intent intent = new Intent(Intent.ACTION_CREATE_DOCUMENT);
|
||||
intent.addCategory(Intent.CATEGORY_OPENABLE);
|
||||
intent.setType(mimeType);
|
||||
|
||||
Reference in New Issue
Block a user