Show the unlocked padlock icon when there is an SSL authentication problem.

This introduces two changes in behaviour ...
- If the page's main resource uses SSL but there's a problem with it's
  certificate, show the open lock icon rather than the closed lock icon.
- If the page's main resource uses SSL and the certificate is good, but some
  sub-resources have problems with their certificates, show the open lock
  icon rather than the closed lock icon. Previously we would show the open
  lock icon only if these sub-resources did not use SSL.

Requires https://android-git.corp.google.com/g/#/c/139926.

Bug: 5403366
Change-Id: I0cb1b26d1180aacfbc500a944421e7b753cd95f1
diff --git a/src/com/android/browser/BaseUi.java b/src/com/android/browser/BaseUi.java
index e440d2c..a2a51d6 100644
--- a/src/com/android/browser/BaseUi.java
+++ b/src/com/android/browser/BaseUi.java
@@ -594,7 +594,10 @@
         Drawable d = null;
         if (securityState == SecurityState.SECURITY_STATE_SECURE) {
             d = mLockIconSecure;
-        } else if (securityState == SecurityState.SECURITY_STATE_MIXED) {
+        } else if (securityState == SecurityState.SECURITY_STATE_MIXED
+                || securityState == SecurityState.SECURITY_STATE_BAD_CERTIFICATE) {
+            // TODO: It would be good to have different icons for insecure vs mixed content.
+            // See http://b/5403800
             d = mLockIconMixed;
         }
         mNavigationBar.setLock(d);