mirror of
https://github.com/moparisthebest/open-keychain
synced 2025-01-30 22:50:19 -05:00
cleanup
This commit is contained in:
parent
5c78c11756
commit
7bbfd9d446
@ -1,4 +1,3 @@
|
||||
package org.sufficientlysecure.keychain.ui.dialog;
|
||||
/*
|
||||
* Copyright (C) 2012-2013 Dominik Schürmann <dominik@dominikschuermann.de>
|
||||
*
|
||||
@ -16,6 +15,8 @@ package org.sufficientlysecure.keychain.ui.dialog;
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.sufficientlysecure.keychain.ui.dialog;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
@ -28,13 +29,12 @@ import org.sufficientlysecure.keychain.R;
|
||||
public class BadImportKeyDialogFragment extends DialogFragment {
|
||||
private static final String ARG_BAD_IMPORT = "bad_import";
|
||||
|
||||
|
||||
/**
|
||||
* Creates a new instance of this Bad Import Key DialogFragment
|
||||
*
|
||||
* @param bad
|
||||
* @return
|
||||
*/
|
||||
|
||||
public static BadImportKeyDialogFragment newInstance(int bad) {
|
||||
BadImportKeyDialogFragment frag = new BadImportKeyDialogFragment();
|
||||
Bundle args = new Bundle();
|
||||
@ -42,25 +42,19 @@ public class BadImportKeyDialogFragment extends DialogFragment {
|
||||
args.putInt(ARG_BAD_IMPORT, bad);
|
||||
frag.setArguments(args);
|
||||
|
||||
|
||||
return frag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||
|
||||
final FragmentActivity activity = getActivity();
|
||||
|
||||
final int badImport = getArguments().getInt(ARG_BAD_IMPORT);
|
||||
|
||||
AlertDialog.Builder alert = new AlertDialog.Builder(activity);
|
||||
|
||||
alert.setIcon(R.drawable.ic_dialog_alert_holo_light);
|
||||
alert.setTitle(R.string.warning);
|
||||
|
||||
alert.setMessage(activity.getResources()
|
||||
.getQuantityString(R.plurals.bad_keys_encountered, badImport, badImport));
|
||||
|
||||
alert.setPositiveButton(android.R.string.ok,
|
||||
new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
@ -69,9 +63,6 @@ public class BadImportKeyDialogFragment extends DialogFragment {
|
||||
});
|
||||
alert.setCancelable(true);
|
||||
|
||||
|
||||
return alert.create();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,3 @@
|
||||
package org.sufficientlysecure.keychain.ui.dialog;
|
||||
|
||||
/*
|
||||
* Copyright (C) 2012-2013 Dominik Schürmann <dominik@dominikschuermann.de>
|
||||
*
|
||||
@ -17,6 +15,8 @@ package org.sufficientlysecure.keychain.ui.dialog;
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.sufficientlysecure.keychain.ui.dialog;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
@ -59,12 +59,10 @@ public class CreateKeyDialogFragment extends DialogFragment {
|
||||
frag.setArguments(args);
|
||||
|
||||
return frag;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||
|
||||
final FragmentActivity context = getActivity();
|
||||
final LayoutInflater mInflater;
|
||||
|
||||
@ -149,8 +147,6 @@ public class CreateKeyDialogFragment extends DialogFragment {
|
||||
});
|
||||
|
||||
return dialog.create();
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -17,17 +17,6 @@
|
||||
|
||||
package org.sufficientlysecure.keychain.ui.dialog;
|
||||
|
||||
import org.spongycastle.openpgp.PGPPublicKeyRing;
|
||||
import org.spongycastle.openpgp.PGPSecretKeyRing;
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.Id;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.pgp.PgpKeyHelper;
|
||||
import org.sufficientlysecure.keychain.provider.KeychainContract;
|
||||
import org.sufficientlysecure.keychain.provider.KeychainDatabase;
|
||||
import org.sufficientlysecure.keychain.provider.ProviderHelper;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
@ -40,6 +29,14 @@ import android.os.RemoteException;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.Id;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.provider.KeychainContract;
|
||||
import org.sufficientlysecure.keychain.provider.KeychainDatabase;
|
||||
import org.sufficientlysecure.keychain.provider.ProviderHelper;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class DeleteKeyDialogFragment extends DialogFragment {
|
||||
|
@ -17,28 +17,26 @@
|
||||
|
||||
package org.sufficientlysecure.keychain.ui.dialog;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.pgp.PgpKeyHelper;
|
||||
import org.sufficientlysecure.keychain.provider.ProviderHelper;
|
||||
import org.sufficientlysecure.keychain.util.Log;
|
||||
import org.sufficientlysecure.keychain.util.QrCodeUtils;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.view.ContextThemeWrapper;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.sufficientlysecure.keychain.Constants;
|
||||
import org.sufficientlysecure.keychain.R;
|
||||
import org.sufficientlysecure.keychain.pgp.PgpKeyHelper;
|
||||
import org.sufficientlysecure.keychain.provider.ProviderHelper;
|
||||
import org.sufficientlysecure.keychain.util.QrCodeUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class ShareQrCodeDialogFragment extends DialogFragment {
|
||||
private static final String ARG_KEY_URI = "uri";
|
||||
private static final String ARG_FINGERPRINT_ONLY = "fingerprint_only";
|
||||
|
Loading…
Reference in New Issue
Block a user