Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2453f611 authored by Marcin Kosiba's avatar Marcin Kosiba Committed by Gerrit Code Review
Browse files

Merge "Remove WebView library preloading mechanism."

parents 8178edfc 3d9bcc06
Loading
Loading
Loading
Loading
+0 −20
Original line number Diff line number Diff line
@@ -36,17 +36,6 @@ public final class WebViewFactory {

    private static final boolean DEBUG = false;

    private static class Preloader {
        static WebViewFactoryProvider sPreloadedProvider;
        static {
            try {
                sPreloadedProvider = getFactoryClass().newInstance();
            } catch (Exception e) {
                Log.w(LOGTAG, "error preloading provider", e);
            }
        }
    }

    // Cache the factory both for efficiency, and ensure any one process gets all webviews from the
    // same provider.
    private static WebViewFactoryProvider sProviderInstance;
@@ -88,15 +77,6 @@ public final class WebViewFactory {
                throw new AndroidRuntimeException(e);
            }

            // This implicitly loads Preloader even if it wasn't preloaded at boot.
            if (Preloader.sPreloadedProvider != null &&
                Preloader.sPreloadedProvider.getClass() == providerClass) {
                sProviderInstance = Preloader.sPreloadedProvider;
                if (DEBUG) Log.v(LOGTAG, "Using preloaded provider: " + sProviderInstance);
                return sProviderInstance;
            }

            // The preloaded provider isn't the one we wanted; construct our own.
            StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads();
            try {
                sProviderInstance = providerClass.newInstance();
+0 −1
Original line number Diff line number Diff line
@@ -1222,7 +1222,6 @@ android.webkit.WebView$PrivateAccess
android.webkit.WebViewClient
android.webkit.WebViewDatabase
android.webkit.WebViewFactory
android.webkit.WebViewFactory$Preloader
android.webkit.WebViewFactoryProvider
android.webkit.WebViewFactoryProvider$Statics
android.webkit.WebViewProvider