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>
|
* 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/>.
|
* 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.AlertDialog;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
@ -28,13 +29,12 @@ import org.sufficientlysecure.keychain.R;
|
|||||||
public class BadImportKeyDialogFragment extends DialogFragment {
|
public class BadImportKeyDialogFragment extends DialogFragment {
|
||||||
private static final String ARG_BAD_IMPORT = "bad_import";
|
private static final String ARG_BAD_IMPORT = "bad_import";
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new instance of this Bad Import Key DialogFragment
|
* Creates a new instance of this Bad Import Key DialogFragment
|
||||||
|
*
|
||||||
* @param bad
|
* @param bad
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public static BadImportKeyDialogFragment newInstance(int bad) {
|
public static BadImportKeyDialogFragment newInstance(int bad) {
|
||||||
BadImportKeyDialogFragment frag = new BadImportKeyDialogFragment();
|
BadImportKeyDialogFragment frag = new BadImportKeyDialogFragment();
|
||||||
Bundle args = new Bundle();
|
Bundle args = new Bundle();
|
||||||
@ -42,25 +42,19 @@ public class BadImportKeyDialogFragment extends DialogFragment {
|
|||||||
args.putInt(ARG_BAD_IMPORT, bad);
|
args.putInt(ARG_BAD_IMPORT, bad);
|
||||||
frag.setArguments(args);
|
frag.setArguments(args);
|
||||||
|
|
||||||
|
|
||||||
return frag;
|
return frag;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||||
|
|
||||||
final FragmentActivity activity = getActivity();
|
final FragmentActivity activity = getActivity();
|
||||||
|
|
||||||
final int badImport = getArguments().getInt(ARG_BAD_IMPORT);
|
final int badImport = getArguments().getInt(ARG_BAD_IMPORT);
|
||||||
|
|
||||||
AlertDialog.Builder alert = new AlertDialog.Builder(activity);
|
AlertDialog.Builder alert = new AlertDialog.Builder(activity);
|
||||||
|
|
||||||
alert.setIcon(R.drawable.ic_dialog_alert_holo_light);
|
alert.setIcon(R.drawable.ic_dialog_alert_holo_light);
|
||||||
alert.setTitle(R.string.warning);
|
alert.setTitle(R.string.warning);
|
||||||
|
|
||||||
alert.setMessage(activity.getResources()
|
alert.setMessage(activity.getResources()
|
||||||
.getQuantityString(R.plurals.bad_keys_encountered, badImport, badImport));
|
.getQuantityString(R.plurals.bad_keys_encountered, badImport, badImport));
|
||||||
|
|
||||||
alert.setPositiveButton(android.R.string.ok,
|
alert.setPositiveButton(android.R.string.ok,
|
||||||
new DialogInterface.OnClickListener() {
|
new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int id) {
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
@ -69,9 +63,6 @@ public class BadImportKeyDialogFragment extends DialogFragment {
|
|||||||
});
|
});
|
||||||
alert.setCancelable(true);
|
alert.setCancelable(true);
|
||||||
|
|
||||||
|
|
||||||
return alert.create();
|
return alert.create();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
package org.sufficientlysecure.keychain.ui.dialog;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2012-2013 Dominik Schürmann <dominik@dominikschuermann.de>
|
* 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/>.
|
* 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.AlertDialog;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
@ -59,12 +59,10 @@ public class CreateKeyDialogFragment extends DialogFragment {
|
|||||||
frag.setArguments(args);
|
frag.setArguments(args);
|
||||||
|
|
||||||
return frag;
|
return frag;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||||
|
|
||||||
final FragmentActivity context = getActivity();
|
final FragmentActivity context = getActivity();
|
||||||
final LayoutInflater mInflater;
|
final LayoutInflater mInflater;
|
||||||
|
|
||||||
@ -149,8 +147,6 @@ public class CreateKeyDialogFragment extends DialogFragment {
|
|||||||
});
|
});
|
||||||
|
|
||||||
return dialog.create();
|
return dialog.create();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -17,17 +17,6 @@
|
|||||||
|
|
||||||
package org.sufficientlysecure.keychain.ui.dialog;
|
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.AlertDialog;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
@ -40,6 +29,14 @@ import android.os.RemoteException;
|
|||||||
import android.support.v4.app.DialogFragment;
|
import android.support.v4.app.DialogFragment;
|
||||||
import android.support.v4.app.FragmentActivity;
|
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;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public class DeleteKeyDialogFragment extends DialogFragment {
|
public class DeleteKeyDialogFragment extends DialogFragment {
|
||||||
|
@ -17,28 +17,26 @@
|
|||||||
|
|
||||||
package org.sufficientlysecure.keychain.ui.dialog;
|
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.Activity;
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v4.app.DialogFragment;
|
import android.support.v4.app.DialogFragment;
|
||||||
import android.view.ContextThemeWrapper;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
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 {
|
public class ShareQrCodeDialogFragment extends DialogFragment {
|
||||||
private static final String ARG_KEY_URI = "uri";
|
private static final String ARG_KEY_URI = "uri";
|
||||||
private static final String ARG_FINGERPRINT_ONLY = "fingerprint_only";
|
private static final String ARG_FINGERPRINT_ONLY = "fingerprint_only";
|
||||||
|
Loading…
Reference in New Issue
Block a user