Files
rr3-apk/smali_classes3/com/google/firebase/perf/session/gauges/GaugeMetadataManager.smali
supermegamestre 4bbd74a497 First Upload
Just the APK
Force update disabled, will only work offline.
2026-01-26 00:26:29 -03:00

153 lines
4.5 KiB
Smali

.class public Lcom/google/firebase/perf/session/gauges/GaugeMetadataManager;
.super Ljava/lang/Object;
.source "SourceFile"
# static fields
.field public static final logger:Lcom/google/firebase/perf/logging/AndroidLogger;
# instance fields
.field public final activityManager:Landroid/app/ActivityManager;
.field public final appContext:Landroid/content/Context;
.field public final memoryInfo:Landroid/app/ActivityManager$MemoryInfo;
.field public final runtime:Ljava/lang/Runtime;
# direct methods
.method static constructor <clinit>()V
.locals 1
.line 39
invoke-static {}, Lcom/google/firebase/perf/logging/AndroidLogger;->getInstance()Lcom/google/firebase/perf/logging/AndroidLogger;
move-result-object v0
sput-object v0, Lcom/google/firebase/perf/session/gauges/GaugeMetadataManager;->logger:Lcom/google/firebase/perf/logging/AndroidLogger;
return-void
.end method
.method public constructor <init>(Landroid/content/Context;)V
.locals 1
.line 47
invoke-static {}, Ljava/lang/Runtime;->getRuntime()Ljava/lang/Runtime;
move-result-object v0
invoke-direct {p0, v0, p1}, Lcom/google/firebase/perf/session/gauges/GaugeMetadataManager;-><init>(Ljava/lang/Runtime;Landroid/content/Context;)V
return-void
.end method
.method public constructor <init>(Ljava/lang/Runtime;Landroid/content/Context;)V
.locals 0
.line 51
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lcom/google/firebase/perf/session/gauges/GaugeMetadataManager;->runtime:Ljava/lang/Runtime;
iput-object p2, p0, Lcom/google/firebase/perf/session/gauges/GaugeMetadataManager;->appContext:Landroid/content/Context;
const-string p1, "activity"
.line 54
invoke-virtual {p2, p1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Landroid/app/ActivityManager;
iput-object p1, p0, Lcom/google/firebase/perf/session/gauges/GaugeMetadataManager;->activityManager:Landroid/app/ActivityManager;
.line 55
new-instance p2, Landroid/app/ActivityManager$MemoryInfo;
invoke-direct {p2}, Landroid/app/ActivityManager$MemoryInfo;-><init>()V
iput-object p2, p0, Lcom/google/firebase/perf/session/gauges/GaugeMetadataManager;->memoryInfo:Landroid/app/ActivityManager$MemoryInfo;
.line 56
invoke-virtual {p1, p2}, Landroid/app/ActivityManager;->getMemoryInfo(Landroid/app/ActivityManager$MemoryInfo;)V
return-void
.end method
# virtual methods
.method public getDeviceRamSizeKb()I
.locals 3
.line 79
sget-object v0, Lcom/google/firebase/perf/util/StorageUnit;->BYTES:Lcom/google/firebase/perf/util/StorageUnit;
iget-object v1, p0, Lcom/google/firebase/perf/session/gauges/GaugeMetadataManager;->memoryInfo:Landroid/app/ActivityManager$MemoryInfo;
iget-wide v1, v1, Landroid/app/ActivityManager$MemoryInfo;->totalMem:J
invoke-virtual {v0, v1, v2}, Lcom/google/firebase/perf/util/StorageUnit;->toKilobytes(J)J
move-result-wide v0
invoke-static {v0, v1}, Lcom/google/firebase/perf/util/Utils;->saturatedIntCast(J)I
move-result v0
return v0
.end method
.method public getMaxAppJavaHeapMemoryKb()I
.locals 3
.line 64
sget-object v0, Lcom/google/firebase/perf/util/StorageUnit;->BYTES:Lcom/google/firebase/perf/util/StorageUnit;
iget-object v1, p0, Lcom/google/firebase/perf/session/gauges/GaugeMetadataManager;->runtime:Ljava/lang/Runtime;
invoke-virtual {v1}, Ljava/lang/Runtime;->maxMemory()J
move-result-wide v1
invoke-virtual {v0, v1, v2}, Lcom/google/firebase/perf/util/StorageUnit;->toKilobytes(J)J
move-result-wide v0
invoke-static {v0, v1}, Lcom/google/firebase/perf/util/Utils;->saturatedIntCast(J)I
move-result v0
return v0
.end method
.method public getMaxEncouragedAppJavaHeapMemoryKb()I
.locals 3
.line 72
sget-object v0, Lcom/google/firebase/perf/util/StorageUnit;->MEGABYTES:Lcom/google/firebase/perf/util/StorageUnit;
iget-object v1, p0, Lcom/google/firebase/perf/session/gauges/GaugeMetadataManager;->activityManager:Landroid/app/ActivityManager;
.line 73
invoke-virtual {v1}, Landroid/app/ActivityManager;->getMemoryClass()I
move-result v1
int-to-long v1, v1
invoke-virtual {v0, v1, v2}, Lcom/google/firebase/perf/util/StorageUnit;->toKilobytes(J)J
move-result-wide v0
.line 72
invoke-static {v0, v1}, Lcom/google/firebase/perf/util/Utils;->saturatedIntCast(J)I
move-result v0
return v0
.end method