diff options
author | Kenny Root <kroot@google.com> | 2013-03-29 11:14:17 -0700 |
---|---|---|
committer | Kenny Root <kroot@google.com> | 2013-03-29 11:16:43 -0700 |
commit | a738e2a1aee26e0be3944c11820724aeca313f83 (patch) | |
tree | f759843e6482eba4a964869e62a025f22756ed49 /keystore/java | |
parent | ce7f2723ad42f09fb173a9b86d3546e1474fd667 (diff) | |
download | frameworks_base-a738e2a1aee26e0be3944c11820724aeca313f83.zip frameworks_base-a738e2a1aee26e0be3944c11820724aeca313f83.tar.gz frameworks_base-a738e2a1aee26e0be3944c11820724aeca313f83.tar.bz2 |
KeyStore: add API to query storage type
Add an API to keystore daemon to query what kind of storage is currently
in use.
Change-Id: I5a83ae92250ca63b691dcf1beb8b3e1703797745
Diffstat (limited to 'keystore/java')
-rw-r--r-- | keystore/java/android/security/KeyStore.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/keystore/java/android/security/KeyStore.java b/keystore/java/android/security/KeyStore.java index 12c0ed8..2037472 100644 --- a/keystore/java/android/security/KeyStore.java +++ b/keystore/java/android/security/KeyStore.java @@ -296,6 +296,15 @@ public class KeyStore { } } + public boolean isHardwareBacked() { + try { + return mBinder.is_hardware_backed() == NO_ERROR; + } catch (RemoteException e) { + Log.w(TAG, "Cannot connect to keystore", e); + return false; + } + } + public int getLastError() { return mError; } |