@Override
public void onPageFinished(AmazonWebView view, final String url) {
SslCertificate certificate = view.getCertificate();
if (!TextUtils.isEmpty(restoredUrl)) {
if (restoredUrl.equals(url) && certificate == null) {
// We just restored the previous state. Let's re-use the certificate we restored.
// The reason for that is that WebView doesn't restore the certificate itself.
// Without restoring the certificate manually we'd lose the certificate when
// switching tabs or restoring a previous session for other reasons.
certificate = restoredCertificate;
} else {
// The URL has changed since we restored the last state. Let's just clear all
// restored data because we do not need it anymore.
restoredUrl = null;
restoredCertificate = null;
}
}
if (callback != null) {
callback.onPageFinished(certificate != null);
// The URL which is supplied in onPageFinished() could be fake (see #301), but webview's
// URL is always correct _except_ for error pages
final String viewURL = view.getUrl();
if (!UrlUtils.isInternalErrorURL(viewURL) && viewURL != null) {
callback.onURLChanged(viewURL);
}
}
super.onPageFinished(view, url);
// evaluateJavascript(view,
// "(function() {" +
//
// CLEAR_VISITED_CSS +
//
// "})();");
}
FocusWebViewClient.java 文件源码
java
阅读 26
收藏 0
点赞 0
评论 0
项目:firefox-tv
作者:
评论列表
文章目录