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,8 @@
package com.google.firebase.perf.util;
/* loaded from: classes3.dex */
public class Clock {
public Timer getTime() {
return new Timer();
}
}

View File

@@ -0,0 +1,24 @@
package com.google.firebase.perf.util;
import androidx.annotation.NonNull;
/* loaded from: classes3.dex */
public enum Constants$CounterNames {
TRACE_EVENT_RATE_LIMITED("_fstec"),
NETWORK_TRACE_EVENT_RATE_LIMITED("_fsntc"),
TRACE_STARTED_NOT_STOPPED("_tsns"),
FRAMES_TOTAL("_fr_tot"),
FRAMES_SLOW("_fr_slo"),
FRAMES_FROZEN("_fr_fzn");
private String mName;
@Override // java.lang.Enum
public String toString() {
return this.mName;
}
Constants$CounterNames(@NonNull String str) {
this.mName = str;
}
}

View File

@@ -0,0 +1,24 @@
package com.google.firebase.perf.util;
import androidx.annotation.NonNull;
/* loaded from: classes3.dex */
public enum Constants$TraceNames {
APP_START_TRACE_NAME("_as"),
ON_CREATE_TRACE_NAME("_astui"),
ON_START_TRACE_NAME("_astfd"),
ON_RESUME_TRACE_NAME("_asti"),
FOREGROUND_TRACE_NAME("_fs"),
BACKGROUND_TRACE_NAME("_bs");
private String mName;
@Override // java.lang.Enum
public String toString() {
return this.mName;
}
Constants$TraceNames(@NonNull String str) {
this.mName = str;
}
}

View File

@@ -0,0 +1,42 @@
package com.google.firebase.perf.util;
import android.os.Handler;
import android.os.Looper;
import android.view.View;
import android.view.ViewTreeObserver;
import java.util.concurrent.atomic.AtomicReference;
/* loaded from: classes3.dex */
public class FirstDrawDoneListener implements ViewTreeObserver.OnDrawListener {
public final Runnable callback;
public final Handler mainThreadHandler = new Handler(Looper.getMainLooper());
public final AtomicReference viewReference;
public static void registerForNextDraw(View view, Runnable runnable) {
view.getViewTreeObserver().addOnDrawListener(new FirstDrawDoneListener(view, runnable));
}
public FirstDrawDoneListener(View view, Runnable runnable) {
this.viewReference = new AtomicReference(view);
this.callback = runnable;
}
@Override // android.view.ViewTreeObserver.OnDrawListener
public void onDraw() {
final View view = (View) this.viewReference.getAndSet(null);
if (view == null) {
return;
}
view.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { // from class: com.google.firebase.perf.util.FirstDrawDoneListener$$ExternalSyntheticLambda0
@Override // android.view.ViewTreeObserver.OnGlobalLayoutListener
public final void onGlobalLayout() {
FirstDrawDoneListener.this.lambda$onDraw$0(view);
}
});
this.mainThreadHandler.postAtFrontOfQueue(this.callback);
}
public final /* synthetic */ void lambda$onDraw$0(View view) {
view.getViewTreeObserver().removeOnDrawListener(this);
}
}

View File

@@ -0,0 +1,71 @@
package com.google.firebase.perf.util;
import android.os.Bundle;
import com.google.firebase.perf.logging.AndroidLogger;
/* loaded from: classes3.dex */
public final class ImmutableBundle {
public static final AndroidLogger logger = AndroidLogger.getInstance();
public final Bundle bundle;
public ImmutableBundle() {
this(new Bundle());
}
public ImmutableBundle(Bundle bundle) {
this.bundle = (Bundle) bundle.clone();
}
public boolean containsKey(String str) {
return str != null && this.bundle.containsKey(str);
}
public Optional getBoolean(String str) {
if (!containsKey(str)) {
return Optional.absent();
}
try {
return Optional.fromNullable((Boolean) this.bundle.get(str));
} catch (ClassCastException e) {
logger.debug("Metadata key %s contains type other than boolean: %s", str, e.getMessage());
return Optional.absent();
}
}
public Optional getDouble(String str) {
if (!containsKey(str)) {
return Optional.absent();
}
Object obj = this.bundle.get(str);
if (obj == null) {
return Optional.absent();
}
if (obj instanceof Float) {
return Optional.of(Double.valueOf(((Float) obj).doubleValue()));
}
if (obj instanceof Double) {
return Optional.of((Double) obj);
}
logger.debug("Metadata key %s contains type other than double: %s", str);
return Optional.absent();
}
public Optional getLong(String str) {
if (getInt(str).isAvailable()) {
return Optional.of(Long.valueOf(((Integer) r3.get()).intValue()));
}
return Optional.absent();
}
public final Optional getInt(String str) {
if (!containsKey(str)) {
return Optional.absent();
}
try {
return Optional.fromNullable((Integer) this.bundle.get(str));
} catch (ClassCastException e) {
logger.debug("Metadata key %s contains type other than int: %s", str, e.getMessage());
return Optional.absent();
}
}
}

