]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/java/com/stoutner/privacybrowser/SslCertificateError.java
Refactor About:Version code to remove unicode literal codes in strings.xml.
[PrivacyBrowserAndroid.git] / app / src / main / java / com / stoutner / privacybrowser / SslCertificateError.java
index 80c9c1e71f86614cfd1165a10df142abaee39635..45702f628d61ba73218e3bfa2140f215648d0899 100644 (file)
@@ -204,7 +204,7 @@ public class SslCertificateError extends DialogFragment{
         String startDateLabel = getString(R.string.start_date) + "  ";
         String endDateLabel = getString(R.string.end_date) + "  ";
 
-        // Create a `SpannableStringBuilder` for each item.
+        // Create a `SpannableStringBuilder` for each `TextView` that needs multiple colors of text.
         SpannableStringBuilder urlStringBuilder = new SpannableStringBuilder(urlLabel + urlWithError);
         SpannableStringBuilder issuedToCNameStringBuilder = new SpannableStringBuilder(cNameLabel + issuedToCName);
         SpannableStringBuilder issuedToONameStringBuilder = new SpannableStringBuilder(oNameLabel + issuedToOName);
@@ -218,8 +218,7 @@ public class SslCertificateError extends DialogFragment{
         // Create a blue `ForegroundColorSpan`.  We have to use the deprecated `getColor` until API >= 23.
         ForegroundColorSpan blueColorSpan = new ForegroundColorSpan(getResources().getColor(R.color.blue));
 
-        // Setup the spans to display the certificate information in blue.
-        // `SPAN_INCLUSIVE_INCLUSIVE` allows the span to grow in either direction.
+        // Setup the spans to display the certificate information in blue.  `SPAN_INCLUSIVE_INCLUSIVE` allows the span to grow in either direction.
         urlStringBuilder.setSpan(blueColorSpan, urlLabel.length(), urlStringBuilder.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
         issuedToCNameStringBuilder.setSpan(blueColorSpan, cNameLabel.length(), issuedToCNameStringBuilder.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
         issuedToONameStringBuilder.setSpan(blueColorSpan, oNameLabel.length(), issuedToONameStringBuilder.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);