From a738e2a1aee26e0be3944c11820724aeca313f83 Mon Sep 17 00:00:00 2001 From: Kenny Root Date: Fri, 29 Mar 2013 11:14:17 -0700 Subject: 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 --- keystore/java/android/security/KeyStore.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'keystore/java') 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; } -- cgit v1.1