summaryrefslogtreecommitdiff
path: root/keystore/java/android/security/KeyStoreSecurityLevel.java
diff options
context:
space:
mode:
authorJanis Danisevskis <jdanis@google.com>2021-01-12 10:27:30 -0800
committerJanis Danisevskis <jdanis@google.com>2021-01-19 10:10:20 -0800
commita7a9e7af3d6c2704a451eb1c3641bd02b05879cc (patch)
tree59d88401c7b0797f4791e5b24efcd76fb8864c42 /keystore/java/android/security/KeyStoreSecurityLevel.java
parent49e239ec9657d1f60b7654149577141cf86c5738 (diff)
Keystore 2.0: Add human readable strings to Keystore exceptions.
Test: N/A Change-Id: Ic07ca2329c6ebf3dacddf687cc85935e2bfa0cdd
Diffstat (limited to 'keystore/java/android/security/KeyStoreSecurityLevel.java')
-rw-r--r--keystore/java/android/security/KeyStoreSecurityLevel.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/keystore/java/android/security/KeyStoreSecurityLevel.java b/keystore/java/android/security/KeyStoreSecurityLevel.java
index 3ef4aa5b7ec3..bc669bae056b 100644
--- a/keystore/java/android/security/KeyStoreSecurityLevel.java
+++ b/keystore/java/android/security/KeyStoreSecurityLevel.java
@@ -52,7 +52,7 @@ public class KeyStoreSecurityLevel {
try {
return request.execute();
} catch (ServiceSpecificException e) {
- throw new KeyStoreException(e.errorCode, "");
+ throw KeyStore2.getKeyStoreException(e.errorCode);
} catch (RemoteException e) {
// Log exception and report invalid operation handle.
// This should prompt the caller drop the reference to this operation and retry.
@@ -114,7 +114,7 @@ public class KeyStoreSecurityLevel {
break;
}
default:
- throw new KeyStoreException(e.errorCode, "");
+ throw KeyStore2.getKeyStoreException(e.errorCode);
}
} catch (RemoteException e) {
Log.w(TAG, "Cannot connect to keystore", e);