trigger indexing of file after operation (#1498)
This commit is contained in:
@@ -20,6 +20,8 @@ package org.sufficientlysecure.keychain.util;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.net.Uri;
|
||||||
import android.support.v4.app.FragmentActivity;
|
import android.support.v4.app.FragmentActivity;
|
||||||
|
|
||||||
import org.sufficientlysecure.keychain.Constants;
|
import org.sufficientlysecure.keychain.Constants;
|
||||||
@@ -98,7 +100,10 @@ public class ExportHelper
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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();
|
result.createNotify(mActivity).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user