diff options
author | Adithya Abraham Philip <adithyaphilip@gmail.com> | 2015-03-13 04:49:34 +0530 |
---|---|---|
committer | Adithya Abraham Philip <adithyaphilip@gmail.com> | 2015-03-13 04:49:34 +0530 |
commit | d7ef2c1b9ed9a98c33049c9dc8b43611cf5b99ce (patch) | |
tree | f11a90b75bf98a37216dade70e09a3676e212449 /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyFragment.java | |
parent | 759009ddb4ac11f4065ecfa14e17ed330bd01989 (diff) | |
download | open-keychain-d7ef2c1b9ed9a98c33049c9dc8b43611cf5b99ce.tar.gz open-keychain-d7ef2c1b9ed9a98c33049c9dc8b43611cf5b99ce.tar.bz2 open-keychain-d7ef2c1b9ed9a98c33049c9dc8b43611cf5b99ce.zip |
added some documentation
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyFragment.java')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyFragment.java | 9 |
1 files changed, 5 insertions, 4 deletions
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 68da3b58c..18f1ef8a7 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyFragment.java @@ -121,6 +121,7 @@ public class ViewKeyFragment extends LoaderFragment implements /** * Checks if a system contact exists for given masterKeyId, and if it does, sets name, picture * and onClickListener for the linked system contact's layout + * In the case of a secret key, "me" contact details are loaded * * @param masterKeyId */ @@ -131,10 +132,10 @@ public class ViewKeyFragment extends LoaderFragment implements long contactId; String contactName = null; - if(mIsSecret) { + if (mIsSecret) {//all secret keys are linked to "me" profile in contacts contactId = ContactHelper.getMainProfileContactId(resolver); List<String> mainProfileNames = ContactHelper.getMainProfileContactName(context); - if(mainProfileNames!=null) contactName = mainProfileNames.get(0); + if (mainProfileNames != null) contactName = mainProfileNames.get(0); } else { contactId = ContactHelper.findContactId(resolver, masterKeyId); @@ -145,10 +146,10 @@ public class ViewKeyFragment extends LoaderFragment implements mSystemContactName.setText(contactName); Bitmap picture; - if(mIsSecret) { + if (mIsSecret) { picture = ContactHelper.loadMainProfilePhoto(resolver, false); } else { - picture = ContactHelper.loadPhotoByMasterKeyId(resolver,masterKeyId,false); + picture = ContactHelper.loadPhotoByMasterKeyId(resolver, masterKeyId, false); } if (picture != null) mSystemContactPicture.setImageBitmap(picture); |