From f4ff149372adfc22f140eb67e89a227fdc281781 Mon Sep 17 00:00:00 2001 From: Jonathan Dixon Date: Fri, 8 Jun 2012 10:15:32 -0700 Subject: Fixup browser after hidden API refactor Interdepends on https://android-git.corp.google.com/g/#/c/198193 Change-Id: I9f44c0f4f84674965b7afc652420986314e2fc8e --- src/com/android/browser/Tab.java | 9 +++++---- tests/src/com/android/browser/TestWebViewClient.java | 9 +++++++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/com/android/browser/Tab.java b/src/com/android/browser/Tab.java index 28734bd6..0cf598fc 100644 --- a/src/com/android/browser/Tab.java +++ b/src/com/android/browser/Tab.java @@ -64,6 +64,7 @@ import android.webkit.WebView; import android.webkit.WebView.PictureListener; import android.webkit.WebViewClassic; import android.webkit.WebViewClient; +import android.webkit.WebViewClientClassicExt; import android.widget.CheckBox; import android.widget.Toast; @@ -322,7 +323,7 @@ class Tab implements PictureListener { // WebViewClient implementation for the main WebView // ------------------------------------------------------------------------- - private final WebViewClient mWebViewClient = new WebViewClient() { + private final WebViewClientClassicExt mWebViewClient = new WebViewClientClassicExt() { private Message mDontResend; private Message mResend; @@ -1045,12 +1046,12 @@ class Tab implements PictureListener { // Subclass of WebViewClient used in subwindows to notify the main // WebViewClient of certain WebView activities. - private static class SubWindowClient extends WebViewClient { + private static class SubWindowClient extends WebViewClientClassicExt { // The main WebViewClient. - private final WebViewClient mClient; + private final WebViewClientClassicExt mClient; private final WebViewController mController; - SubWindowClient(WebViewClient client, WebViewController controller) { + SubWindowClient(WebViewClientClassicExt client, WebViewController controller) { mClient = client; mController = controller; } diff --git a/tests/src/com/android/browser/TestWebViewClient.java b/tests/src/com/android/browser/TestWebViewClient.java index 208a8224..6ab40dd5 100644 --- a/tests/src/com/android/browser/TestWebViewClient.java +++ b/tests/src/com/android/browser/TestWebViewClient.java @@ -25,6 +25,7 @@ import android.webkit.HttpAuthHandler; import android.webkit.SslErrorHandler; import android.webkit.WebView; import android.webkit.WebViewClient; +import android.webkit.WebViewClientClassicExt; /** * @@ -33,7 +34,7 @@ import android.webkit.WebViewClient; * Wraps around existing client so that specific methods can be overridden if needed. * */ -abstract class TestWebViewClient extends WebViewClient { +abstract class TestWebViewClient extends WebViewClientClassicExt { private WebViewClient mWrappedClient; @@ -105,7 +106,11 @@ abstract class TestWebViewClient extends WebViewClient { @Override public void onReceivedClientCertRequest(WebView view, ClientCertRequestHandler handler, String host_and_port) { - mWrappedClient.onReceivedClientCertRequest(view, handler, host_and_port); + if (mWrappedClient instanceof WebViewClientClassicExt) { + ((WebViewClientClassicExt) mWrappedClient).onReceivedClientCertRequest(view, handler, host_and_port); + } else { + super.onReceivedClientCertRequest(view, handler, host_and_port); + } } /** {@inheritDoc} */ -- cgit v1.2.3