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,68 @@
package com.google.firebase.crashlytics.internal.send;
import android.content.Context;
import com.google.android.datatransport.Encoding;
import com.google.android.datatransport.Transformer;
import com.google.android.datatransport.TransportFactory;
import com.google.android.datatransport.cct.CCTDestination;
import com.google.android.datatransport.runtime.TransportRuntime;
import com.google.android.gms.tasks.Task;
import com.google.firebase.crashlytics.internal.common.CrashlyticsReportWithSessionId;
import com.google.firebase.crashlytics.internal.common.OnDemandCounter;
import com.google.firebase.crashlytics.internal.model.CrashlyticsReport;
import com.google.firebase.crashlytics.internal.model.serialization.CrashlyticsReportJsonTransform;
import com.google.firebase.crashlytics.internal.settings.SettingsProvider;
import java.nio.charset.Charset;
/* loaded from: classes3.dex */
public class DataTransportCrashlyticsReportSender {
public final ReportQueue reportQueue;
public final Transformer transportTransform;
public static final CrashlyticsReportJsonTransform TRANSFORM = new CrashlyticsReportJsonTransform();
public static final String CRASHLYTICS_ENDPOINT = mergeStrings("hts/cahyiseot-agolai.o/1frlglgc/aclg", "tp:/rsltcrprsp.ogepscmv/ieo/eaybtho");
public static final String CRASHLYTICS_API_KEY = mergeStrings("AzSBpY4F0rHiHFdinTvM", "IayrSTFL9eJ69YeSUO2");
public static final Transformer DEFAULT_TRANSFORM = new Transformer() { // from class: com.google.firebase.crashlytics.internal.send.DataTransportCrashlyticsReportSender$$ExternalSyntheticLambda0
@Override // com.google.android.datatransport.Transformer
public final Object apply(Object obj) {
byte[] lambda$static$0;
lambda$static$0 = DataTransportCrashlyticsReportSender.lambda$static$0((CrashlyticsReport) obj);
return lambda$static$0;
}
};
public static /* synthetic */ byte[] lambda$static$0(CrashlyticsReport crashlyticsReport) {
return TRANSFORM.reportToJson(crashlyticsReport).getBytes(Charset.forName("UTF-8"));
}
public static DataTransportCrashlyticsReportSender create(Context context, SettingsProvider settingsProvider, OnDemandCounter onDemandCounter) {
TransportRuntime.initialize(context);
TransportFactory newFactory = TransportRuntime.getInstance().newFactory(new CCTDestination(CRASHLYTICS_ENDPOINT, CRASHLYTICS_API_KEY));
Encoding of = Encoding.of("json");
Transformer transformer = DEFAULT_TRANSFORM;
return new DataTransportCrashlyticsReportSender(new ReportQueue(newFactory.getTransport("FIREBASE_CRASHLYTICS_REPORT", CrashlyticsReport.class, of, transformer), settingsProvider.getSettingsSync(), onDemandCounter), transformer);
}
public DataTransportCrashlyticsReportSender(ReportQueue reportQueue, Transformer transformer) {
this.reportQueue = reportQueue;
this.transportTransform = transformer;
}
public Task enqueueReport(CrashlyticsReportWithSessionId crashlyticsReportWithSessionId, boolean z) {
return this.reportQueue.enqueueReport(crashlyticsReportWithSessionId, z).getTask();
}
public static String mergeStrings(String str, String str2) {
int length = str.length() - str2.length();
if (length < 0 || length > 1) {
throw new IllegalArgumentException("Invalid input received");
}
StringBuilder sb = new StringBuilder(str.length() + str2.length());
for (int i = 0; i < str.length(); i++) {
sb.append(str.charAt(i));
if (str2.length() > i) {
sb.append(str2.charAt(i));
}
}
return sb.toString();
}
}

View File

