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

275 lines
6.6 KiB
Smali

.class public Lcom/google/firebase/remoteconfig/internal/FirebaseRemoteConfigValueImpl;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Lcom/google/firebase/remoteconfig/FirebaseRemoteConfigValue;
# instance fields
.field public final source:I
.field public final value:Ljava/lang/String;
# direct methods
.method public constructor <init>(Ljava/lang/String;I)V
.locals 0
.line 36
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lcom/google/firebase/remoteconfig/internal/FirebaseRemoteConfigValueImpl;->value:Ljava/lang/String;
iput p2, p0, Lcom/google/firebase/remoteconfig/internal/FirebaseRemoteConfigValueImpl;->source:I
return-void
.end method
# virtual methods
.method public asBoolean()Z
.locals 3
iget v0, p0, Lcom/google/firebase/remoteconfig/internal/FirebaseRemoteConfigValueImpl;->source:I
const/4 v1, 0x0
if-nez v0, :cond_0
return v1
.line 95
:cond_0
invoke-virtual {p0}, Lcom/google/firebase/remoteconfig/internal/FirebaseRemoteConfigValueImpl;->asTrimmedString()Ljava/lang/String;
move-result-object v0
.line 96
sget-object v2, Lcom/google/firebase/remoteconfig/internal/ConfigGetParameterHandler;->TRUE_REGEX:Ljava/util/regex/Pattern;
invoke-virtual {v2, v0}, Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
move-result-object v2
invoke-virtual {v2}, Ljava/util/regex/Matcher;->matches()Z
move-result v2
if-eqz v2, :cond_1
const/4 v0, 0x1
return v0
.line 98
:cond_1
sget-object v2, Lcom/google/firebase/remoteconfig/internal/ConfigGetParameterHandler;->FALSE_REGEX:Ljava/util/regex/Pattern;
invoke-virtual {v2, v0}, Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
move-result-object v2
invoke-virtual {v2}, Ljava/util/regex/Matcher;->matches()Z
move-result v2
if-eqz v2, :cond_2
return v1
.line 101
:cond_2
new-instance v1, Ljava/lang/IllegalArgumentException;
const-string v2, "boolean"
filled-new-array {v0, v2}, [Ljava/lang/Object;
move-result-object v0
const-string v2, "[Value: %s] cannot be converted to a %s."
.line 102
invoke-static {v2, v0}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
invoke-direct {v1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v1
.end method
.method public asDouble()D
.locals 4
iget v0, p0, Lcom/google/firebase/remoteconfig/internal/FirebaseRemoteConfigValueImpl;->source:I
if-nez v0, :cond_0
const-wide/16 v0, 0x0
return-wide v0
.line 62
:cond_0
invoke-virtual {p0}, Lcom/google/firebase/remoteconfig/internal/FirebaseRemoteConfigValueImpl;->asTrimmedString()Ljava/lang/String;
move-result-object v0
.line 64
:try_start_0
invoke-static {v0}, Ljava/lang/Double;->valueOf(Ljava/lang/String;)Ljava/lang/Double;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/Double;->doubleValue()D
move-result-wide v0
:try_end_0
.catch Ljava/lang/NumberFormatException; {:try_start_0 .. :try_end_0} :catch_0
return-wide v0
:catch_0
move-exception v1
.line 66
new-instance v2, Ljava/lang/IllegalArgumentException;
const-string v3, "double"
filled-new-array {v0, v3}, [Ljava/lang/Object;
move-result-object v0
const-string v3, "[Value: %s] cannot be converted to a %s."
.line 67
invoke-static {v3, v0}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
invoke-direct {v2, v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw v2
.end method
.method public asLong()J
.locals 4
iget v0, p0, Lcom/google/firebase/remoteconfig/internal/FirebaseRemoteConfigValueImpl;->source:I
if-nez v0, :cond_0
const-wide/16 v0, 0x0
return-wide v0
.line 47
:cond_0
invoke-virtual {p0}, Lcom/google/firebase/remoteconfig/internal/FirebaseRemoteConfigValueImpl;->asTrimmedString()Ljava/lang/String;
move-result-object v0
.line 49
:try_start_0
invoke-static {v0}, Ljava/lang/Long;->valueOf(Ljava/lang/String;)Ljava/lang/Long;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/Long;->longValue()J
move-result-wide v0
:try_end_0
.catch Ljava/lang/NumberFormatException; {:try_start_0 .. :try_end_0} :catch_0
return-wide v0
:catch_0
move-exception v1
.line 51
new-instance v2, Ljava/lang/IllegalArgumentException;
const-string v3, "long"
filled-new-array {v0, v3}, [Ljava/lang/Object;
move-result-object v0
const-string v3, "[Value: %s] cannot be converted to a %s."
.line 52
invoke-static {v3, v0}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
invoke-direct {v2, v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw v2
.end method
.method public asString()Ljava/lang/String;
.locals 1
iget v0, p0, Lcom/google/firebase/remoteconfig/internal/FirebaseRemoteConfigValueImpl;->source:I
if-nez v0, :cond_0
const-string v0, ""
return-object v0
.line 77
:cond_0
invoke-virtual {p0}, Lcom/google/firebase/remoteconfig/internal/FirebaseRemoteConfigValueImpl;->throwIfNullValue()V
iget-object v0, p0, Lcom/google/firebase/remoteconfig/internal/FirebaseRemoteConfigValueImpl;->value:Ljava/lang/String;
return-object v0
.end method
.method public final asTrimmedString()Ljava/lang/String;
.locals 1
.line 119
invoke-virtual {p0}, Lcom/google/firebase/remoteconfig/internal/FirebaseRemoteConfigValueImpl;->asString()Ljava/lang/String;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/String;->trim()Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method public getSource()I
.locals 1
iget v0, p0, Lcom/google/firebase/remoteconfig/internal/FirebaseRemoteConfigValueImpl;->source:I
return v0
.end method
.method public final throwIfNullValue()V
.locals 2
iget-object v0, p0, Lcom/google/firebase/remoteconfig/internal/FirebaseRemoteConfigValueImpl;->value:Ljava/lang/String;
if-eqz v0, :cond_0
return-void
.line 112
:cond_0
new-instance v0, Ljava/lang/IllegalArgumentException;
const-string v1, "Value is null, and cannot be converted to the desired type."
invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
.end method