aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src/main/java
diff options
context:
space:
mode:
authorxSooDx <soodsaurabh95@gmail.com>2015-07-21 20:57:11 +0530
committerxSooDx <soodsaurabh95@gmail.com>2015-07-21 20:57:11 +0530
commit7c15dc0b892fe3f4515f1bfd242cd6f44f774c51 (patch)
treece001d78bbfb5b984f7b114fc922bfa6a586d61c /OpenKeychain/src/main/java
parentef9a1c23f3add291979db7ebcaf9d29643169364 (diff)
downloadopen-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.java8
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;
}