alexandroid/decompiled/jadx/sources/androidx/webkit/internal/TracingControllerImpl.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

87 lines
3.6 KiB
Java

package androidx.webkit.internal;
import androidx.annotation.RequiresApi;
import androidx.webkit.TracingConfig;
import androidx.webkit.TracingController;
import androidx.webkit.internal.ApiFeature;
import java.io.OutputStream;
import java.util.concurrent.Executor;
import org.chromium.support_lib_boundary.TracingControllerBoundaryInterface;
import rx.Single$$ExternalSyntheticBUOutline0;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
/* loaded from: classes14.dex */
public class TracingControllerImpl extends TracingController {
private TracingControllerBoundaryInterface mBoundaryInterface;
private android.webkit.TracingController mFrameworksImpl;
public TracingControllerImpl() {
ApiFeature.P p = WebViewFeatureInternal.TRACING_CONTROLLER_BASIC_USAGE;
if (p.isSupportedByFramework()) {
this.mFrameworksImpl = ApiHelperForP.getTracingControllerInstance();
this.mBoundaryInterface = null;
} else {
if (!p.isSupportedByWebView()) {
throw WebViewFeatureInternal.getUnsupportedOperationException();
}
this.mFrameworksImpl = null;
this.mBoundaryInterface = WebViewGlueCommunicator.getFactory().getTracingController();
}
}
private TracingControllerBoundaryInterface getBoundaryInterface() {
if (this.mBoundaryInterface == null) {
this.mBoundaryInterface = WebViewGlueCommunicator.getFactory().getTracingController();
}
return this.mBoundaryInterface;
}
@RequiresApi(28)
private android.webkit.TracingController getFrameworksImpl() {
if (this.mFrameworksImpl == null) {
this.mFrameworksImpl = ApiHelperForP.getTracingControllerInstance();
}
return this.mFrameworksImpl;
}
@Override // androidx.webkit.TracingController
public boolean isTracing() {
ApiFeature.P p = WebViewFeatureInternal.TRACING_CONTROLLER_BASIC_USAGE;
if (p.isSupportedByFramework()) {
return ApiHelperForP.isTracing(getFrameworksImpl());
}
if (p.isSupportedByWebView()) {
return getBoundaryInterface().isTracing();
}
throw WebViewFeatureInternal.getUnsupportedOperationException();
}
@Override // androidx.webkit.TracingController
public void start(TracingConfig tracingConfig) {
if (tracingConfig == null) {
Single$$ExternalSyntheticBUOutline0.m$3("Tracing config must be non null");
return;
}
ApiFeature.P p = WebViewFeatureInternal.TRACING_CONTROLLER_BASIC_USAGE;
if (p.isSupportedByFramework()) {
ApiHelperForP.start(getFrameworksImpl(), tracingConfig);
} else {
if (!p.isSupportedByWebView()) {
throw WebViewFeatureInternal.getUnsupportedOperationException();
}
getBoundaryInterface().start(tracingConfig.getPredefinedCategories(), tracingConfig.getCustomIncludedCategories(), tracingConfig.getTracingMode());
}
}
@Override // androidx.webkit.TracingController
public boolean stop(OutputStream outputStream, Executor executor) {
ApiFeature.P p = WebViewFeatureInternal.TRACING_CONTROLLER_BASIC_USAGE;
if (p.isSupportedByFramework()) {
return ApiHelperForP.stop(getFrameworksImpl(), outputStream, executor);
}
if (p.isSupportedByWebView()) {
return getBoundaryInterface().stop(outputStream, executor);
}
throw WebViewFeatureInternal.getUnsupportedOperationException();
}
}