aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src/main/java/org/sufficientlysecure
diff options
context:
space:
mode:
authorDominik Schürmann <dominik@dominikschuermann.de>2015-08-29 17:27:04 +0200
committerDominik Schürmann <dominik@dominikschuermann.de>2015-08-29 17:27:04 +0200
commitbff302f80865a89a46e2c111bb2f3c99986bc285 (patch)
tree299e981dec10595d815e6a2e66494a184d86164c /OpenKeychain/src/main/java/org/sufficientlysecure
parentfeef4a93abd2ebcd7a4dd6868c9a924628863a06 (diff)
downloadopen-keychain-bff302f80865a89a46e2c111bb2f3c99986bc285.tar.gz
open-keychain-bff302f80865a89a46e2c111bb2f3c99986bc285.tar.bz2
open-keychain-bff302f80865a89a46e2c111bb2f3c99986bc285.zip
Show linked identity menu item and linked identities only when feature is enabled
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure')
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java3
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyFragment.java11
2 files changed, 9 insertions, 5 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java
index fd50ed5ef..2ffb7227e 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyActivity.java
@@ -389,7 +389,8 @@ public class ViewKeyActivity extends BaseNfcActivity implements
exportKey.setVisible(mIsSecret);
MenuItem addLinked = menu.findItem(R.id.menu_key_view_add_linked_identity);
- addLinked.setVisible(mIsSecret);
+ addLinked.setVisible(mIsSecret
+ && Preferences.getPreferences(this).getExperimentalEnableLinkedIdentities());
MenuItem certifyFingerprint = menu.findItem(R.id.menu_key_view_certify_fingerprint);
certifyFingerprint.setVisible(!mIsSecret && !mIsVerified && !mIsExpired && !mIsRevoked);
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyFragment.java
index 89e5d741f..32e2d2def 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyFragment.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyFragment.java
@@ -56,6 +56,7 @@ import org.sufficientlysecure.keychain.ui.linked.LinkedIdViewFragment;
import org.sufficientlysecure.keychain.ui.linked.LinkedIdViewFragment.OnIdentityLoadedListener;
import org.sufficientlysecure.keychain.util.ContactHelper;
import org.sufficientlysecure.keychain.util.Log;
+import org.sufficientlysecure.keychain.util.Preferences;
import java.util.List;
@@ -395,10 +396,12 @@ public class ViewKeyFragment extends LoaderFragment implements
mUserIds.setAdapter(mUserIdsAdapter);
getLoaderManager().initLoader(LOADER_ID_USER_IDS, null, this);
- mLinkedIdsAdapter =
- new LinkedIdsAdapter(getActivity(), null, 0, mIsSecret, mLinkedIdsExpander);
- mLinkedIds.setAdapter(mLinkedIdsAdapter);
- getLoaderManager().initLoader(LOADER_ID_LINKED_IDS, null, this);
+ if (Preferences.getPreferences(getActivity()).getExperimentalEnableLinkedIdentities()) {
+ mLinkedIdsAdapter =
+ new LinkedIdsAdapter(getActivity(), null, 0, mIsSecret, mLinkedIdsExpander);
+ mLinkedIds.setAdapter(mLinkedIdsAdapter);
+ getLoaderManager().initLoader(LOADER_ID_LINKED_IDS, null, this);
+ }
long masterKeyId = data.getLong(INDEX_MASTER_KEY_ID);
// we need to load linked contact here to prevent lag introduced by loader