summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Tucker Sylvestro <tuckeris@google.com> 2016-10-06 16:08:41 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2016-10-06 16:08:45 +0000
commitf0b51e9db727b20bacb7ace97302d8aed1892799 (patch)
tree72767b0c57b4c4bdd78d23d69afc5ac27ccef0bd
parent6cffa2bf95ab0b19e388f47e866bb4d33d3f0733 (diff)
parentb32aae2a46bc3678e11c7f0ca88e01a192829490 (diff)
Merge "Add the onDeviceOffBody API method to KeyStore" into cw-f-dev
-rw-r--r--core/java/android/security/IKeystoreService.aidl1
-rw-r--r--keystore/java/android/security/KeyStore.java10
2 files changed, 11 insertions, 0 deletions
diff --git a/core/java/android/security/IKeystoreService.aidl b/core/java/android/security/IKeystoreService.aidl
index 8689dce3fef5..641e1ada6eaa 100644
--- a/core/java/android/security/IKeystoreService.aidl
+++ b/core/java/android/security/IKeystoreService.aidl
@@ -76,4 +76,5 @@ interface IKeystoreService {
int onUserAdded(int userId, int parentId);
int onUserRemoved(int userId);
int attestKey(String alias, in KeymasterArguments params, out KeymasterCertificateChain chain);
+ int onDeviceOffBody();
}
diff --git a/keystore/java/android/security/KeyStore.java b/keystore/java/android/security/KeyStore.java
index 70e4b6ff2e59..00d786a93626 100644
--- a/keystore/java/android/security/KeyStore.java
+++ b/keystore/java/android/security/KeyStore.java
@@ -626,6 +626,16 @@ public class KeyStore {
}
}
+ /**
+ * Notify keystore that the device went off-body.
+ */
+ public void onDeviceOffBody() {
+ try {
+ mBinder.onDeviceOffBody();
+ } catch (RemoteException e) {
+ Log.w(TAG, "Cannot connect to keystore", e);
+ }
+ }
/**
* Returns a {@link KeyStoreException} corresponding to the provided keystore/keymaster error