Add cancelable mechanism and support in key import

Closes #323
This commit is contained in:
Vincent Breitmoser
2014-08-31 17:32:13 +02:00
parent 38c6cf045c
commit 7da7832284
9 changed files with 119 additions and 90 deletions

View File

@@ -121,14 +121,7 @@ public class ExportHelper {
// Message is received after exporting is done in KeychainIntentService
KeychainIntentServiceHandler exportHandler = new KeychainIntentServiceHandler(mActivity,
mActivity.getString(R.string.progress_exporting),
ProgressDialog.STYLE_HORIZONTAL,
true,
new DialogInterface.OnCancelListener() {
@Override
public void onCancel(DialogInterface dialogInterface) {
mActivity.stopService(intent);
}
}) {
ProgressDialog.STYLE_HORIZONTAL) {
public void handleMessage(Message message) {
// handle messages by standard KeychainIntentServiceHandler first
super.handleMessage(message);