summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2012-05-21 15:13:07 -0700
committerNick Kralevich <nnk@google.com>2012-05-21 15:13:07 -0700
commitc8b0463643df1f1a4035d641e155f5e1cef8e1b0 (patch)
treee730d2f4b08885866f9d9346418e7b9c49bcf8df /src
parentb9bae2cd234ed07d72cf73616d15774860eac023 (diff)
downloadandroid_packages_apps_KeyChain-c8b0463643df1f1a4035d641e155f5e1cef8e1b0.tar.gz
android_packages_apps_KeyChain-c8b0463643df1f1a4035d641e155f5e1cef8e1b0.tar.bz2
android_packages_apps_KeyChain-c8b0463643df1f1a4035d641e155f5e1cef8e1b0.zip
KeyChainService: fix misleading error message.
The KeyChainService would incorrectly report that the KeyChain was locked when it was really uninitialized. Fix error message. Change-Id: I128f7fee9a0b8b41e215edf38699c1441e6f6344
Diffstat (limited to 'src')
-rw-r--r--src/com/android/keychain/KeyChainService.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/keychain/KeyChainService.java b/src/com/android/keychain/KeyChainService.java
index 8d26643..1c41957 100644
--- a/src/com/android/keychain/KeyChainService.java
+++ b/src/com/android/keychain/KeyChainService.java
@@ -112,8 +112,10 @@ public class KeyChainService extends IntentService {
throw new NullPointerException("alias == null");
}
if (!isKeyStoreUnlocked()) {
- throw new IllegalStateException("keystore locked");
+ throw new IllegalStateException("keystore is "
+ + mKeyStore.state().toString());
}
+
final int callingUid = getCallingUid();
if (!hasGrantInternal(mDatabaseHelper.getReadableDatabase(), callingUid, alias)) {
throw new IllegalStateException("uid " + callingUid