@@ -0,0 +1,185 @@
package com.google.firebase.crashlytics.internal.send;
import android.database.SQLException;
import android.os.SystemClock;
import com.google.android.datatransport.Event;
import com.google.android.datatransport.Priority;
import com.google.android.datatransport.Transport;
import com.google.android.datatransport.TransportScheduleCallback;
import com.google.android.datatransport.runtime.ForcedSender;
import com.google.android.gms.tasks.TaskCompletionSource;
import com.google.firebase.crashlytics.internal.Logger;
import com.google.firebase.crashlytics.internal.common.CrashlyticsReportWithSessionId;
import com.google.firebase.crashlytics.internal.common.OnDemandCounter;
import com.google.firebase.crashlytics.internal.common.Utils;
import com.google.firebase.crashlytics.internal.settings.Settings;
import java.util.Locale;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
/* loaded from: classes3.dex */
public final class ReportQueue {
public final double base;
public long lastUpdatedMs;
public final OnDemandCounter onDemandCounter;
public final BlockingQueue queue;
public final int queueCapacity;
public final double ratePerMinute;
public final ThreadPoolExecutor singleThreadExecutor;
public final long startTimeMs;
public int step;
public final long stepDurationMs;
public final Transport transport;
public ReportQueue(Transport transport, Settings settings, OnDemandCounter onDemandCounter) {
this(settings.onDemandUploadRatePerMinute, settings.onDemandBackoffBase, settings.onDemandBackoffStepDurationSeconds * 1000, transport, onDemandCounter);
}
public ReportQueue(double d, double d2, long j, Transport transport, OnDemandCounter onDemandCounter) {
this.ratePerMinute = d;
this.base = d2;
this.stepDurationMs = j;
this.transport = transport;
this.onDemandCounter = onDemandCounter;
this.startTimeMs = SystemClock.elapsedRealtime();
int i = (int) d;
this.queueCapacity = i;
ArrayBlockingQueue arrayBlockingQueue = new ArrayBlockingQueue(i);
this.queue = arrayBlockingQueue;
this.singleThreadExecutor = new ThreadPoolExecutor(1, 1, 0L, TimeUnit.MILLISECONDS, arrayBlockingQueue);
this.step = 0;
this.lastUpdatedMs = 0L;
}
public TaskCompletionSource enqueueReport(CrashlyticsReportWithSessionId crashlyticsReportWithSessionId, boolean z) {
synchronized (this.queue) {
try {
TaskCompletionSource taskCompletionSource = new TaskCompletionSource();
if (z) {
this.onDemandCounter.incrementRecordedOnDemandExceptions();
if (isQueueAvailable()) {
Logger.getLogger().d("Enqueueing report: " + crashlyticsReportWithSessionId.getSessionId());
Logger.getLogger().d("Queue size: " + this.queue.size());
this.singleThreadExecutor.execute(new ReportRunnable(crashlyticsReportWithSessionId, taskCompletionSource));
Logger.getLogger().d("Closing task for report: " + crashlyticsReportWithSessionId.getSessionId());
taskCompletionSource.trySetResult(crashlyticsReportWithSessionId);
return taskCompletionSource;
}
calcStep();
Logger.getLogger().d("Dropping report due to queue being full: " + crashlyticsReportWithSessionId.getSessionId());
this.onDemandCounter.incrementDroppedOnDemandExceptions();
taskCompletionSource.trySetResult(crashlyticsReportWithSessionId);
return taskCompletionSource;
}
sendReport(crashlyticsReportWithSessionId, taskCompletionSource);
return taskCompletionSource;
} catch (Throwable th) {
throw th;
}
}
}
public void flushScheduledReportsIfAble() {
final CountDownLatch countDownLatch = new CountDownLatch(1);
new Thread(new Runnable() { // from class: com.google.firebase.crashlytics.internal.send.ReportQueue$$ExternalSyntheticLambda1
@Override // java.lang.Runnable
public final void run() {
ReportQueue.this.lambda$flushScheduledReportsIfAble$0(countDownLatch);
}
}).start();
Utils.awaitUninterruptibly(countDownLatch, 2L, TimeUnit.SECONDS);
}
public final /* synthetic */ void lambda$flushScheduledReportsIfAble$0(CountDownLatch countDownLatch) {
try {
ForcedSender.sendBlocking(this.transport, Priority.HIGHEST);
} catch (SQLException unused) {
}
countDownLatch.countDown();
}
public final void sendReport(final CrashlyticsReportWithSessionId crashlyticsReportWithSessionId, final TaskCompletionSource taskCompletionSource) {
Logger.getLogger().d("Sending report through Google DataTransport: " + crashlyticsReportWithSessionId.getSessionId());
final boolean z = SystemClock.elapsedRealtime() - this.startTimeMs < 2000;
this.transport.schedule(Event.ofUrgent(crashlyticsReportWithSessionId.getReport()), new TransportScheduleCallback() { // from class: com.google.firebase.crashlytics.internal.send.ReportQueue$$ExternalSyntheticLambda0
@Override // com.google.android.datatransport.TransportScheduleCallback
public final void onSchedule(Exception exc) {
ReportQueue.this.lambda$sendReport$1(taskCompletionSource, z, crashlyticsReportWithSessionId, exc);
}
});
}
public final /* synthetic */ void lambda$sendReport$1(TaskCompletionSource taskCompletionSource, boolean z, CrashlyticsReportWithSessionId crashlyticsReportWithSessionId, Exception exc) {
if (exc != null) {
taskCompletionSource.trySetException(exc);
return;
}
if (z) {
flushScheduledReportsIfAble();
}
taskCompletionSource.trySetResult(crashlyticsReportWithSessionId);
}
public final boolean isQueueAvailable() {
return this.queue.size() < this.queueCapacity;
}
public final boolean isQueueFull() {
return this.queue.size() == this.queueCapacity;
}
public final double calcDelay() {
return Math.min(3600000.0d, (60000.0d / this.ratePerMinute) * Math.pow(this.base, calcStep()));
}
public final int calcStep() {
int max;
if (this.lastUpdatedMs == 0) {
this.lastUpdatedMs = now();
}
int now = (int) ((now() - this.lastUpdatedMs) / this.stepDurationMs);
if (isQueueFull()) {
max = Math.min(100, this.step + now);
} else {
max = Math.max(0, this.step - now);
}
if (this.step != max) {
this.step = max;
this.lastUpdatedMs = now();
}
return max;
}
public final long now() {
return System.currentTimeMillis();
}
public final class ReportRunnable implements Runnable {
public final CrashlyticsReportWithSessionId reportWithSessionId;
public final TaskCompletionSource tcs;
public ReportRunnable(CrashlyticsReportWithSessionId crashlyticsReportWithSessionId, TaskCompletionSource taskCompletionSource) {
this.reportWithSessionId = crashlyticsReportWithSessionId;
this.tcs = taskCompletionSource;
}
@Override // java.lang.Runnable
public void run() {
ReportQueue.this.sendReport(this.reportWithSessionId, this.tcs);
ReportQueue.this.onDemandCounter.resetDroppedOnDemandExceptions();
double calcDelay = ReportQueue.this.calcDelay();
Logger.getLogger().d("Delay for: " + String.format(Locale.US, "%.2f", Double.valueOf(calcDelay / 1000.0d)) + " s for report: " + this.reportWithSessionId.getSessionId());
ReportQueue.sleep(calcDelay);
}
}
public static void sleep(double d) {
try {
Thread.sleep((long) d);
} catch (InterruptedException unused) {
}
}
}