alexandroid/decompiled/jadx/sources/com/facebook/react/views/view/CanvasUtil.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

65 lines
2.9 KiB
Java

package com.facebook.react.views.view;
import android.annotation.SuppressLint;
import android.graphics.Canvas;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import kotlin.Metadata;
import kotlin.jvm.JvmStatic;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
@Metadata(d1 = {"\u0000(\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\bÀ\u0002\u0018\u00002\u00020\u0001B\t\b\u0002¢\u0006\u0004\b\u0002\u0010\u0003J\u0018\u0010\t\u001a\u00020\n2\u0006\u0010\u000b\u001a\u00020\f2\u0006\u0010\r\u001a\u00020\bH\u0007J\b\u0010\u000e\u001a\u00020\nH\u0002R\u0010\u0010\u0004\u001a\u0004\u0018\u00010\u0005X\u0082\u000e¢\u0006\u0002\n\u0000R\u0010\u0010\u0006\u001a\u0004\u0018\u00010\u0005X\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\u0007\u001a\u00020\bX\u0082\u000e¢\u0006\u0002\n\u0000¨\u0006\u000f"}, d2 = {"Lcom/facebook/react/views/view/CanvasUtil;", "", "<init>", "()V", "reorderBarrierMethod", "Ljava/lang/reflect/Method;", "inorderBarrierMethod", "orderMethodsFetched", "", "enableZ", "", "canvas", "Landroid/graphics/Canvas;", "enable", "fetchOrderMethods", "ReactAndroid_release"}, k = 1, mv = {2, 1, 0}, xi = 48)
/* loaded from: classes7.dex */
public final class CanvasUtil {
@NotNull
public static final CanvasUtil INSTANCE = new CanvasUtil();
@Nullable
private static Method inorderBarrierMethod;
private static boolean orderMethodsFetched;
@Nullable
private static Method reorderBarrierMethod;
private CanvasUtil() {
}
@JvmStatic
@SuppressLint({"SoonBlockedPrivateApi", "PrivateApi"})
public static final void enableZ(@NotNull Canvas canvas, boolean enable) {
canvas.getClass();
if (enable) {
canvas.enableZ();
} else {
canvas.disableZ();
}
}
private final void fetchOrderMethods() {
Method declaredMethod;
Method method;
if (orderMethodsFetched) {
return;
}
try {
reorderBarrierMethod = Canvas.class.getDeclaredMethod("insertReorderBarrier", null);
declaredMethod = Canvas.class.getDeclaredMethod("insertInorderBarrier", null);
inorderBarrierMethod = declaredMethod;
method = reorderBarrierMethod;
} catch (IllegalAccessException | NoSuchMethodException | InvocationTargetException unused) {
}
if (method != null && declaredMethod != null) {
if (method != null) {
method.setAccessible(true);
}
Method method2 = inorderBarrierMethod;
if (method2 != null) {
method2.setAccessible(true);
}
orderMethodsFetched = true;
}
}
}