Skip to content

Commit 9a0cd15

Browse files
author
Steve Block
committed
Always update the WebView's SSL certificate, regardless of whether a WebViewClient has been set
This looks like a copy-paste error from other CallbackProxy methods which call back to the WebViewClient or WebChromeClient, rather than the WebView. Also remove '@hide' annotations. These are superfluous as the class is not public. Bug: 5287216 Change-Id: If97c4d769cf82563b9c182ba09fc742fbb7e08e9
1 parent 200ff0a commit 9a0cd15

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

core/java/android/webkit/CallbackProxy.java

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,6 @@ public void setWebViewClient(WebViewClient client) {
165165
/**
166166
* Get the WebViewClient.
167167
* @return the current WebViewClient instance.
168-
*
169-
*@hide pending API council approval.
170168
*/
171169
public WebViewClient getWebViewClient() {
172170
return mWebViewClient;
@@ -1013,10 +1011,6 @@ public void onReceivedHttpAuthRequest(HttpAuthHandler handler,
10131011
sendMessage(msg);
10141012
}
10151013

1016-
/**
1017-
* @hide - hide this because it contains a parameter of type SslError.
1018-
* SslError is located in a hidden package.
1019-
*/
10201014
public void onReceivedSslError(SslErrorHandler handler, SslError error) {
10211015
// Do an unsynchronized quick check to avoid posting if no callback has
10221016
// been set.
@@ -1031,9 +1025,7 @@ public void onReceivedSslError(SslErrorHandler handler, SslError error) {
10311025
msg.obj = map;
10321026
sendMessage(msg);
10331027
}
1034-
/**
1035-
* @hide
1036-
*/
1028+
10371029
public void onReceivedClientCertRequest(ClientCertRequestHandler handler, String host_and_port) {
10381030
// Do an unsynchronized quick check to avoid posting if no callback has
10391031
// been set.
@@ -1048,17 +1040,8 @@ public void onReceivedClientCertRequest(ClientCertRequestHandler handler, String
10481040
msg.obj = map;
10491041
sendMessage(msg);
10501042
}
1051-
/**
1052-
* @hide - hide this because it contains a parameter of type SslCertificate,
1053-
* which is located in a hidden package.
1054-
*/
10551043

10561044
public void onReceivedCertificate(SslCertificate certificate) {
1057-
// Do an unsynchronized quick check to avoid posting if no callback has
1058-
// been set.
1059-
if (mWebViewClient == null) {
1060-
return;
1061-
}
10621045
// here, certificate can be null (if the site is not secure)
10631046
sendMessage(obtainMessage(RECEIVED_CERTIFICATE, certificate));
10641047
}

0 commit comments

Comments
 (0)