View File

@@ -0,0 +1,43 @@
package com.google.firebase.perf.util;
import java.util.NoSuchElementException;
/* loaded from: classes3.dex */
public final class Optional {
public final Object value;
public boolean isAvailable() {
return this.value != null;
}
public Optional() {
this.value = null;
}
public Optional(Object obj) {
if (obj == null) {
throw new NullPointerException("value for optional is empty.");
}
this.value = obj;
}
public static Optional absent() {
return new Optional();
}
public static Optional of(Object obj) {
return new Optional(obj);
}
public static Optional fromNullable(Object obj) {
return obj == null ? absent() : of(obj);
}
public Object get() {
Object obj = this.value;
if (obj != null) {
return obj;
}
throw new NoSuchElementException("No value present");
}
}

View File

@@ -0,0 +1,37 @@
package com.google.firebase.perf.util;
import android.os.Handler;
import android.os.Looper;
import android.view.View;
import android.view.ViewTreeObserver;
import java.util.concurrent.atomic.AtomicReference;
/* loaded from: classes3.dex */
public class PreDrawListener implements ViewTreeObserver.OnPreDrawListener {
public final Runnable callbackBoQ;
public final Runnable callbackFoQ;
public final Handler mainThreadHandler = new Handler(Looper.getMainLooper());
public final AtomicReference viewReference;
public static void registerForNextDraw(View view, Runnable runnable, Runnable runnable2) {
view.getViewTreeObserver().addOnPreDrawListener(new PreDrawListener(view, runnable, runnable2));
}
public PreDrawListener(View view, Runnable runnable, Runnable runnable2) {
this.viewReference = new AtomicReference(view);
this.callbackBoQ = runnable;
this.callbackFoQ = runnable2;
}
@Override // android.view.ViewTreeObserver.OnPreDrawListener
public boolean onPreDraw() {
View view = (View) this.viewReference.getAndSet(null);
if (view == null) {
return true;
}
view.getViewTreeObserver().removeOnPreDrawListener(this);
this.mainThreadHandler.post(this.callbackBoQ);
this.mainThreadHandler.postAtFrontOfQueue(this.callbackFoQ);
return true;
}
}

View File

