Revert "Added warning dialog for importing keys"
This reverts commit 9d35dcb0e9.
Conflicts:
OpenKeychain/src/main/res/values/strings.xml
This commit is contained in:
@@ -18,7 +18,6 @@
|
|||||||
package org.sufficientlysecure.keychain.ui;
|
package org.sufficientlysecure.keychain.ui;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.DialogInterface;
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@@ -39,7 +38,6 @@ import org.sufficientlysecure.keychain.operations.results.ImportKeyResult;
|
|||||||
import org.sufficientlysecure.keychain.service.ImportKeyringParcel;
|
import org.sufficientlysecure.keychain.service.ImportKeyringParcel;
|
||||||
import org.sufficientlysecure.keychain.ui.base.BaseActivity;
|
import org.sufficientlysecure.keychain.ui.base.BaseActivity;
|
||||||
import org.sufficientlysecure.keychain.ui.base.CryptoOperationHelper;
|
import org.sufficientlysecure.keychain.ui.base.CryptoOperationHelper;
|
||||||
import org.sufficientlysecure.keychain.ui.dialog.CustomAlertDialogBuilder;
|
|
||||||
import org.sufficientlysecure.keychain.ui.util.KeyFormattingUtils;
|
import org.sufficientlysecure.keychain.ui.util.KeyFormattingUtils;
|
||||||
import org.sufficientlysecure.keychain.ui.util.Notify;
|
import org.sufficientlysecure.keychain.ui.util.Notify;
|
||||||
import org.sufficientlysecure.keychain.util.Log;
|
import org.sufficientlysecure.keychain.util.Log;
|
||||||
@@ -344,31 +342,6 @@ public class ImportKeysActivity extends BaseActivity
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
showWarningDialog();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void showWarningDialog() {
|
|
||||||
CustomAlertDialogBuilder warningDialog = new CustomAlertDialogBuilder(this);
|
|
||||||
warningDialog.setTitle(R.string.import_warning_title).
|
|
||||||
setMessage(R.string.import_warning).setCancelable(true);
|
|
||||||
warningDialog.setPositiveButton(R.string.btn_import, new DialogInterface.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialogInterface, int i) {
|
|
||||||
executeImport();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
warningDialog.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(DialogInterface dialogInterface, int i) {
|
|
||||||
}
|
|
||||||
});
|
|
||||||
warningDialog.show();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void executeImport() {
|
|
||||||
FragmentManager fragMan = getSupportFragmentManager();
|
|
||||||
ImportKeysListFragment keyListFragment = (ImportKeysListFragment) fragMan.findFragmentByTag(TAG_FRAG_LIST);
|
|
||||||
|
|
||||||
mOperationHelper = new CryptoOperationHelper<>(
|
mOperationHelper = new CryptoOperationHelper<>(
|
||||||
1, this, this, R.string.progress_importing
|
1, this, this, R.string.progress_importing
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -526,8 +526,6 @@
|
|||||||
<string name="import_qr_code_too_short_fingerprint">"Fingerprint is too short!"</string>
|
<string name="import_qr_code_too_short_fingerprint">"Fingerprint is too short!"</string>
|
||||||
<string name="import_qr_code_button">"Scan QR Code"</string>
|
<string name="import_qr_code_button">"Scan QR Code"</string>
|
||||||
<string name="import_qr_code_text">"Place your camera over the QR Code!"</string>
|
<string name="import_qr_code_text">"Place your camera over the QR Code!"</string>
|
||||||
<string name="import_warning_title">"Warning"</string>
|
|
||||||
<string name="import_warning">"Import will overwrite existing keys that have the same IDs!"</string>
|
|
||||||
|
|
||||||
<!-- Import from URL -->
|
<!-- Import from URL -->
|
||||||
<string name="import_url_warn_no_search_parameter">"No search query defined. You can still manually search on this keyserver."</string>
|
<string name="import_url_warn_no_search_parameter">"No search query defined. You can still manually search on this keyserver."</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user