Add decompiled APK source code (JADX)

- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-18 14:52:23 -08:00
parent cc210a65ea
commit f9d20bb3fc
26991 changed files with 2541449 additions and 0 deletions

View File

@@ -0,0 +1,111 @@
package com.facebook.internal.instrument.errorreport;
import androidx.annotation.RestrictTo;
import com.facebook.internal.instrument.InstrumentUtility;
import java.io.File;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import org.json.JSONException;
import org.json.JSONObject;
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP})
/* loaded from: classes2.dex */
public final class ErrorReportData {
public static final Companion Companion = new Companion(null);
private static final String PARAM_TIMESTAMP = "timestamp";
private static final String PRARAM_ERROR_MESSAGE = "error_message";
private String errorMessage;
private String filename;
private Long timestamp;
public final boolean isValid() {
return (this.errorMessage == null || this.timestamp == null) ? false : true;
}
public ErrorReportData(String str) {
this.timestamp = Long.valueOf(System.currentTimeMillis() / 1000);
this.errorMessage = str;
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append(InstrumentUtility.ERROR_REPORT_PREFIX);
Long l = this.timestamp;
if (l == null) {
throw new NullPointerException("null cannot be cast to non-null type kotlin.Long");
}
stringBuffer.append(l.longValue());
stringBuffer.append(".json");
String stringBuffer2 = stringBuffer.toString();
Intrinsics.checkNotNullExpressionValue(stringBuffer2, "StringBuffer()\n .append(InstrumentUtility.ERROR_REPORT_PREFIX)\n .append(timestamp as Long)\n .append(\".json\")\n .toString()");
this.filename = stringBuffer2;
}
public ErrorReportData(File file) {
Intrinsics.checkNotNullParameter(file, "file");
String name = file.getName();
Intrinsics.checkNotNullExpressionValue(name, "file.name");
this.filename = name;
JSONObject readFile = InstrumentUtility.readFile(name, true);
if (readFile != null) {
this.timestamp = Long.valueOf(readFile.optLong("timestamp", 0L));
this.errorMessage = readFile.optString("error_message", null);
}
}
public final int compareTo(ErrorReportData data) {
Intrinsics.checkNotNullParameter(data, "data");
Long l = this.timestamp;
if (l == null) {
return -1;
}
long longValue = l.longValue();
Long l2 = data.timestamp;
if (l2 == null) {
return 1;
}
return Intrinsics.compare(l2.longValue(), longValue);
}
public final void save() {
if (isValid()) {
InstrumentUtility instrumentUtility = InstrumentUtility.INSTANCE;
InstrumentUtility.writeFile(this.filename, toString());
}
}
public final void clear() {
InstrumentUtility instrumentUtility = InstrumentUtility.INSTANCE;
InstrumentUtility.deleteFile(this.filename);
}
public String toString() {
JSONObject parameters = getParameters();
if (parameters == null) {
return super.toString();
}
String jSONObject = parameters.toString();
Intrinsics.checkNotNullExpressionValue(jSONObject, "params.toString()");
return jSONObject;
}
public final JSONObject getParameters() {
JSONObject jSONObject = new JSONObject();
try {
Long l = this.timestamp;
if (l != null) {
jSONObject.put("timestamp", l);
}
jSONObject.put("error_message", this.errorMessage);
return jSONObject;
} catch (JSONException unused) {
return null;
}
}
public static final class Companion {
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
}
}

View File

