summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Dixon <joth@google.com>2012-06-08 10:15:32 -0700
committerJonathan Dixon <joth@google.com>2012-06-08 10:18:26 -0700
commitf4ff149372adfc22f140eb67e89a227fdc281781 (patch)
tree3f2c87015503930967c47649e8f06e4423c9b853
parentfa99f6daf84eed505005096b04369ee21dcc7865 (diff)
downloadandroid_packages_apps_Gello-f4ff149372adfc22f140eb67e89a227fdc281781.tar.gz
android_packages_apps_Gello-f4ff149372adfc22f140eb67e89a227fdc281781.tar.bz2
android_packages_apps_Gello-f4ff149372adfc22f140eb67e89a227fdc281781.zip
Fixup browser after hidden API refactor
Interdepends on https://android-git.corp.google.com/g/#/c/198193 Change-Id: I9f44c0f4f84674965b7afc652420986314e2fc8e
-rw-r--r--src/com/android/browser/Tab.java9
-rw-r--r--tests/src/com/android/browser/TestWebViewClient.java9
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} */