diff options
| author | TreeHugger Robot <treehugger-gerrit@google.com> | 2018-07-03 08:32:23 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2018-07-03 08:32:23 +0000 |
| commit | 95e4e67dc64f00f8db6b4be773bb3f72f64d719b (patch) | |
| tree | bab0622e566bb7e0492e9b9a0f92bd2ccee4b785 /core/java/android | |
| parent | a554f8791ee8f921ae52514c24c1b1c6c2286f68 (diff) | |
| parent | 2a8f129c2ac16550cacf85dccef73f90f263144a (diff) | |
Merge "Docs: generateKeyPair() can't be called from the main thread."
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/app/admin/DevicePolicyManager.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java index 5e7f1e40f9c7..bbdc5323648d 100644 --- a/core/java/android/app/admin/DevicePolicyManager.java +++ b/core/java/android/app/admin/DevicePolicyManager.java @@ -4153,8 +4153,11 @@ public class DevicePolicyManager { * Called by a device or profile owner, or delegated certificate installer, to generate a * new private/public key pair. If the device supports key generation via secure hardware, * this method is useful for creating a key in KeyChain that never left the secure hardware. - * * Access to the key is controlled the same way as in {@link #installKeyPair}. + * + * <p>Because this method might take several seconds to complete, it should only be called from + * a worker thread. This method returns {@code null} when called from the main thread. + * * @param admin Which {@link DeviceAdminReceiver} this request is associated with, or * {@code null} if calling from a delegated certificate installer. * @param algorithm The key generation algorithm, see {@link java.security.KeyPairGenerator}. |