@@ -0,0 +1,52 @@
package com.google.firebase.perf.util;
import java.util.concurrent.TimeUnit;
/* loaded from: classes3.dex */
public class Rate {
public long numTimeUnits;
public long numTokensPerTotalTimeUnit;
public TimeUnit timeUnit;
public Rate(long j, long j2, TimeUnit timeUnit) {
this.numTokensPerTotalTimeUnit = j;
this.numTimeUnits = j2;
this.timeUnit = timeUnit;
}
/* renamed from: com.google.firebase.perf.util.Rate$1, reason: invalid class name */
public static /* synthetic */ class AnonymousClass1 {
public static final /* synthetic */ int[] $SwitchMap$java$util$concurrent$TimeUnit;
static {
int[] iArr = new int[TimeUnit.values().length];
$SwitchMap$java$util$concurrent$TimeUnit = iArr;
try {
iArr[TimeUnit.NANOSECONDS.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$java$util$concurrent$TimeUnit[TimeUnit.MICROSECONDS.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
$SwitchMap$java$util$concurrent$TimeUnit[TimeUnit.MILLISECONDS.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
}
}
public double getTokensPerSeconds() {
int i = AnonymousClass1.$SwitchMap$java$util$concurrent$TimeUnit[this.timeUnit.ordinal()];
if (i == 1) {
return (this.numTokensPerTotalTimeUnit / this.numTimeUnits) * TimeUnit.SECONDS.toNanos(1L);
}
if (i == 2) {
return (this.numTokensPerTotalTimeUnit / this.numTimeUnits) * TimeUnit.SECONDS.toMicros(1L);
}
if (i == 3) {
return (this.numTokensPerTotalTimeUnit / this.numTimeUnits) * TimeUnit.SECONDS.toMillis(1L);
}
return this.numTokensPerTotalTimeUnit / this.timeUnit.toSeconds(this.numTimeUnits);
}
}

View File

@@ -0,0 +1,24 @@
package com.google.firebase.perf.util;
import com.google.firebase.perf.logging.AndroidLogger;
import com.google.firebase.perf.metrics.FrameMetricsCalculator;
import com.google.firebase.perf.metrics.Trace;
/* loaded from: classes3.dex */
public abstract class ScreenTraceUtil {
public static final AndroidLogger logger = AndroidLogger.getInstance();
public static Trace addFrameCounters(Trace trace, FrameMetricsCalculator.PerfFrameMetrics perfFrameMetrics) {
if (perfFrameMetrics.getTotalFrames() > 0) {
trace.putMetric(Constants$CounterNames.FRAMES_TOTAL.toString(), perfFrameMetrics.getTotalFrames());
}
if (perfFrameMetrics.getSlowFrames() > 0) {
trace.putMetric(Constants$CounterNames.FRAMES_SLOW.toString(), perfFrameMetrics.getSlowFrames());
}
if (perfFrameMetrics.getFrozenFrames() > 0) {
trace.putMetric(Constants$CounterNames.FRAMES_FROZEN.toString(), perfFrameMetrics.getFrozenFrames());
}
logger.debug("Screen trace: " + trace.getName() + " _fr_tot:" + perfFrameMetrics.getTotalFrames() + " _fr_slo:" + perfFrameMetrics.getSlowFrames() + " _fr_fzn:" + perfFrameMetrics.getFrozenFrames());
return trace;
}
}

View File

@@ -0,0 +1,65 @@
package com.google.firebase.perf.util;
import android.support.v4.media.session.PlaybackStateCompat;
/* loaded from: classes3.dex */
public enum StorageUnit {
TERABYTES(1099511627776L) { // from class: com.google.firebase.perf.util.StorageUnit.1
@Override // com.google.firebase.perf.util.StorageUnit
public long convert(long j, StorageUnit storageUnit) {
return storageUnit.toTerabytes(j);
}
},
GIGABYTES(1073741824) { // from class: com.google.firebase.perf.util.StorageUnit.2
@Override // com.google.firebase.perf.util.StorageUnit
public long convert(long j, StorageUnit storageUnit) {
return storageUnit.toGigabytes(j);
}
},
MEGABYTES(PlaybackStateCompat.ACTION_SET_CAPTIONING_ENABLED) { // from class: com.google.firebase.perf.util.StorageUnit.3
@Override // com.google.firebase.perf.util.StorageUnit
public long convert(long j, StorageUnit storageUnit) {
return storageUnit.toMegabytes(j);
}
},
KILOBYTES(PlaybackStateCompat.ACTION_PLAY_FROM_MEDIA_ID) { // from class: com.google.firebase.perf.util.StorageUnit.4
@Override // com.google.firebase.perf.util.StorageUnit
public long convert(long j, StorageUnit storageUnit) {
return storageUnit.toKilobytes(j);
}
},
BYTES(1) { // from class: com.google.firebase.perf.util.StorageUnit.5
@Override // com.google.firebase.perf.util.StorageUnit
public long convert(long j, StorageUnit storageUnit) {
return storageUnit.toBytes(j);
}
};
long numBytes;
public abstract long convert(long j, StorageUnit storageUnit);
public long toBytes(long j) {
return j * this.numBytes;
}
StorageUnit(long j) {
this.numBytes = j;
}
public long toKilobytes(long j) {
return (j * this.numBytes) / KILOBYTES.numBytes;
}
public long toMegabytes(long j) {
return (j * this.numBytes) / MEGABYTES.numBytes;
}
public long toGigabytes(long j) {
return (j * this.numBytes) / GIGABYTES.numBytes;
}
public long toTerabytes(long j) {
return (j * this.numBytes) / TERABYTES.numBytes;
}
}

View File

@@ -0,0 +1,81 @@
package com.google.firebase.perf.util;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.SystemClock;
import java.util.concurrent.TimeUnit;
/* loaded from: classes3.dex */
public class Timer implements Parcelable {
public static final Parcelable.Creator<Timer> CREATOR = new Parcelable.Creator() { // from class: com.google.firebase.perf.util.Timer.1
@Override // android.os.Parcelable.Creator
public Timer createFromParcel(Parcel parcel) {
return new Timer(parcel);
}
@Override // android.os.Parcelable.Creator
public Timer[] newArray(int i) {
return new Timer[i];
}
};
public long elapsedRealtimeMicros;
public long wallClockMicros;
@Override // android.os.Parcelable
public int describeContents() {
return 0;
}
public long getMicros() {
return this.wallClockMicros;
}
public static Timer ofElapsedRealtime(long j) {
long micros = TimeUnit.MILLISECONDS.toMicros(j);
return new Timer(wallClockMicros() + (micros - elapsedRealtimeMicros()), micros);
}
public static long wallClockMicros() {
return TimeUnit.MILLISECONDS.toMicros(System.currentTimeMillis());
}
public static long elapsedRealtimeMicros() {
return TimeUnit.NANOSECONDS.toMicros(SystemClock.elapsedRealtimeNanos());
}
public Timer() {
this(wallClockMicros(), elapsedRealtimeMicros());
}
public Timer(long j, long j2) {
this.wallClockMicros = j;
this.elapsedRealtimeMicros = j2;
}
public Timer(Parcel parcel) {
this(parcel.readLong(), parcel.readLong());
}
public void reset() {
this.wallClockMicros = wallClockMicros();
this.elapsedRealtimeMicros = elapsedRealtimeMicros();
}
public long getDurationMicros() {
return getDurationMicros(new Timer());
}
public long getDurationMicros(Timer timer) {
return timer.elapsedRealtimeMicros - this.elapsedRealtimeMicros;
}
public long getCurrentTimestampMicros() {
return this.wallClockMicros + getDurationMicros();
}
@Override // android.os.Parcelable
public void writeToParcel(Parcel parcel, int i) {
parcel.writeLong(this.wallClockMicros);
parcel.writeLong(this.elapsedRealtimeMicros);
}
}

View File

@@ -0,0 +1,33 @@
package com.google.firebase.perf.util;
import android.content.Context;
import android.content.res.Resources;
import com.google.firebase.perf.logging.AndroidLogger;
import java.net.URI;
/* loaded from: classes3.dex */
public abstract class URLAllowlist {
public static String[] allowlistedDomains;
public static boolean isURLAllowlisted(URI uri, Context context) {
Resources resources = context.getResources();
int identifier = resources.getIdentifier("firebase_performance_whitelisted_domains", "array", context.getPackageName());
if (identifier == 0) {
return true;
}
AndroidLogger.getInstance().debug("Detected domain allowlist, only allowlisted domains will be measured.");
if (allowlistedDomains == null) {
allowlistedDomains = resources.getStringArray(identifier);
}
String host = uri.getHost();
if (host == null) {
return true;
}
for (String str : allowlistedDomains) {
if (host.contains(str)) {
return true;
}
}
return false;
}
}

View File

@@ -0,0 +1,21 @@
package com.google.firebase.perf.util;
import java.net.URL;
import java.net.URLConnection;
/* loaded from: classes3.dex */
public class URLWrapper {
public final URL url;
public URLWrapper(URL url) {
this.url = url;
}
public URLConnection openConnection() {
return this.url.openConnection();
}
public String toString() {
return this.url.toString();
}
}

View File

@@ -0,0 +1,65 @@
package com.google.firebase.perf.util;
import android.content.Context;
import android.content.pm.PackageManager;
import com.google.firebase.perf.logging.AndroidLogger;
import okhttp3.HttpUrl;
/* loaded from: classes3.dex */
public abstract class Utils {
public static Boolean isDebugLoggingEnabled;
public static int saturatedIntCast(long j) {
if (j > 2147483647L) {
return Integer.MAX_VALUE;
}
if (j < -2147483648L) {
return Integer.MIN_VALUE;
}
return (int) j;
}
public static String stripSensitiveInfo(String str) {
HttpUrl parse = HttpUrl.parse(str);
return parse != null ? parse.newBuilder().username("").password("").query(null).fragment(null).toString() : str;
}
public static String truncateURL(String str, int i) {
int lastIndexOf;
if (str.length() <= i) {
return str;
}
if (str.charAt(i) == '/') {
return str.substring(0, i);
}
HttpUrl parse = HttpUrl.parse(str);
if (parse == null) {
return str.substring(0, i);
}
if (parse.encodedPath().lastIndexOf(47) >= 0 && (lastIndexOf = str.lastIndexOf(47, i - 1)) >= 0) {
return str.substring(0, lastIndexOf);
}
return str.substring(0, i);
}
public static boolean isDebugLoggingEnabled(Context context) {
Boolean bool = isDebugLoggingEnabled;
if (bool != null) {
return bool.booleanValue();
}
try {
Boolean valueOf = Boolean.valueOf(context.getPackageManager().getApplicationInfo(context.getPackageName(), 128).metaData.getBoolean("firebase_performance_logcat_enabled", false));
isDebugLoggingEnabled = valueOf;
return valueOf.booleanValue();
} catch (PackageManager.NameNotFoundException | NullPointerException e) {
AndroidLogger.getInstance().debug("No perf logcat meta data found " + e.getMessage());
return false;
}
}
public static void checkArgument(boolean z, String str) {
if (!z) {
throw new IllegalArgumentException(str);
}
}
}