From 07876941600af097a37d15b97f6fd892122d2027 Mon Sep 17 00:00:00 2001 From: Ashley Hughes Date: Sun, 2 Feb 2014 00:14:23 +0000 Subject: [PATCH] fix select key-signing keys --- .../keychain/ui/SelectSecretKeyLayoutFragment.java | 7 +++++++ .../sufficientlysecure/keychain/ui/SignKeyActivity.java | 1 + 2 files changed, 8 insertions(+) diff --git a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/SelectSecretKeyLayoutFragment.java b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/SelectSecretKeyLayoutFragment.java index 00dc2135c..6bcb84f46 100644 --- a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/SelectSecretKeyLayoutFragment.java +++ b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/SelectSecretKeyLayoutFragment.java @@ -41,6 +41,7 @@ public class SelectSecretKeyLayoutFragment extends Fragment { private TextView mKeyUserId; private TextView mKeyUserIdRest; private BootstrapButton mSelectKeyButton; + private Boolean mFilterCertify; private SelectSecretKeyCallback mCallback; @@ -54,6 +55,10 @@ public class SelectSecretKeyLayoutFragment extends Fragment { mCallback = callback; } + public void setFilterCertify(Boolean filterCertify) { + mFilterCertify = filterCertify; + } + public void selectKey(long secretKeyId) { if (secretKeyId == Id.key.none) { mKeyUserId.setText(R.string.api_settings_no_key); @@ -95,6 +100,7 @@ public class SelectSecretKeyLayoutFragment extends Fragment { mKeyUserIdRest = (TextView) view.findViewById(R.id.select_secret_key_user_id_rest); mSelectKeyButton = (BootstrapButton) view .findViewById(R.id.select_secret_key_select_key_button); + mFilterCertify = false; mSelectKeyButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { @@ -107,6 +113,7 @@ public class SelectSecretKeyLayoutFragment extends Fragment { private void startSelectKeyActivity() { Intent intent = new Intent(getActivity(), SelectSecretKeyActivity.class); + intent.putExtra(SelectSecretKeyActivity.EXTRA_FILTER_CERTIFY, mFilterCertify); startActivityForResult(intent, REQUEST_CODE_SELECT_KEY); } diff --git a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/SignKeyActivity.java b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/SignKeyActivity.java index 58c31076f..a8b9b0d88 100644 --- a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/SignKeyActivity.java +++ b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/SignKeyActivity.java @@ -84,6 +84,7 @@ public class SignKeyActivity extends SherlockFragmentActivity implements mSelectKeyFragment = (SelectSecretKeyLayoutFragment) getSupportFragmentManager() .findFragmentById(R.id.sign_key_select_key_fragment); mSelectKeyFragment.setCallback(this); + mSelectKeyFragment.setFilterCertify(true); mSelectKeyserverSpinner = (Spinner) findViewById(R.id.sign_key_keyserver); ArrayAdapter adapter = new ArrayAdapter(this,