diff options
author | Steve Block <steveblock@google.com> | 2011-10-03 15:33:09 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2011-10-03 17:51:57 +0100 |
commit | 2466effd6ef97aa17396c214d51f9f19a4760260 (patch) | |
tree | 5b37bb9e39d4e5614e55469195b81d4641677be5 /src/com/android/browser/BaseUi.java | |
parent | 42a73941cd48a92aa1980afecb5e78be0b00972c (diff) | |
download | packages_apps_browser-2466effd6ef97aa17396c214d51f9f19a4760260.zip packages_apps_browser-2466effd6ef97aa17396c214d51f9f19a4760260.tar.gz packages_apps_browser-2466effd6ef97aa17396c214d51f9f19a4760260.tar.bz2 |
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
Diffstat (limited to 'src/com/android/browser/BaseUi.java')
-rw-r--r-- | src/com/android/browser/BaseUi.java | 22 |
1 files changed, 11 insertions, 11 deletions
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.ImageButton; 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 @@ public abstract class BaseUi implements UI { 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 @@ public abstract class BaseUi implements UI { 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 @@ public abstract class BaseUi implements UI { */ 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); } |