trigger indexing of file after operation (#1498)

This commit is contained in:
Vincent Breitmoser
2015-08-22 12:54:19 +02:00
parent 16903357e1
commit e3d1f68e79

View File

@@ -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();
}