summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSelim Gurun <sgurun@google.com>2015-06-22 17:55:27 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-06-22 17:55:29 +0000
commit7c781124763cf50ede30e6836234046bf3ec0a92 (patch)
tree087e7030864f14625e04172b76d49d019ff43fab
parentc424d1f0fa0018b5161ead62f87d6fda24982cc9 (diff)
parenta679ac59a165fc17fdac21e95183972f73973c31 (diff)
downloadframeworks_base-7c781124763cf50ede30e6836234046bf3ec0a92.zip
frameworks_base-7c781124763cf50ede30e6836234046bf3ec0a92.tar.gz
frameworks_base-7c781124763cf50ede30e6836234046bf3ec0a92.tar.bz2
Merge "Clarify handling client certificates" into mnc-dev
-rw-r--r--core/java/android/webkit/WebViewClient.java21
1 files changed, 17 insertions, 4 deletions
diff --git a/core/java/android/webkit/WebViewClient.java b/core/java/android/webkit/WebViewClient.java
index 2f5c9e2..de8ccc1 100644
--- a/core/java/android/webkit/WebViewClient.java
+++ b/core/java/android/webkit/WebViewClient.java
@@ -298,14 +298,27 @@ public class WebViewClient {
* Notify the host application to handle a SSL client certificate
* request. The host application is responsible for showing the UI
* if desired and providing the keys. There are three ways to
- * respond: proceed(), cancel() or ignore(). Webview remembers the
- * response if proceed() or cancel() is called and does not
- * call onReceivedClientCertRequest() again for the same host and port
- * pair. Webview does not remember the response if ignore() is called.
+ * respond: proceed(), cancel() or ignore(). Webview stores the response
+ * in memory (for the life of the application) if proceed() or cancel() is
+ * called and does not call onReceivedClientCertRequest() again for the
+ * same host and port pair. Webview does not store the response if ignore()
+ * is called.
*
* This method is called on the UI thread. During the callback, the
* connection is suspended.
*
+ * For most use cases, the application program should implement the
+ * {@link android.security.KeyChainAliasCallback} interface and pass it to
+ * {@link android.security.KeyChain#choosePrivateKeyAlias} to start an
+ * activity for the user to choose the proper alias. The keychain activity will
+ * provide the alias through the callback method in the implemented interface. Next
+ * the application should create an async task to call
+ * {@link android.security.KeyChain#getPrivateKey} to receive the key.
+ *
+ * An example implementation of client certificates can be seen at
+ * <A href="https://android.googlesource.com/platform/packages/apps/Browser/+/android-5.1.1_r1/src/com/android/browser/Tab.java">
+ * AOSP Browser</a>
+ *
* The default behavior is to cancel, returning no client certificate.
*
* @param view The WebView that is initiating the callback