diff --git a/src/com/android/keychain/KeyChainActivity.java b/src/com/android/keychain/KeyChainActivity.java
index 1811fbf..e7b161b 100644
--- a/src/com/android/keychain/KeyChainActivity.java
+++ b/src/com/android/keychain/KeyChainActivity.java
@@ -74,12 +74,6 @@
     // be done on the UI thread.
     private KeyStore mKeyStore = KeyStore.getInstance();
 
-    // the KeyStore.state operation is safe to do on the UI thread, it
-    // does not do a file operation.
-    private boolean isKeyStoreUnlocked() {
-        return mKeyStore.state() == KeyStore.State.UNLOCKED;
-    }
-
     @Override public void onCreate(Bundle savedState) {
         super.onCreate(savedState);
         if (savedState == null) {
@@ -114,7 +108,7 @@
         // see if KeyStore has been unlocked, if not start activity to do so
         switch (mState) {
             case INITIAL:
-                if (!isKeyStoreUnlocked()) {
+                if (!mKeyStore.isUnlocked()) {
                     mState = State.UNLOCK_REQUESTED;
                     this.startActivityForResult(new Intent(Credentials.UNLOCK_ACTION),
                                                 REQUEST_UNLOCK);
@@ -362,7 +356,7 @@
     @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) {
         switch (requestCode) {
             case REQUEST_UNLOCK:
-                if (isKeyStoreUnlocked()) {
+                if (mKeyStore.isUnlocked()) {
                     showCertChooserDialog();
                 } else {
                     // user must have canceled unlock, give up
diff --git a/src/com/android/keychain/KeyChainService.java b/src/com/android/keychain/KeyChainService.java
index 1c41957..a2b44e8 100644
--- a/src/com/android/keychain/KeyChainService.java
+++ b/src/com/android/keychain/KeyChainService.java
@@ -111,7 +111,7 @@
             if (alias == null) {
                 throw new NullPointerException("alias == null");
             }
-            if (!isKeyStoreUnlocked()) {
+            if (!mKeyStore.isUnlocked()) {
                 throw new IllegalStateException("keystore is "
                         + mKeyStore.state().toString());
             }
@@ -123,10 +123,6 @@
             }
         }
 
-        private boolean isKeyStoreUnlocked() {
-            return (mKeyStore.state() == KeyStore.State.UNLOCKED);
-        }
-
         @Override public void installCaCertificate(byte[] caCertificate) {
             checkCertInstallerOrSystemCaller();
             try {
