diff options
author | Kenny Root <kroot@google.com> | 2013-03-29 11:14:17 -0700 |
---|---|---|
committer | Kenny Root <kroot@google.com> | 2013-03-29 14:21:10 -0700 |
commit | 5cb5cec6a4a4d5432d4ce6468c12de9508db1633 (patch) | |
tree | 0778665976a92cdaf2943e551c72ef5fbb41f558 /keystore/java/android | |
parent | 2fb669e68f771f07517b8d5087ca875025b9bcfb (diff) | |
download | frameworks_base-5cb5cec6a4a4d5432d4ce6468c12de9508db1633.zip frameworks_base-5cb5cec6a4a4d5432d4ce6468c12de9508db1633.tar.gz frameworks_base-5cb5cec6a4a4d5432d4ce6468c12de9508db1633.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.
(cherry picked from commit a738e2a1aee26e0be3944c11820724aeca313f83)
Change-Id: I52c84449a27b1cefc49372a6406b7132c2bbddee
Diffstat (limited to 'keystore/java/android')
-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; } |