mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-15 18:37:17 +01:00
114 lines
6.9 KiB
Java
114 lines
6.9 KiB
Java
package com.facebook.react.bridge;
|
|
|
|
import androidx.core.os.ParcelCompat$$ExternalSyntheticOutline0;
|
|
import com.facebook.common.logging.FLog;
|
|
import com.facebook.proguard.annotations.DoNotStrip;
|
|
import com.google.android.gms.common.internal.ServiceSpecificExtraArgs;
|
|
import java.lang.annotation.Retention;
|
|
import java.lang.annotation.RetentionPolicy;
|
|
import java.util.Iterator;
|
|
import java.util.List;
|
|
import java.util.concurrent.CopyOnWriteArrayList;
|
|
import kotlin.Metadata;
|
|
import kotlin.annotation.AnnotationRetention;
|
|
import kotlin.jvm.JvmStatic;
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@DoNotStrip
|
|
@Metadata(d1 = {"\u0000,\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0003\n\u0002\u0010!\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0004\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u0003\n\u0002\b\u0007\bÁ\u0002\u0018\u00002\u00020\u0001:\u0003\u0013\u0014\u0015B\t\b\u0002¢\u0006\u0004\b\u0002\u0010\u0003J\u0010\u0010\u0007\u001a\u00020\b2\u0006\u0010\t\u001a\u00020\u0006H\u0007J\u0010\u0010\n\u001a\u00020\b2\u0006\u0010\t\u001a\u00020\u0006H\u0007J\u0018\u0010\u000b\u001a\u00020\b2\u0006\u0010\f\u001a\u00020\r2\u0006\u0010\u000e\u001a\u00020\u000fH\u0007J\u0018\u0010\u0010\u001a\u00020\b2\u0006\u0010\f\u001a\u00020\r2\u0006\u0010\u000e\u001a\u00020\u000fH\u0007J\u0018\u0010\u0011\u001a\u00020\b2\u0006\u0010\f\u001a\u00020\r2\u0006\u0010\u0012\u001a\u00020\rH\u0003R\u0014\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00060\u0005X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\u0016"}, d2 = {"Lcom/facebook/react/bridge/ReactSoftExceptionLogger;", "", "<init>", "()V", "listeners", "", "Lcom/facebook/react/bridge/ReactSoftExceptionLogger$ReactSoftExceptionListener;", "addListener", "", ServiceSpecificExtraArgs.CastExtraArgs.LISTENER, "removeListener", "logSoftExceptionVerbose", "category", "", "cause", "", "logSoftException", "logNoThrowSoftExceptionWithMessage", "message", "CategoryMode", "Categories", "ReactSoftExceptionListener", "ReactAndroid_release"}, k = 1, mv = {2, 1, 0}, xi = 48)
|
|
/* loaded from: classes6.dex */
|
|
public final class ReactSoftExceptionLogger {
|
|
|
|
@NotNull
|
|
public static final ReactSoftExceptionLogger INSTANCE = new ReactSoftExceptionLogger();
|
|
|
|
@NotNull
|
|
private static final List<ReactSoftExceptionListener> listeners = new CopyOnWriteArrayList();
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@Metadata(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0003\n\u0002\u0010\u000e\n\u0002\b\u0005\bÆ\u0002\u0018\u00002\u00020\u0001B\t\b\u0002¢\u0006\u0004\b\u0002\u0010\u0003R\u000e\u0010\u0004\u001a\u00020\u0005X\u0086T¢\u0006\u0002\n\u0000R\u000e\u0010\u0006\u001a\u00020\u0005X\u0086T¢\u0006\u0002\n\u0000R\u000e\u0010\u0007\u001a\u00020\u0005X\u0086T¢\u0006\u0002\n\u0000R\u000e\u0010\b\u001a\u00020\u0005X\u0086T¢\u0006\u0002\n\u0000R\u000e\u0010\t\u001a\u00020\u0005X\u0086T¢\u0006\u0002\n\u0000¨\u0006\n"}, d2 = {"Lcom/facebook/react/bridge/ReactSoftExceptionLogger$Categories;", "", "<init>", "()V", "RVG_IS_VIEW_CLIPPED", "", "RVG_ON_VIEW_REMOVED", "CLIPPING_PROHIBITED_VIEW", "SOFT_ASSERTIONS", "SURFACE_MOUNTING_MANAGER_MISSING_VIEWSTATE", "ReactAndroid_release"}, k = 1, mv = {2, 1, 0}, xi = 48)
|
|
public static final class Categories {
|
|
|
|
@NotNull
|
|
public static final String CLIPPING_PROHIBITED_VIEW = "ReactClippingProhibitedView";
|
|
|
|
@NotNull
|
|
public static final Categories INSTANCE = new Categories();
|
|
|
|
@NotNull
|
|
public static final String RVG_IS_VIEW_CLIPPED = "ReactViewGroup.isViewClipped";
|
|
|
|
@NotNull
|
|
public static final String RVG_ON_VIEW_REMOVED = "ReactViewGroup.onViewRemoved";
|
|
|
|
@NotNull
|
|
public static final String SOFT_ASSERTIONS = "SoftAssertions";
|
|
|
|
@NotNull
|
|
public static final String SURFACE_MOUNTING_MANAGER_MISSING_VIEWSTATE = "SurfaceMountingManager:MissingViewState";
|
|
|
|
private Categories() {
|
|
}
|
|
}
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@Metadata(d1 = {"\u0000\n\n\u0002\u0018\u0002\n\u0002\u0010\u001b\n\u0000\b\u0087\u0002\u0018\u00002\u00020\u0001B\u0000¨\u0006\u0002"}, d2 = {"Lcom/facebook/react/bridge/ReactSoftExceptionLogger$CategoryMode;", "", "ReactAndroid_release"}, k = 1, mv = {2, 1, 0}, xi = 48)
|
|
@Retention(RetentionPolicy.SOURCE)
|
|
@kotlin.annotation.Retention(AnnotationRetention.SOURCE)
|
|
public @interface CategoryMode {
|
|
}
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@Metadata(d1 = {"\u0000\u001c\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u0003\n\u0000\bæ\u0080\u0001\u0018\u00002\u00020\u0001J\u0018\u0010\u0002\u001a\u00020\u00032\u0006\u0010\u0004\u001a\u00020\u00052\u0006\u0010\u0006\u001a\u00020\u0007H&ø\u0001\u0000\u0082\u0002\u0006\n\u0004\b!0\u0001¨\u0006\bÀ\u0006\u0001"}, d2 = {"Lcom/facebook/react/bridge/ReactSoftExceptionLogger$ReactSoftExceptionListener;", "", "logSoftException", "", "category", "", "cause", "", "ReactAndroid_release"}, k = 1, mv = {2, 1, 0}, xi = 48)
|
|
public interface ReactSoftExceptionListener {
|
|
void logSoftException(@NotNull String category, @NotNull Throwable cause);
|
|
}
|
|
|
|
private ReactSoftExceptionLogger() {
|
|
}
|
|
|
|
@JvmStatic
|
|
public static final void addListener(@NotNull ReactSoftExceptionListener listener) {
|
|
listener.getClass();
|
|
List<ReactSoftExceptionListener> list = listeners;
|
|
if (list.contains(listener)) {
|
|
return;
|
|
}
|
|
list.add(listener);
|
|
}
|
|
|
|
@JvmStatic
|
|
@DoNotStrip
|
|
private static final void logNoThrowSoftExceptionWithMessage(String category, String message) {
|
|
logSoftException(category, new ReactNoCrashSoftException(message));
|
|
}
|
|
|
|
@JvmStatic
|
|
public static final void logSoftException(@NotNull String category, @NotNull Throwable cause) {
|
|
category.getClass();
|
|
cause.getClass();
|
|
List<ReactSoftExceptionListener> list = listeners;
|
|
if (list.isEmpty()) {
|
|
FLog.e(category, "Unhandled SoftException", cause);
|
|
return;
|
|
}
|
|
Iterator<ReactSoftExceptionListener> it2 = list.iterator();
|
|
while (it2.hasNext()) {
|
|
it2.next().logSoftException(category, cause);
|
|
}
|
|
}
|
|
|
|
@JvmStatic
|
|
public static final void logSoftExceptionVerbose(@NotNull String category, @NotNull Throwable cause) {
|
|
category.getClass();
|
|
cause.getClass();
|
|
logSoftException(ParcelCompat$$ExternalSyntheticOutline0.m(category, "|", cause.getClass().getSimpleName(), ":", cause.getMessage()), cause);
|
|
}
|
|
|
|
@JvmStatic
|
|
public static final void removeListener(@NotNull ReactSoftExceptionListener listener) {
|
|
listener.getClass();
|
|
listeners.remove(listener);
|
|
}
|
|
}
|