@@ -0,0 +1,134 @@
package com.facebook.internal.instrument.errorreport;
import androidx.annotation.RestrictTo;
import com.facebook.FacebookSdk;
import com.facebook.GraphRequest;
import com.facebook.GraphResponse;
import com.facebook.internal.Utility;
import com.facebook.internal.instrument.InstrumentUtility;
import java.io.File;
import java.io.FilenameFilter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Iterator;
import kotlin.collections.CollectionsKt__MutableCollectionsJVMKt;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.StringCompanionObject;
import kotlin.text.Regex;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP})
/* loaded from: classes2.dex */
public final class ErrorReportHandler {
public static final ErrorReportHandler INSTANCE = new ErrorReportHandler();
private static final int MAX_ERROR_REPORT_NUM = 1000;
private ErrorReportHandler() {
}
public static final void save(String str) {
try {
new ErrorReportData(str).save();
} catch (Exception unused) {
}
}
public static final void enable() {
if (FacebookSdk.getAutoLogAppEventsEnabled()) {
sendErrorReports();
}
}
public static final void sendErrorReports() {
if (Utility.isDataProcessingRestricted()) {
return;
}
File[] listErrorReportFiles = listErrorReportFiles();
final ArrayList arrayList = new ArrayList();
int length = listErrorReportFiles.length;
int i = 0;
while (i < length) {
File file = listErrorReportFiles[i];
i++;
ErrorReportData errorReportData = new ErrorReportData(file);
if (errorReportData.isValid()) {
arrayList.add(errorReportData);
}
}
CollectionsKt__MutableCollectionsJVMKt.sortWith(arrayList, new Comparator() { // from class: com.facebook.internal.instrument.errorreport.ErrorReportHandler$$ExternalSyntheticLambda0
@Override // java.util.Comparator
public final int compare(Object obj, Object obj2) {
int m607sendErrorReports$lambda0;
m607sendErrorReports$lambda0 = ErrorReportHandler.m607sendErrorReports$lambda0((ErrorReportData) obj, (ErrorReportData) obj2);
return m607sendErrorReports$lambda0;
}
});
JSONArray jSONArray = new JSONArray();
for (int i2 = 0; i2 < arrayList.size() && i2 < 1000; i2++) {
jSONArray.put(arrayList.get(i2));
}
InstrumentUtility instrumentUtility = InstrumentUtility.INSTANCE;
InstrumentUtility.sendReports("error_reports", jSONArray, new GraphRequest.Callback() { // from class: com.facebook.internal.instrument.errorreport.ErrorReportHandler$$ExternalSyntheticLambda1
@Override // com.facebook.GraphRequest.Callback
public final void onCompleted(GraphResponse graphResponse) {
ErrorReportHandler.m608sendErrorReports$lambda2(arrayList, graphResponse);
}
});
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: sendErrorReports$lambda-0, reason: not valid java name */
public static final int m607sendErrorReports$lambda0(ErrorReportData errorReportData, ErrorReportData o2) {
Intrinsics.checkNotNullExpressionValue(o2, "o2");
return errorReportData.compareTo(o2);
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: sendErrorReports$lambda-2, reason: not valid java name */
public static final void m608sendErrorReports$lambda2(ArrayList validReports, GraphResponse response) {
Intrinsics.checkNotNullParameter(validReports, "$validReports");
Intrinsics.checkNotNullParameter(response, "response");
try {
if (response.getError() == null) {
JSONObject jsonObject = response.getJsonObject();
if (Intrinsics.areEqual(jsonObject == null ? null : Boolean.valueOf(jsonObject.getBoolean("success")), Boolean.TRUE)) {
Iterator it = validReports.iterator();
while (it.hasNext()) {
((ErrorReportData) it.next()).clear();
}
}
}
} catch (JSONException unused) {
}
}
public static final File[] listErrorReportFiles() {
File instrumentReportDir = InstrumentUtility.getInstrumentReportDir();
if (instrumentReportDir == null) {
return new File[0];
}
File[] listFiles = instrumentReportDir.listFiles(new FilenameFilter() { // from class: com.facebook.internal.instrument.errorreport.ErrorReportHandler$$ExternalSyntheticLambda2
@Override // java.io.FilenameFilter
public final boolean accept(File file, String str) {
boolean m606listErrorReportFiles$lambda3;
m606listErrorReportFiles$lambda3 = ErrorReportHandler.m606listErrorReportFiles$lambda3(file, str);
return m606listErrorReportFiles$lambda3;
}
});
Intrinsics.checkNotNullExpressionValue(listFiles, "reportDir.listFiles { dir, name ->\n name.matches(Regex(String.format(\"^%s[0-9]+.json$\", InstrumentUtility.ERROR_REPORT_PREFIX)))\n }");
return listFiles;
}
/* JADX INFO: Access modifiers changed from: private */
/* renamed from: listErrorReportFiles$lambda-3, reason: not valid java name */
public static final boolean m606listErrorReportFiles$lambda3(File file, String name) {
Intrinsics.checkNotNullExpressionValue(name, "name");
StringCompanionObject stringCompanionObject = StringCompanionObject.INSTANCE;
String format = String.format("^%s[0-9]+.json$", Arrays.copyOf(new Object[]{InstrumentUtility.ERROR_REPORT_PREFIX}, 1));
Intrinsics.checkNotNullExpressionValue(format, "java.lang.String.format(format, *args)");
return new Regex(format).matches(name);
}
}