From d7ef2c1b9ed9a98c33049c9dc8b43611cf5b99ce Mon Sep 17 00:00:00 2001 From: Adithya Abraham Philip Date: Fri, 13 Mar 2015 04:49:34 +0530 Subject: added some documentation --- .../java/org/sufficientlysecure/keychain/ui/ViewKeyFragment.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyFragment.java') 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 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); -- cgit v1.2.3