Files
rr3-apk/decompiled-community/sources/com/google/firebase/crashlytics/internal/common/CrashlyticsUncaughtExceptionHandler.java
Daniel Elliott c080f0d97f Add Discord community version (64-bit only)
- 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
2026-02-18 15:48:36 -08:00

72 lines
3.2 KiB
Java

package com.google.firebase.crashlytics.internal.common;
import com.google.firebase.crashlytics.internal.CrashlyticsNativeComponent;
import com.google.firebase.crashlytics.internal.Logger;
import com.google.firebase.crashlytics.internal.settings.SettingsProvider;
import java.lang.Thread;
import java.util.concurrent.atomic.AtomicBoolean;
/* loaded from: classes3.dex */
public class CrashlyticsUncaughtExceptionHandler implements Thread.UncaughtExceptionHandler {
public final CrashListener crashListener;
public final Thread.UncaughtExceptionHandler defaultHandler;
public final AtomicBoolean isHandlingException = new AtomicBoolean(false);
public final CrashlyticsNativeComponent nativeComponent;
public final SettingsProvider settingsProvider;
public interface CrashListener {
void onUncaughtException(SettingsProvider settingsProvider, Thread thread, Throwable th);
}
public CrashlyticsUncaughtExceptionHandler(CrashListener crashListener, SettingsProvider settingsProvider, Thread.UncaughtExceptionHandler uncaughtExceptionHandler, CrashlyticsNativeComponent crashlyticsNativeComponent) {
this.crashListener = crashListener;
this.settingsProvider = settingsProvider;
this.defaultHandler = uncaughtExceptionHandler;
this.nativeComponent = crashlyticsNativeComponent;
}
@Override // java.lang.Thread.UncaughtExceptionHandler
public void uncaughtException(Thread thread, Throwable th) {
this.isHandlingException.set(true);
try {
try {
if (shouldRecordUncaughtException(thread, th)) {
this.crashListener.onUncaughtException(this.settingsProvider, thread, th);
} else {
Logger.getLogger().d("Uncaught exception will not be recorded by Crashlytics.");
}
} catch (Exception e) {
Logger.getLogger().e("An error occurred in the uncaught exception handler", e);
}
Logger.getLogger().d("Completed exception processing. Invoking default exception handler.");
this.defaultHandler.uncaughtException(thread, th);
this.isHandlingException.set(false);
} catch (Throwable th2) {
Logger.getLogger().d("Completed exception processing. Invoking default exception handler.");
this.defaultHandler.uncaughtException(thread, th);
this.isHandlingException.set(false);
throw th2;
}
}
public boolean isHandlingException() {
return this.isHandlingException.get();
}
public final boolean shouldRecordUncaughtException(Thread thread, Throwable th) {
if (thread == null) {
Logger.getLogger().e("Crashlytics will not record uncaught exception; null thread");
return false;
}
if (th == null) {
Logger.getLogger().e("Crashlytics will not record uncaught exception; null throwable");
return false;
}
if (!this.nativeComponent.hasCrashDataForCurrentSession()) {
return true;
}
Logger.getLogger().d("Crashlytics will not record uncaught exception; native crash exists for session.");
return false;
}
}