KeyStore: stop using state()
Change-Id: Ib9a9af88a280a5442989a8199218a7ba82ce9e25
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 {