- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
149 lines
4.4 KiB
Java
149 lines
4.4 KiB
Java
package androidx.webkit.internal;
|
|
|
|
import android.os.Build;
|
|
import androidx.annotation.ChecksSdkIntAtLeast;
|
|
import androidx.annotation.NonNull;
|
|
import androidx.annotation.VisibleForTesting;
|
|
import java.util.Arrays;
|
|
import java.util.Collections;
|
|
import java.util.HashSet;
|
|
import java.util.Set;
|
|
import org.chromium.support_lib_boundary.util.BoundaryInterfaceReflectionUtil;
|
|
|
|
/* loaded from: classes.dex */
|
|
public abstract class ApiFeature implements ConditionallySupportedFeature {
|
|
private static final Set<ApiFeature> sValues = new HashSet();
|
|
private final String mInternalFeatureValue;
|
|
private final String mPublicFeatureValue;
|
|
|
|
@Override // androidx.webkit.internal.ConditionallySupportedFeature
|
|
@NonNull
|
|
public String getPublicFeatureName() {
|
|
return this.mPublicFeatureValue;
|
|
}
|
|
|
|
public abstract boolean isSupportedByFramework();
|
|
|
|
public ApiFeature(@NonNull String str, @NonNull String str2) {
|
|
this.mPublicFeatureValue = str;
|
|
this.mInternalFeatureValue = str2;
|
|
sValues.add(this);
|
|
}
|
|
|
|
@Override // androidx.webkit.internal.ConditionallySupportedFeature
|
|
public boolean isSupported() {
|
|
return isSupportedByFramework() || isSupportedByWebView();
|
|
}
|
|
|
|
@ChecksSdkIntAtLeast(api = 21)
|
|
public boolean isSupportedByWebView() {
|
|
return BoundaryInterfaceReflectionUtil.containsFeature(LAZY_HOLDER.WEBVIEW_APK_FEATURES, this.mInternalFeatureValue);
|
|
}
|
|
|
|
@NonNull
|
|
public static Set<ApiFeature> values() {
|
|
return Collections.unmodifiableSet(sValues);
|
|
}
|
|
|
|
@NonNull
|
|
@VisibleForTesting
|
|
public static Set<String> getWebViewApkFeaturesForTesting() {
|
|
return LAZY_HOLDER.WEBVIEW_APK_FEATURES;
|
|
}
|
|
|
|
public static class LAZY_HOLDER {
|
|
static final Set<String> WEBVIEW_APK_FEATURES = new HashSet(Arrays.asList(WebViewGlueCommunicator.getFactory().getWebViewFeatures()));
|
|
|
|
private LAZY_HOLDER() {
|
|
}
|
|
}
|
|
|
|
public static class NoFramework extends ApiFeature {
|
|
@Override // androidx.webkit.internal.ApiFeature
|
|
public final boolean isSupportedByFramework() {
|
|
return false;
|
|
}
|
|
|
|
public NoFramework(@NonNull String str, @NonNull String str2) {
|
|
super(str, str2);
|
|
}
|
|
}
|
|
|
|
public static class M extends ApiFeature {
|
|
@Override // androidx.webkit.internal.ApiFeature
|
|
public final boolean isSupportedByFramework() {
|
|
return true;
|
|
}
|
|
|
|
public M(@NonNull String str, @NonNull String str2) {
|
|
super(str, str2);
|
|
}
|
|
}
|
|
|
|
public static class N extends ApiFeature {
|
|
@Override // androidx.webkit.internal.ApiFeature
|
|
public final boolean isSupportedByFramework() {
|
|
return true;
|
|
}
|
|
|
|
public N(@NonNull String str, @NonNull String str2) {
|
|
super(str, str2);
|
|
}
|
|
}
|
|
|
|
public static class O extends ApiFeature {
|
|
@Override // androidx.webkit.internal.ApiFeature
|
|
public final boolean isSupportedByFramework() {
|
|
return true;
|
|
}
|
|
|
|
public O(@NonNull String str, @NonNull String str2) {
|
|
super(str, str2);
|
|
}
|
|
}
|
|
|
|
public static class O_MR1 extends ApiFeature {
|
|
@Override // androidx.webkit.internal.ApiFeature
|
|
public final boolean isSupportedByFramework() {
|
|
return Build.VERSION.SDK_INT >= 27;
|
|
}
|
|
|
|
public O_MR1(@NonNull String str, @NonNull String str2) {
|
|
super(str, str2);
|
|
}
|
|
}
|
|
|
|
public static class P extends ApiFeature {
|
|
@Override // androidx.webkit.internal.ApiFeature
|
|
public final boolean isSupportedByFramework() {
|
|
return Build.VERSION.SDK_INT >= 28;
|
|
}
|
|
|
|
public P(@NonNull String str, @NonNull String str2) {
|
|
super(str, str2);
|
|
}
|
|
}
|
|
|
|
public static class Q extends ApiFeature {
|
|
@Override // androidx.webkit.internal.ApiFeature
|
|
public final boolean isSupportedByFramework() {
|
|
return Build.VERSION.SDK_INT >= 29;
|
|
}
|
|
|
|
public Q(@NonNull String str, @NonNull String str2) {
|
|
super(str, str2);
|
|
}
|
|
}
|
|
|
|
public static class T extends ApiFeature {
|
|
@Override // androidx.webkit.internal.ApiFeature
|
|
public final boolean isSupportedByFramework() {
|
|
return Build.VERSION.SDK_INT >= 33;
|
|
}
|
|
|
|
public T(@NonNull String str, @NonNull String str2) {
|
|
super(str, str2);
|
|
}
|
|
}
|
|
}
|