public class

IncompatibleApkWebViewProviderFactory

extends java.lang.Object

implements WebViewProviderFactory

 java.lang.Object

↳androidx.webkit.internal.IncompatibleApkWebViewProviderFactory

Gradle dependencies

compile group: 'androidx.webkit', name: 'webkit', version: '1.12.0-rc01'

  • groupId: androidx.webkit
  • artifactId: webkit
  • version: 1.12.0-rc01

Artifact androidx.webkit:webkit:1.12.0-rc01 it located at Google repository (https://maven.google.com/)

Androidx artifact mapping:

androidx.webkit:webkit com.android.support:webkit

Overview

This is a stub class used when the WebView Support Library is invoked on a device incompatible with the library (either a pre-L device or a device without a compatible WebView APK). The only method in this class that should be called is IncompatibleApkWebViewProviderFactory.getWebViewFeatures().

Summary

Constructors
publicIncompatibleApkWebViewProviderFactory()

Methods
public org.chromium.support_lib_boundary.WebViewProviderBoundaryInterfacecreateWebView(WebView webview)

public org.chromium.support_lib_boundary.DropDataContentProviderBoundaryInterfacegetDropDataProvider()

public org.chromium.support_lib_boundary.ProfileStoreBoundaryInterfacegetProfileStore()

public org.chromium.support_lib_boundary.ProxyControllerBoundaryInterfacegetProxyController()

public org.chromium.support_lib_boundary.ServiceWorkerControllerBoundaryInterfacegetServiceWorkerController()

public org.chromium.support_lib_boundary.StaticsBoundaryInterfacegetStatics()

public org.chromium.support_lib_boundary.TracingControllerBoundaryInterfacegetTracingController()

public org.chromium.support_lib_boundary.WebkitToCompatConverterBoundaryInterfacegetWebkitToCompatConverter()

public java.lang.StringgetWebViewFeatures()

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public IncompatibleApkWebViewProviderFactory()

Methods

public org.chromium.support_lib_boundary.WebViewProviderBoundaryInterface createWebView(WebView webview)

public org.chromium.support_lib_boundary.WebkitToCompatConverterBoundaryInterface getWebkitToCompatConverter()

public org.chromium.support_lib_boundary.StaticsBoundaryInterface getStatics()

public java.lang.String getWebViewFeatures()

public org.chromium.support_lib_boundary.ServiceWorkerControllerBoundaryInterface getServiceWorkerController()

public org.chromium.support_lib_boundary.TracingControllerBoundaryInterface getTracingController()

public org.chromium.support_lib_boundary.ProxyControllerBoundaryInterface getProxyController()

public org.chromium.support_lib_boundary.DropDataContentProviderBoundaryInterface getDropDataProvider()

public org.chromium.support_lib_boundary.ProfileStoreBoundaryInterface getProfileStore()

Source

/*
 * Copyright 2018 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package androidx.webkit.internal;

import android.webkit.WebView;

import androidx.annotation.NonNull;

import org.chromium.support_lib_boundary.DropDataContentProviderBoundaryInterface;
import org.chromium.support_lib_boundary.ProfileStoreBoundaryInterface;
import org.chromium.support_lib_boundary.ProxyControllerBoundaryInterface;
import org.chromium.support_lib_boundary.ServiceWorkerControllerBoundaryInterface;
import org.chromium.support_lib_boundary.StaticsBoundaryInterface;
import org.chromium.support_lib_boundary.TracingControllerBoundaryInterface;
import org.chromium.support_lib_boundary.WebViewProviderBoundaryInterface;
import org.chromium.support_lib_boundary.WebkitToCompatConverterBoundaryInterface;

/**
 * This is a stub class used when the WebView Support Library is invoked on a device incompatible
 * with the library (either a pre-L device or a device without a compatible WebView APK).
 * The only method in this class that should be called is {@link #getWebViewFeatures()}.
 */
public class IncompatibleApkWebViewProviderFactory implements WebViewProviderFactory {
    private static final String[] EMPTY_STRING_ARRAY = new String[0];
    private static final String UNSUPPORTED_EXCEPTION_EXPLANATION =
            "This should never happen, if this method was called it means we're trying to reach "
            + "into WebView APK code on an incompatible device. This most likely means the current "
            + "method is being called too early, or is being called on start-up rather than lazily";

    @Override
    @NonNull
    public WebViewProviderBoundaryInterface createWebView(@NonNull WebView webview) {
        throw new UnsupportedOperationException(UNSUPPORTED_EXCEPTION_EXPLANATION);
    }

    @Override
    @NonNull
    public WebkitToCompatConverterBoundaryInterface getWebkitToCompatConverter() {
        throw new UnsupportedOperationException(UNSUPPORTED_EXCEPTION_EXPLANATION);
    }

    @Override
    @NonNull
    public StaticsBoundaryInterface getStatics() {
        throw new UnsupportedOperationException(UNSUPPORTED_EXCEPTION_EXPLANATION);
    }

    @Override
    @NonNull
    public String[] getWebViewFeatures() {
        return EMPTY_STRING_ARRAY;
    }

    @Override
    @NonNull
    public ServiceWorkerControllerBoundaryInterface getServiceWorkerController() {
        throw new UnsupportedOperationException(UNSUPPORTED_EXCEPTION_EXPLANATION);
    }

    @Override
    @NonNull
    public TracingControllerBoundaryInterface getTracingController() {
        throw new UnsupportedOperationException(UNSUPPORTED_EXCEPTION_EXPLANATION);
    }

    @Override
    @NonNull
    public ProxyControllerBoundaryInterface getProxyController() {
        throw new UnsupportedOperationException(UNSUPPORTED_EXCEPTION_EXPLANATION);
    }

    @NonNull
    @Override
    public DropDataContentProviderBoundaryInterface getDropDataProvider() {
        throw new UnsupportedOperationException(UNSUPPORTED_EXCEPTION_EXPLANATION);
    }

    @NonNull
    @Override
    public ProfileStoreBoundaryInterface getProfileStore() {
        throw new UnsupportedOperationException(UNSUPPORTED_EXCEPTION_EXPLANATION);
    }
}