n.smali
.class public final Lcom/google/firebase/remoteconfig/internal/n;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/google/firebase/remoteconfig/internal/n$b;
}
.end annotation
# static fields
.field public static final d:Ljava/nio/charset/Charset;
.field public static final e:Lcom/google/firebase/remoteconfig/internal/n$a;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/ThreadLocal<",
"Ljava/text/DateFormat;",
">;"
}
.end annotation
.end field
# instance fields
.field public final a:Landroid/content/Context;
.field public final b:Ljava/lang/String;
.field public final c:Landroid/content/SharedPreferences;
# direct methods
.method public static constructor <clinit>()V
.registers 1
const-string v0, "UTF-8"
.line 1
invoke-static {v0}, Ljava/nio/charset/Charset;->forName(Ljava/lang/String;)Ljava/nio/charset/Charset;
move-result-object v0
sput-object v0, Lcom/google/firebase/remoteconfig/internal/n;->d:Ljava/nio/charset/Charset;
.line 2
new-instance v0, Lcom/google/firebase/remoteconfig/internal/n$a;
invoke-direct {v0}, Lcom/google/firebase/remoteconfig/internal/n$a;-><init>()V
sput-object v0, Lcom/google/firebase/remoteconfig/internal/n;->e:Lcom/google/firebase/remoteconfig/internal/n$a;
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;)V
.registers 4
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
iput-object p1, p0, Lcom/google/firebase/remoteconfig/internal/n;->a:Landroid/content/Context;
.line 3
iput-object p2, p0, Lcom/google/firebase/remoteconfig/internal/n;->b:Ljava/lang/String;
const-string p2, "com.google.firebase.remoteconfig_legacy_settings"
const/4 v0, 0x0
.line 4
invoke-virtual {p1, p2, v0}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
move-result-object p1
iput-object p1, p0, Lcom/google/firebase/remoteconfig/internal/n;->c:Landroid/content/SharedPreferences;
return-void
.end method
# virtual methods
.method public final a(Lcom/google/firebase/remoteconfig/proto/b;)Ljava/util/Map;
.registers 13
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/firebase/remoteconfig/proto/b;",
")",
"Ljava/util/Map<",
"Ljava/lang/String;",
"Lcom/google/firebase/remoteconfig/internal/f;",
">;"
}
.end annotation
.line 1
new-instance v0, Ljava/util/HashMap;
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
.line 2
new-instance v1, Ljava/util/Date;
invoke-static {p1}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;
const-wide/16 v2, 0x0
invoke-direct {v1, v2, v3}, Ljava/util/Date;-><init>(J)V
.line 3
iget-object v2, p1, Lcom/google/firebase/remoteconfig/proto/b;->b:Lcom/google/protobuf/s0$i;
.line 4
new-instance v3, Lorg/json/JSONArray;
invoke-direct {v3}, Lorg/json/JSONArray;-><init>()V
.line 5
invoke-interface {v2}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v2
:cond_1a
:goto_1a
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v4
if-eqz v4, :cond_5b
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v4
check-cast v4, Lcom/google/protobuf/l;
.line 6
:try_start_26
invoke-virtual {v4}, Lcom/google/protobuf/l;->k()Lcom/google/protobuf/l$f;
move-result-object v5
.line 7
invoke-virtual {v4}, Lcom/google/protobuf/l;->size()I
move-result v4
new-array v6, v4, [B
const/4 v7, 0x0
:goto_31
if-ge v7, v4, :cond_45
.line 8
move-object v8, v5
check-cast v8, Lcom/google/protobuf/l$b;
invoke-virtual {v8}, Lcom/google/protobuf/l$b;->next()Ljava/lang/Object;
move-result-object v8
check-cast v8, Ljava/lang/Byte;
invoke-virtual {v8}, Ljava/lang/Byte;->byteValue()B
move-result v8
aput-byte v8, v6, v7
add-int/lit8 v7, v7, 0x1
goto :goto_31
.line 9
:cond_45
sget-object v4, Ldevelopers/mobile/abt/c;->e:Ldevelopers/mobile/abt/c;
invoke-static {v4, v6}, Lcom/google/protobuf/q0;->parseFrom(Lcom/google/protobuf/q0;[B)Lcom/google/protobuf/q0;
move-result-object v4
check-cast v4, Ldevelopers/mobile/abt/c;
:try_end_4d
.catch Lcom/google/protobuf/t0; {:try_start_26 .. :try_end_4d} :catch_4e
goto :goto_4f
:catch_4e
const/4 v4, 0x0
:goto_4f
if-eqz v4, :cond_1a
.line 10
:try_start_51
invoke-virtual {p0, v4}, Lcom/google/firebase/remoteconfig/internal/n;->b(Ldevelopers/mobile/abt/c;)Lorg/json/JSONObject;
move-result-object v4
invoke-virtual {v3, v4}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray;
:try_end_58
.catch Lorg/json/JSONException; {:try_start_51 .. :try_end_58} :catch_59
goto :goto_1a
:catch_59
nop
goto :goto_1a
.line 11
:cond_5b
iget-object p1, p1, Lcom/google/firebase/remoteconfig/proto/b;->a:Lcom/google/protobuf/s0$i;
.line 12
invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object p1
:goto_61
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_da
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/google/firebase/remoteconfig/proto/d;
.line 13
iget-object v4, v2, Lcom/google/firebase/remoteconfig/proto/d;->a:Ljava/lang/String;
const-string v5, "configns:"
.line 14
invoke-virtual {v4, v5}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
move-result v5
if-eqz v5, :cond_7d
const/16 v5, 0x9
.line 15
invoke-virtual {v4, v5}, Ljava/lang/String;->substring(I)Ljava/lang/String;
move-result-object v4
.line 16
:cond_7d
sget-object v5, Lcom/google/firebase/remoteconfig/internal/f;->e:Ljava/util/Date;
.line 17
new-instance v5, Lorg/json/JSONObject;
invoke-direct {v5}, Lorg/json/JSONObject;-><init>()V
.line 18
sget-object v5, Lcom/google/firebase/remoteconfig/internal/f;->e:Ljava/util/Date;
.line 19
new-instance v5, Lorg/json/JSONArray;
invoke-direct {v5}, Lorg/json/JSONArray;-><init>()V
.line 20
iget-object v2, v2, Lcom/google/firebase/remoteconfig/proto/d;->b:Lcom/google/protobuf/s0$i;
.line 21
new-instance v6, Ljava/util/HashMap;
invoke-direct {v6}, Ljava/util/HashMap;-><init>()V
.line 22
invoke-interface {v2}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v2
:goto_96
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v7
if-eqz v7, :cond_b8
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v7
check-cast v7, Lcom/google/firebase/remoteconfig/proto/c;
.line 23
iget-object v8, v7, Lcom/google/firebase/remoteconfig/proto/c;->a:Ljava/lang/String;
.line 24
iget-object v7, v7, Lcom/google/firebase/remoteconfig/proto/c;->b:Lcom/google/protobuf/l$h;
.line 25
sget-object v9, Lcom/google/firebase/remoteconfig/internal/n;->d:Ljava/nio/charset/Charset;
.line 26
iget-object v10, v7, Lcom/google/protobuf/l$h;->d:[B
array-length v10, v10
if-nez v10, :cond_b0
const-string v7, ""
goto :goto_b4
.line 27
:cond_b0
invoke-virtual {v7, v9}, Lcom/google/protobuf/l$h;->p(Ljava/nio/charset/Charset;)Ljava/lang/String;
move-result-object v7
.line 28
:goto_b4
invoke-virtual {v6, v8, v7}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
goto :goto_96
.line 29
:cond_b8
new-instance v2, Lorg/json/JSONObject;
invoke-direct {v2, v6}, Lorg/json/JSONObject;-><init>(Ljava/util/Map;)V
const-string v6, "firebase"
.line 30
invoke-virtual {v4, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v6
if-eqz v6, :cond_cf
.line 31
:try_start_c5
new-instance v6, Lorg/json/JSONArray;
invoke-virtual {v3}, Lorg/json/JSONArray;->toString()Ljava/lang/String;
move-result-object v7
invoke-direct {v6, v7}, Lorg/json/JSONArray;-><init>(Ljava/lang/String;)V
:try_end_ce
.catch Lorg/json/JSONException; {:try_start_c5 .. :try_end_ce} :catch_cf
move-object v5, v6
.line 32
:catch_cf
:cond_cf
:try_start_cf
new-instance v6, Lcom/google/firebase/remoteconfig/internal/f;
.line 33
invoke-direct {v6, v2, v1, v5}, Lcom/google/firebase/remoteconfig/internal/f;-><init>(Lorg/json/JSONObject;Ljava/util/Date;Lorg/json/JSONArray;)V
.line 34
invoke-virtual {v0, v4, v6}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
:try_end_d7
.catch Lorg/json/JSONException; {:try_start_cf .. :try_end_d7} :catch_d8
goto :goto_61
:catch_d8
nop
goto :goto_61
:cond_da
return-object v0
.end method
.method public final b(Ldevelopers/mobile/abt/c;)Lorg/json/JSONObject;
.registers 7
.annotation system Ldalvik/annotation/Throws;
value = {
Lorg/json/JSONException;
}
.end annotation
.line 1
new-instance v0, Lorg/json/JSONObject;
invoke-direct {v0}, Lorg/json/JSONObject;-><init>()V
.line 2
iget-object v1, p1, Ldevelopers/mobile/abt/c;->a:Ljava/lang/String;
const-string v2, "experimentId"
.line 3
invoke-virtual {v0, v2, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
.line 4
iget-object v1, p1, Ldevelopers/mobile/abt/c;->b:Ljava/lang/String;
const-string v2, "variantId"
.line 5
invoke-virtual {v0, v2, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
.line 6
sget-object v1, Lcom/google/firebase/remoteconfig/internal/n;->e:Lcom/google/firebase/remoteconfig/internal/n$a;
.line 7
invoke-virtual {v1}, Ljava/lang/ThreadLocal;->get()Ljava/lang/Object;
move-result-object v1
check-cast v1, Ljava/text/DateFormat;
new-instance v2, Ljava/util/Date;
const-wide/16 v3, 0x0
.line 8
invoke-direct {v2, v3, v4}, Ljava/util/Date;-><init>(J)V
invoke-virtual {v1, v2}, Ljava/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
move-result-object v1
const-string v2, "experimentStartTime"
.line 9
invoke-virtual {v0, v2, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
.line 10
iget-object p1, p1, Ldevelopers/mobile/abt/c;->c:Ljava/lang/String;
const-string v1, "triggerEvent"
.line 11
invoke-virtual {v0, v1, p1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
const-string p1, "triggerTimeoutMillis"
.line 12
invoke-virtual {v0, p1, v3, v4}, Lorg/json/JSONObject;->put(Ljava/lang/String;J)Lorg/json/JSONObject;
const-string p1, "timeToLiveMillis"
.line 13
invoke-virtual {v0, p1, v3, v4}, Lorg/json/JSONObject;->put(Ljava/lang/String;J)Lorg/json/JSONObject;
return-object v0
.end method
.method public final c(Ljava/lang/String;Ljava/lang/String;)Lcom/google/firebase/remoteconfig/internal/e;
.registers 5
iget-object v0, p0, Lcom/google/firebase/remoteconfig/internal/n;->a:Landroid/content/Context;
iget-object v1, p0, Lcom/google/firebase/remoteconfig/internal/n;->b:Ljava/lang/String;
invoke-static {v0, v1, p1, p2}, Lcom/google/firebase/remoteconfig/j;->d(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lcom/google/firebase/remoteconfig/internal/e;
move-result-object p1
return-object p1
.end method