diff options
author | xSooDx <soodsaurabh95@gmail.com> | 2015-07-21 20:57:11 +0530 |
---|---|---|
committer | xSooDx <soodsaurabh95@gmail.com> | 2015-07-21 20:57:11 +0530 |
commit | 7c15dc0b892fe3f4515f1bfd242cd6f44f774c51 (patch) | |
tree | ce001d78bbfb5b984f7b114fc922bfa6a586d61c /OpenKeychain/src/main/java | |
parent | ef9a1c23f3add291979db7ebcaf9d29643169364 (diff) | |
download | open-keychain-7c15dc0b892fe3f4515f1bfd242cd6f44f774c51.tar.gz open-keychain-7c15dc0b892fe3f4515f1bfd242cd6f44f774c51.tar.bz2 open-keychain-7c15dc0b892fe3f4515f1bfd242cd6f44f774c51.zip |
-Added failsafe in case '%s' is not in the string
-Causes the links to be appended at the end
Diffstat (limited to 'OpenKeychain/src/main/java')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyTrustFragment.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyTrustFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyTrustFragment.java index b62806cc7..a15ec4151 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyTrustFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/ViewKeyTrustFragment.java @@ -269,8 +269,12 @@ public class ViewKeyTrustFragment extends LoaderFragment implements private SpannableStringBuilder insertLinks(SpannableStringBuilder proofLinks,String proofType){ SpannableStringBuilder ssb = new SpannableStringBuilder(); ssb.append(proofType); - int i = proofType.indexOf("%s"); - ssb.replace(i,i+2,proofLinks); + if(proofType.contains("%s")){ + int i = proofType.indexOf("%s"); + ssb.replace(i,i+2,proofLinks); + } + else ssb.append(proofLinks); + return ssb; } |