Rename Tab.LockIcon to Tab.SecurityState

The tab's state is concerned with whether or not the page is secure. It should
not mention the lock icon, as this is just a UI choice of how to represent the
security state.

Also renames WebViewController.onUpdatedLockIcon() to onUpdatedSecurityState().

No functional change.

Bug: 5403366
Change-Id: Id18402e84fd9b1f661c160189c7a19a9352fd25c
diff --git a/src/com/android/browser/BaseUi.java b/src/com/android/browser/BaseUi.java
index bce3257..0ae2fda 100644
--- a/src/com/android/browser/BaseUi.java
+++ b/src/com/android/browser/BaseUi.java
@@ -49,7 +49,7 @@
 import android.widget.LinearLayout;
 import android.widget.Toast;
 
-import com.android.browser.Tab.LockIcon;
+import com.android.browser.Tab.SecurityState;
 import com.android.internal.view.menu.MenuBuilder;
 
 import java.util.List;
@@ -81,8 +81,8 @@
     protected Tab mActiveTab;
     private InputMethodManager mInputManager;
 
-    private Drawable mSecLockIcon;
-    private Drawable mMixLockIcon;
+    private Drawable mLockIconSecure;
+    private Drawable mLockIconMixed;
     protected Drawable mGenericFavicon;
 
     protected FrameLayout mContentView;
@@ -115,8 +115,8 @@
         Resources res = mActivity.getResources();
         mInputManager = (InputMethodManager)
                 browser.getSystemService(Activity.INPUT_METHOD_SERVICE);
-        mSecLockIcon = res.getDrawable(R.drawable.ic_secure_holo_dark);
-        mMixLockIcon = res.getDrawable(R.drawable.ic_secure_partial_holo_dark);
+        mLockIconSecure = res.getDrawable(R.drawable.ic_secure_holo_dark);
+        mLockIconMixed = res.getDrawable(R.drawable.ic_secure_partial_holo_dark);
 
         FrameLayout frameLayout = (FrameLayout) mActivity.getWindow()
                 .getDecorView().findViewById(android.R.id.content);
@@ -590,19 +590,19 @@
      */
     protected void updateLockIconToLatest(Tab t) {
         if (t != null && t.inForeground()) {
-            updateLockIconImage(t.getLockIconType());
+            updateLockIconImage(t.getSecurityState());
         }
     }
 
     /**
      * Updates the lock-icon image in the title-bar.
      */
-    private void updateLockIconImage(LockIcon lockIconType) {
+    private void updateLockIconImage(SecurityState securityState) {
         Drawable d = null;
-        if (lockIconType == LockIcon.LOCK_ICON_SECURE) {
-            d = mSecLockIcon;
-        } else if (lockIconType == LockIcon.LOCK_ICON_MIXED) {
-            d = mMixLockIcon;
+        if (securityState == SecurityState.SECURITY_STATE_SECURE) {
+            d = mLockIconSecure;
+        } else if (securityState == SecurityState.SECURITY_STATE_MIXED) {
+            d = mLockIconMixed;
         }
         mNavigationBar.setLock(d);
     }