aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util
diff options
context:
space:
mode:
authorVincent Breitmoser <valodim@mugenguild.com>2015-08-22 12:54:19 +0200
committerVincent Breitmoser <valodim@mugenguild.com>2015-08-22 12:54:19 +0200
commite3d1f68e797b7d6cf27c64bef0c5d183031d4f38 (patch)
treebd813505565ecda0c07ff3689f9777a09ee4353c /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util
parent16903357e127aacbc7e82da5dc3c762184089a12 (diff)
downloadopen-keychain-e3d1f68e797b7d6cf27c64bef0c5d183031d4f38.tar.gz
open-keychain-e3d1f68e797b7d6cf27c64bef0c5d183031d4f38.tar.bz2
open-keychain-e3d1f68e797b7d6cf27c64bef0c5d183031d4f38.zip
trigger indexing of file after operation (#1498)
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util')
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/ExportHelper.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/ExportHelper.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/ExportHelper.java
index 5f2329170..72620e712 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/ExportHelper.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/util/ExportHelper.java
@@ -20,6 +20,8 @@ package org.sufficientlysecure.keychain.util;
import java.io.File;
+import android.content.Intent;
+import android.net.Uri;
import android.support.v4.app.FragmentActivity;
import org.sufficientlysecure.keychain.Constants;
@@ -98,7 +100,10 @@ public class ExportHelper
}
@Override
- public void onCryptoOperationSuccess(ExportResult result) {
+ final public void onCryptoOperationSuccess(ExportResult result) {
+ // trigger scan of the created 'media' file so it shows up on MTP
+ // http://stackoverflow.com/questions/13737261/nexus-4-not-showing-files-via-mtp
+ mActivity.sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri.fromFile(mExportFile)));
result.createNotify(mActivity).show();
}