From 3c4b2273accf835a407a1b689be69c74f2efc4db Mon Sep 17 00:00:00 2001 From: Marcin Kosiba Date: Tue, 5 Aug 2014 11:00:49 +0100 Subject: [PATCH] Update WebViewFactory.java to compile in AOSP. Change-Id: I076ef48a3205969f1945bff93ea0305e9907b20a --- core/java/android/webkit/WebViewFactory.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/java/android/webkit/WebViewFactory.java b/core/java/android/webkit/WebViewFactory.java index 732518d71c6dc..56849f31673a0 100644 --- a/core/java/android/webkit/WebViewFactory.java +++ b/core/java/android/webkit/WebViewFactory.java @@ -66,6 +66,11 @@ public final class WebViewFactory { return false; // User has not modifed Developer Settings } + public static String getWebViewPackageName() { + // TODO: Make this dynamic based on resource configuration. + return "com.android.webview"; + } + static WebViewFactoryProvider getProvider() { synchronized (sProviderLock) { // For now the main purpose of this function (and the factory abstraction) is to keep @@ -103,8 +108,7 @@ public final class WebViewFactory { return (Class) Class.forName(CHROMIUM_WEBVIEW_FACTORY, true, clazzLoader); } catch (PackageManager.NameNotFoundException e) { - Log.e(LOGTAG, "Chromium WebView package does not exist"); - return (Class) Class.forName(NULL_WEBVIEW_FACTORY); + throw new ClassNotFoundException("Chromium WebView package does not exist", e); } } }