alexandroid/decompiled/jadx/sources/androidx/webkit/internal/ApiFeature.java
KaKi87 a47fad5135 📦 Add decompiled Alexa 2.2.730155.0 (jadx, apktool, Hermes strings)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 00:04:16 +01:00

152 lines
5 KiB
Java

package androidx.webkit.internal;
import android.os.Build;
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;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
/* loaded from: classes14.dex */
public abstract class ApiFeature implements ConditionallySupportedFeature {
private static final Set<ApiFeature> sValues = new HashSet();
private final String mInternalFeatureValue;
private final String mPublicFeatureValue;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
public static class LAZY_HOLDER {
static final Set<String> WEBVIEW_APK_FEATURES = new HashSet(Arrays.asList(WebViewGlueCommunicator.getFactory().getWebViewFeatures()));
private LAZY_HOLDER() {
}
}
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
public static class M extends ApiFeature {
public M(String str, String str2) {
super(str, str2);
}
@Override // androidx.webkit.internal.ApiFeature
public final boolean isSupportedByFramework() {
return true;
}
}
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
public static class N extends ApiFeature {
public N(String str, String str2) {
super(str, str2);
}
@Override // androidx.webkit.internal.ApiFeature
public final boolean isSupportedByFramework() {
return true;
}
}
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
public static class NoFramework extends ApiFeature {
public NoFramework(String str, String str2) {
super(str, str2);
}
@Override // androidx.webkit.internal.ApiFeature
public final boolean isSupportedByFramework() {
return false;
}
}
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
public static class O extends ApiFeature {
public O(String str, String str2) {
super(str, str2);
}
@Override // androidx.webkit.internal.ApiFeature
public final boolean isSupportedByFramework() {
return true;
}
}
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
public static class O_MR1 extends ApiFeature {
public O_MR1(String str, String str2) {
super(str, str2);
}
@Override // androidx.webkit.internal.ApiFeature
public final boolean isSupportedByFramework() {
return true;
}
}
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
public static class P extends ApiFeature {
public P(String str, String str2) {
super(str, str2);
}
@Override // androidx.webkit.internal.ApiFeature
public final boolean isSupportedByFramework() {
return true;
}
}
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
public static class Q extends ApiFeature {
public Q(String str, String str2) {
super(str, str2);
}
@Override // androidx.webkit.internal.ApiFeature
public final boolean isSupportedByFramework() {
return true;
}
}
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
public static class T extends ApiFeature {
public T(String str, String str2) {
super(str, str2);
}
@Override // androidx.webkit.internal.ApiFeature
public final boolean isSupportedByFramework() {
return Build.VERSION.SDK_INT >= 33;
}
}
public ApiFeature(String str, String str2) {
this.mPublicFeatureValue = str;
this.mInternalFeatureValue = str2;
sValues.add(this);
}
@VisibleForTesting
public static Set<String> getWebViewApkFeaturesForTesting() {
return LAZY_HOLDER.WEBVIEW_APK_FEATURES;
}
public static Set<ApiFeature> values() {
return Collections.unmodifiableSet(sValues);
}
@Override // androidx.webkit.internal.ConditionallySupportedFeature
public String getPublicFeatureName() {
return this.mPublicFeatureValue;
}
@Override // androidx.webkit.internal.ConditionallySupportedFeature
public boolean isSupported() {
return isSupportedByFramework() || isSupportedByWebView();
}
public abstract boolean isSupportedByFramework();
public boolean isSupportedByWebView() {
return BoundaryInterfaceReflectionUtil.containsFeature(LAZY_HOLDER.WEBVIEW_APK_FEATURES, this.mInternalFeatureValue);
}
}