]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/java/com/stoutner/privacybrowser/ViewSslCertificate.java
Implement Orbot proxy support. Fixes https://redmine.stoutner.com/issues/26.
[PrivacyBrowserAndroid.git] / app / src / main / java / com / stoutner / privacybrowser / ViewSslCertificate.java
index 8b370748ae7653555c08b6c6a8b4e15825c7ef1b..f68f503c1288616e3ef7fe3387731a205fcaf8a0 100644 (file)
@@ -26,15 +26,12 @@ import android.graphics.drawable.BitmapDrawable;
 import android.graphics.drawable.Drawable;
 import android.net.http.SslCertificate;
 import android.os.Bundle;
-import android.text.SpannableString;
 import android.text.SpannableStringBuilder;
 import android.text.Spanned;
 import android.text.style.ForegroundColorSpan;
 import android.view.LayoutInflater;
 import android.widget.TextView;
 
-import org.w3c.dom.Text;
-
 import java.util.Date;
 
 public class ViewSslCertificate extends DialogFragment {
@@ -112,7 +109,7 @@ public class ViewSslCertificate extends DialogFragment {
             Date startDate = sslCertificate.getValidNotBeforeDate();
             Date endDate = sslCertificate.getValidNotAfterDate();
 
-            // Create a `SpannableStringBuilder` for each item.
+            // Create a `SpannableStringBuilder` for each `TextView` that needs multiple colors of text.
             SpannableStringBuilder issuedToCNameStringBuilder = new SpannableStringBuilder(cNameLabel + issuedToCNameString);
             SpannableStringBuilder issuedToONameStringBuilder = new SpannableStringBuilder(oNameLabel + issuedToONameString);
             SpannableStringBuilder issuedToUNameStringBuilder = new SpannableStringBuilder(uNameLabel + issuedToUNameString);
@@ -123,10 +120,9 @@ public class ViewSslCertificate extends DialogFragment {
             SpannableStringBuilder endDateStringBuilder = new SpannableStringBuilder(endDateLabel + endDate.toString());
 
             // Create a blue `ForegroundColorSpan`.  We have to use the deprecated `getColor` until API >= 23.
-            ForegroundColorSpan blueColorSpan = new ForegroundColorSpan(getResources().getColor(R.color.blue));
+            ForegroundColorSpan blueColorSpan = new ForegroundColorSpan(getResources().getColor(R.color.blue_700));
 
-            // 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.
             issuedToCNameStringBuilder.setSpan(blueColorSpan, cNameLabel.length(), issuedToCNameStringBuilder.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
             issuedToONameStringBuilder.setSpan(blueColorSpan, oNameLabel.length(), issuedToONameStringBuilder.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
             issuedToUNameStringBuilder.setSpan(blueColorSpan, uNameLabel.length(), issuedToUNameStringBuilder.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);