granularity level: instruction
.class public final Lc1/d;
.super Ljava/lang/Object;
.source "SourceFile"
.implements Lc1/e;
.field public static final m:Ljava/lang/Object;
.field public static final n:Lc1/c;
.field public final a:Lp0/g;
.field public final b:Lf1/c;
.field public final c:Lk/j;
.field public final d:Lc1/k;
.field public final e:Lr0/o;
.field public final f:Lc1/i;
.field public final g:Ljava/lang/Object;
.field public final h:Ljava/util/concurrent/ExecutorService;
.field public final i:Ljava/util/concurrent/ThreadPoolExecutor;
.field public j:Ljava/lang/String;
.field public k:Ljava/util/HashSet;
.field public final l:Ljava/util/ArrayList;
.method public static constructor <clinit>()V
.locals 1
new-instance v0, Ljava/lang/Object;
invoke-direct {v0}, Ljava/lang/Object;-><init>()V
sput-object v0, Lc1/d;->m:Ljava/lang/Object;
new-instance v0, Lc1/c;
invoke-direct {v0}, Lc1/c;-><init>()V
sput-object v0, Lc1/d;->n:Lc1/c;
return-void
.end method
.method public constructor <init>(Lp0/g;Lb1/a;)V
.locals 11
new-instance v8, Ljava/util/concurrent/ThreadPoolExecutor;
sget-object v9, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;
new-instance v6, Ljava/util/concurrent/LinkedBlockingQueue;
invoke-direct {v6}, Ljava/util/concurrent/LinkedBlockingQueue;-><init>()V
sget-object v10, Lc1/d;->n:Lc1/c;
const/4 v1, 0x0
const/4 v2, 0x1
const-wide/16 v3, 0x1e
move-object v0, v8
move-object v5, v9
move-object v7, v10
invoke-direct/range {v0 .. v7}, Ljava/util/concurrent/ThreadPoolExecutor;-><init>(IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/BlockingQueue;Ljava/util/concurrent/ThreadFactory;)V
new-instance v0, Lf1/c;
invoke-virtual {p1}, Lp0/g;->a()V
iget-object v1, p1, Lp0/g;->a:Landroid/content/Context;
invoke-direct {v0, v1, p2}, Lf1/c;-><init>(Landroid/content/Context;Lb1/a;)V
new-instance p2, Lk/j;
invoke-direct {p2, p1}, Lk/j;-><init>(Lp0/g;)V
invoke-static {}, Lc1/k;->a()Lc1/k;
move-result-object v1
new-instance v2, Lr0/o;
new-instance v3, Lr0/d;
const/4 v4, 0x2
invoke-direct {v3, v4, p1}, Lr0/d;-><init>(ILjava/lang/Object;)V
invoke-direct {v2, v3}, Lr0/o;-><init>(Lb1/a;)V
new-instance v3, Lc1/i;
invoke-direct {v3}, Lc1/i;-><init>()V
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
new-instance v4, Ljava/lang/Object;
invoke-direct {v4}, Ljava/lang/Object;-><init>()V
iput-object v4, p0, Lc1/d;->g:Ljava/lang/Object;
new-instance v4, Ljava/util/HashSet;
invoke-direct {v4}, Ljava/util/HashSet;-><init>()V
iput-object v4, p0, Lc1/d;->k:Ljava/util/HashSet;
new-instance v4, Ljava/util/ArrayList;
invoke-direct {v4}, Ljava/util/ArrayList;-><init>()V
iput-object v4, p0, Lc1/d;->l:Ljava/util/ArrayList;
iput-object p1, p0, Lc1/d;->a:Lp0/g;
iput-object v0, p0, Lc1/d;->b:Lf1/c;
iput-object p2, p0, Lc1/d;->c:Lk/j;
iput-object v1, p0, Lc1/d;->d:Lc1/k;
iput-object v2, p0, Lc1/d;->e:Lr0/o;
iput-object v3, p0, Lc1/d;->f:Lc1/i;
iput-object v8, p0, Lc1/d;->h:Ljava/util/concurrent/ExecutorService;
new-instance p1, Ljava/util/concurrent/ThreadPoolExecutor;
new-instance v6, Ljava/util/concurrent/LinkedBlockingQueue;
invoke-direct {v6}, Ljava/util/concurrent/LinkedBlockingQueue;-><init>()V
const/4 v1, 0x0
const/4 v2, 0x1
const-wide/16 v3, 0x1e
move-object v0, p1
invoke-direct/range {v0 .. v7}, Ljava/util/concurrent/ThreadPoolExecutor;-><init>(IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/BlockingQueue;Ljava/util/concurrent/ThreadFactory;)V
iput-object p1, p0, Lc1/d;->i:Ljava/util/concurrent/ThreadPoolExecutor;
return-void
.end method
.method public final a(Z)V
.locals 7
sget-object v0, Lc1/d;->m:Ljava/lang/Object;
monitor-enter v0
:try_start_0
iget-object v1, p0, Lc1/d;->a:Lp0/g;
invoke-virtual {v1}, Lp0/g;->a()V
iget-object v1, v1, Lp0/g;->a:Landroid/content/Context;
invoke-static {v1}, Lk/j;->a(Landroid/content/Context;)Lk/j;
move-result-object v1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_1
:try_start_1
iget-object v2, p0, Lc1/d;->c:Lk/j;
invoke-virtual {v2}, Lk/j;->j()Le1/a;
move-result-object v2
iget-object v3, v2, Le1/a;->b:Le1/c;
sget-object v4, Le1/c;->b:Le1/c;
const/4 v5, 0x1
if-eq v3, v4, :cond_1
sget-object v4, Le1/c;->a:Le1/c;
if-ne v3, v4, :cond_0
goto :goto_0
:cond_0
const/4 v3, 0x0
goto :goto_1
:goto_0
:cond_1
const/4 v3, 0x1
:goto_1
if-eqz v3, :cond_2
invoke-virtual {p0, v2}, Lc1/d;->f(Le1/a;)Ljava/lang/String;
move-result-object v3
iget-object v4, p0, Lc1/d;->c:Lk/j;
new-instance v6, Lk/l;
invoke-direct {v6, v2}, Lk/l;-><init>(Le1/a;)V
iput-object v3, v6, Lk/l;->d:Ljava/lang/String;
sget-object v2, Le1/c;->c:Le1/c;
invoke-virtual {v6, v2}, Lk/l;->b(Le1/c;)V
invoke-virtual {v6}, Lk/l;->a()Le1/a;
move-result-object v2
invoke-virtual {v4, v2}, Lk/j;->i(Le1/a;)V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:cond_2
if-eqz v1, :cond_3
:try_start_2
invoke-virtual {v1}, Lk/j;->k()V
:cond_3
monitor-exit v0
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_1
if-eqz p1, :cond_4
new-instance v0, Lk/l;
invoke-direct {v0, v2}, Lk/l;-><init>(Le1/a;)V
const/4 v1, 0x0
iput-object v1, v0, Lk/l;->c:Ljava/lang/Object;
invoke-virtual {v0}, Lk/l;->a()Le1/a;
move-result-object v2
:cond_4
invoke-virtual {p0, v2}, Lc1/d;->h(Le1/a;)V
iget-object v0, p0, Lc1/d;->i:Ljava/util/concurrent/ThreadPoolExecutor;
new-instance v1, Lc1/b;
invoke-direct {v1, p0, p1, v5}, Lc1/b;-><init>(Lc1/d;ZI)V
invoke-virtual {v0, v1}, Ljava/util/concurrent/ThreadPoolExecutor;->execute(Ljava/lang/Runnable;)V
return-void
:catchall_0
move-exception p1
if-eqz v1, :cond_5
:try_start_3
invoke-virtual {v1}, Lk/j;->k()V
:cond_5
throw p1
:catchall_1
move-exception p1
monitor-exit v0
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_1
throw p1
.end method
.method public final b(Le1/a;)Le1/a;
.locals 18
move-object/from16 v1, p0
move-object/from16 v0, p1
iget-object v2, v1, Lc1/d;->b:Lf1/c;
iget-object v3, v1, Lc1/d;->a:Lp0/g;
invoke-virtual {v3}, Lp0/g;->a()V
iget-object v3, v3, Lp0/g;->c:Lp0/h;
iget-object v3, v3, Lp0/h;->a:Ljava/lang/String;
iget-object v4, v0, Le1/a;->a:Ljava/lang/String;
iget-object v5, v1, Lc1/d;->a:Lp0/g;
invoke-virtual {v5}, Lp0/g;->a()V
iget-object v5, v5, Lp0/g;->c:Lp0/h;
iget-object v5, v5, Lp0/h;->g:Ljava/lang/String;
iget-object v6, v0, Le1/a;->d:Ljava/lang/String;
iget-object v7, v2, Lf1/c;->c:Lf1/e;
monitor-enter v7
:try_start_0
iget v8, v7, Lf1/e;->c:I
const/4 v9, 0x0
const/4 v10, 0x1
if-eqz v8, :cond_1
iget-object v8, v7, Lf1/e;->a:Lc1/k;
iget-object v8, v8, Lc1/k;->a:Lz0/e;
invoke-virtual {v8}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v11
iget-wide v13, v7, Lf1/e;->b:J
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_2
cmp-long v8, v11, v13
if-lez v8, :cond_0
goto :goto_0
:cond_0
const/4 v8, 0x0
goto :goto_1
:goto_0
:cond_1
const/4 v8, 0x1
:goto_1
monitor-exit v7
const-string v7, "Firebase Installations Service is unavailable. Please try again later."
if-eqz v8, :cond_c
const/4 v8, 0x2
new-array v11, v8, [Ljava/lang/Object;
aput-object v5, v11, v9
aput-object v4, v11, v10
const-string v4, "projects/%s/installations/%s/authTokens:generate"
invoke-static {v4, v11}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v4
invoke-static {v4}, Lf1/c;->a(Ljava/lang/String;)Ljava/net/URL;
move-result-object v4
const/4 v11, 0x0
:goto_2
if-gt v11, v10, :cond_b
const v12, 0x8003
invoke-static {v12}, Landroid/net/TrafficStats;->setThreadStatsTag(I)V
invoke-virtual {v2, v4, v3}, Lf1/c;->c(Ljava/net/URL;Ljava/lang/String;)Ljava/net/HttpURLConnection;
move-result-object v12
:try_start_1
const-string v13, "POST"
invoke-virtual {v12, v13}, Ljava/net/HttpURLConnection;->setRequestMethod(Ljava/lang/String;)V
const-string v13, "Authorization"
new-instance v14, Ljava/lang/StringBuilder;
invoke-direct {v14}, Ljava/lang/StringBuilder;-><init>()V
const-string v15, "FIS_v2 "
invoke-virtual {v14, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v14, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v14}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v14
invoke-virtual {v12, v13, v14}, Ljava/net/URLConnection;->addRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
invoke-virtual {v12, v10}, Ljava/net/URLConnection;->setDoOutput(Z)V
invoke-static {v12}, Lf1/c;->h(Ljava/net/HttpURLConnection;)V
invoke-virtual {v12}, Ljava/net/HttpURLConnection;->getResponseCode()I
move-result v13
iget-object v14, v2, Lf1/c;->c:Lf1/e;
invoke-virtual {v14, v13}, Lf1/e;->a(I)V
const/16 v14, 0xc8
if-lt v13, v14, :cond_2
const/16 v14, 0x12c
if-ge v13, v14, :cond_2
const/4 v14, 0x1
goto :goto_3
:cond_2
const/4 v14, 0x0
:goto_3
const/4 v15, 0x0
if-eqz v14, :cond_3
invoke-static {v12}, Lf1/c;->f(Ljava/net/HttpURLConnection;)Lf1/b;
move-result-object v2
goto :goto_6
:cond_3
invoke-static {v12, v15, v3, v5}, Lf1/c;->b(Ljava/net/HttpURLConnection;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
const/16 v14, 0x191
const-wide/16 v16, 0x0
if-eq v13, v14, :cond_7
const/16 v14, 0x194
if-ne v13, v14, :cond_4
goto :goto_4
:cond_4
const/16 v14, 0x1ad
if-eq v13, v14, :cond_6
const/16 v14, 0x1f4
if-lt v13, v14, :cond_5
const/16 v14, 0x258
if-ge v13, v14, :cond_5
goto/16 :goto_7
:cond_5
const-string v13, "Firebase-Installations"
const-string v14, "Firebase Installations can not communicate with Firebase server APIs due to invalid configuration. Please update your Firebase initialization process and set valid Firebase options (API key, Project ID, Application ID) when initializing Firebase."
invoke-static {v13, v14}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
new-instance v13, Ll/k;
invoke-direct {v13}, Ll/k;-><init>()V
invoke-static/range {v16 .. v17}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v14
iput-object v14, v13, Ll/k;->b:Ljava/lang/Object;
sget-object v14, Lf1/f;->b:Lf1/f;
goto :goto_5
:cond_6
new-instance v13, Lc1/f;
const-string v14, "Firebase servers have received too many requests from this client in a short period of time. Please try again later."
invoke-direct {v13, v14}, Lc1/f;-><init>(Ljava/lang/String;)V
throw v13
:goto_4
:cond_7
new-instance v13, Ll/k;
invoke-direct {v13}, Ll/k;-><init>()V
invoke-static/range {v16 .. v17}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v14
iput-object v14, v13, Ll/k;->b:Ljava/lang/Object;
sget-object v14, Lf1/f;->c:Lf1/f;
:goto_5
iput-object v14, v13, Ll/k;->c:Ljava/lang/Object;
invoke-virtual {v13}, Ll/k;->a()Lf1/b;
move-result-object v2
:try_end_1
.catch Ljava/lang/AssertionError; {:try_start_1 .. :try_end_1} :catch_0
.catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_0
.catchall {:try_start_1 .. :try_end_1} :catchall_1
:goto_6
invoke-virtual {v12}, Ljava/net/HttpURLConnection;->disconnect()V
invoke-static {}, Landroid/net/TrafficStats;->clearThreadStatsTag()V
iget-object v3, v2, Lf1/b;->c:Lf1/f;
invoke-virtual {v3}, Ljava/lang/Enum;->ordinal()I
move-result v3
if-eqz v3, :cond_a
if-eq v3, v10, :cond_9
if-ne v3, v8, :cond_8
monitor-enter p0
:try_start_2
iput-object v15, v1, Lc1/d;->j:Ljava/lang/String;
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
monitor-exit p0
new-instance v2, Lk/l;
invoke-direct {v2, v0}, Lk/l;-><init>(Le1/a;)V
sget-object v0, Le1/c;->b:Le1/c;
invoke-virtual {v2, v0}, Lk/l;->b(Le1/c;)V
invoke-virtual {v2}, Lk/l;->a()Le1/a;
move-result-object v0
return-object v0
:catchall_0
move-exception v0
move-object v2, v0
monitor-exit p0
throw v2
:cond_8
new-instance v0, Lc1/f;
invoke-direct {v0, v7}, Lc1/f;-><init>(Ljava/lang/String;)V
throw v0
:cond_9
new-instance v2, Lk/l;
invoke-direct {v2, v0}, Lk/l;-><init>(Le1/a;)V
const-string v0, "BAD CONFIG"
iput-object v0, v2, Lk/l;->g:Ljava/lang/Object;
sget-object v0, Le1/c;->e:Le1/c;
invoke-virtual {v2, v0}, Lk/l;->b(Le1/c;)V
invoke-virtual {v2}, Lk/l;->a()Le1/a;
move-result-object v0
return-object v0
:cond_a
iget-object v3, v2, Lf1/b;->a:Ljava/lang/String;
iget-wide v4, v2, Lf1/b;->b:J
iget-object v2, v1, Lc1/d;->d:Lc1/k;
invoke-virtual {v2}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
sget-object v6, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
iget-object v2, v2, Lc1/k;->a:Lz0/e;
invoke-virtual {v2}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v7
invoke-virtual {v6, v7, v8}, Ljava/util/concurrent/TimeUnit;->toSeconds(J)J
move-result-wide v6
new-instance v2, Lk/l;
invoke-direct {v2, v0}, Lk/l;-><init>(Le1/a;)V
iput-object v3, v2, Lk/l;->c:Ljava/lang/Object;
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v0
iput-object v0, v2, Lk/l;->a:Ljava/lang/Long;
invoke-static {v6, v7}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v0
iput-object v0, v2, Lk/l;->b:Ljava/lang/Long;
invoke-virtual {v2}, Lk/l;->a()Le1/a;
move-result-object v0
return-object v0
:catchall_1
move-exception v0
invoke-virtual {v12}, Ljava/net/HttpURLConnection;->disconnect()V
invoke-static {}, Landroid/net/TrafficStats;->clearThreadStatsTag()V
throw v0
:goto_7
:catch_0
invoke-virtual {v12}, Ljava/net/HttpURLConnection;->disconnect()V
invoke-static {}, Landroid/net/TrafficStats;->clearThreadStatsTag()V
add-int/lit8 v11, v11, 0x1
goto/16 :goto_2
:cond_b
new-instance v0, Lc1/f;
invoke-direct {v0, v7}, Lc1/f;-><init>(Ljava/lang/String;)V
throw v0
:cond_c
new-instance v0, Lc1/f;
invoke-direct {v0, v7}, Lc1/f;-><init>(Ljava/lang/String;)V
throw v0
:catchall_2
move-exception v0
monitor-exit v7
throw v0
.end method
.method public final c()Lo0/o;
.locals 4
invoke-virtual {p0}, Lc1/d;->e()V
monitor-enter p0
:try_start_0
iget-object v0, p0, Lc1/d;->j:Ljava/lang/String;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_1
monitor-exit p0
if-eqz v0, :cond_0
invoke-static {v0}, Lf0/a;->j(Ljava/lang/Object;)Lo0/o;
move-result-object v0
return-object v0
:cond_0
new-instance v0, Lo0/i;
invoke-direct {v0}, Lo0/i;-><init>()V
new-instance v1, Lc1/h;
invoke-direct {v1, v0}, Lc1/h;-><init>(Lo0/i;)V
iget-object v2, p0, Lc1/d;->g:Ljava/lang/Object;
monitor-enter v2
:try_start_1
iget-object v3, p0, Lc1/d;->l:Ljava/util/ArrayList;
invoke-virtual {v3, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
monitor-exit v2
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
iget-object v0, v0, Lo0/i;->a:Lo0/o;
iget-object v1, p0, Lc1/d;->h:Ljava/util/concurrent/ExecutorService;
new-instance v2, Lq/n;
const/4 v3, 0x1
invoke-direct {v2, v3, p0}, Lq/n;-><init>(ILjava/lang/Object;)V
invoke-interface {v1, v2}, Ljava/util/concurrent/Executor;->execute(Ljava/lang/Runnable;)V
return-object v0
:catchall_0
move-exception v0
:try_start_2
monitor-exit v2
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
throw v0
:catchall_1
move-exception v0
monitor-exit p0
throw v0
.end method
.method public final d()Lo0/o;
.locals 4
invoke-virtual {p0}, Lc1/d;->e()V
new-instance v0, Lo0/i;
invoke-direct {v0}, Lo0/i;-><init>()V
new-instance v1, Lc1/g;
iget-object v2, p0, Lc1/d;->d:Lc1/k;
invoke-direct {v1, v2, v0}, Lc1/g;-><init>(Lc1/k;Lo0/i;)V
iget-object v2, p0, Lc1/d;->g:Ljava/lang/Object;
monitor-enter v2
:try_start_0
iget-object v3, p0, Lc1/d;->l:Ljava/util/ArrayList;
invoke-virtual {v3, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
monitor-exit v2
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
iget-object v0, v0, Lo0/i;->a:Lo0/o;
iget-object v1, p0, Lc1/d;->h:Ljava/util/concurrent/ExecutorService;
new-instance v2, Lc1/b;
const/4 v3, 0x0
invoke-direct {v2, p0, v3, v3}, Lc1/b;-><init>(Lc1/d;ZI)V
invoke-interface {v1, v2}, Ljava/util/concurrent/Executor;->execute(Ljava/lang/Runnable;)V
return-object v0
:catchall_0
move-exception v0
:try_start_1
monitor-exit v2
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw v0
.end method
.method public final e()V
.locals 4
iget-object v0, p0, Lc1/d;->a:Lp0/g;
invoke-virtual {v0}, Lp0/g;->a()V
iget-object v0, v0, Lp0/g;->c:Lp0/h;
iget-object v0, v0, Lp0/h;->b:Ljava/lang/String;
const-string v1, "Please set your Application ID. A valid Firebase App ID is required to communicate with Firebase server APIs: It identifies your application with Firebase.Please refer to https://firebase.google.com/support/privacy/init-options."
invoke-static {v1, v0}, Lp0/a;->h(Ljava/lang/String;Ljava/lang/String;)V
iget-object v0, p0, Lc1/d;->a:Lp0/g;
invoke-virtual {v0}, Lp0/g;->a()V
iget-object v0, v0, Lp0/g;->c:Lp0/h;
iget-object v0, v0, Lp0/h;->g:Ljava/lang/String;
const-string v2, "Please set your Project ID. A valid Firebase Project ID is required to communicate with Firebase server APIs: It identifies your application with Firebase.Please refer to https://firebase.google.com/support/privacy/init-options."
invoke-static {v2, v0}, Lp0/a;->h(Ljava/lang/String;Ljava/lang/String;)V
iget-object v0, p0, Lc1/d;->a:Lp0/g;
invoke-virtual {v0}, Lp0/g;->a()V
iget-object v0, v0, Lp0/g;->c:Lp0/h;
iget-object v0, v0, Lp0/h;->a:Ljava/lang/String;
const-string v2, "Please set a valid API key. A Firebase API key is required to communicate with Firebase server APIs: It authenticates your project with Google.Please refer to https://firebase.google.com/support/privacy/init-options."
invoke-static {v2, v0}, Lp0/a;->h(Ljava/lang/String;Ljava/lang/String;)V
iget-object v0, p0, Lc1/d;->a:Lp0/g;
invoke-virtual {v0}, Lp0/g;->a()V
iget-object v0, v0, Lp0/g;->c:Lp0/h;
iget-object v0, v0, Lp0/h;->b:Ljava/lang/String;
sget-object v3, Lc1/k;->c:Ljava/util/regex/Pattern;
const-string v3, ":"
invoke-virtual {v0, v3}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_1
iget-object v0, p0, Lc1/d;->a:Lp0/g;
invoke-virtual {v0}, Lp0/g;->a()V
iget-object v0, v0, Lp0/g;->c:Lp0/h;
iget-object v0, v0, Lp0/h;->a:Ljava/lang/String;
sget-object v1, Lc1/k;->c:Ljava/util/regex/Pattern;
invoke-virtual {v1, v0}, Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
move-result-object v0
invoke-virtual {v0}, Ljava/util/regex/Matcher;->matches()Z
move-result v0
if-eqz v0, :cond_0
return-void
:cond_0
new-instance v0, Ljava/lang/IllegalArgumentException;
invoke-direct {v0, v2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
:cond_1
new-instance v0, Ljava/lang/IllegalArgumentException;
invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public final f(Le1/a;)Ljava/lang/String;
.locals 5
iget-object v0, p0, Lc1/d;->a:Lp0/g;
invoke-virtual {v0}, Lp0/g;->a()V
iget-object v0, v0, Lp0/g;->b:Ljava/lang/String;
const-string v1, "CHIME_ANDROID_SDK"
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-nez v0, :cond_0
iget-object v0, p0, Lc1/d;->a:Lp0/g;
invoke-virtual {v0}, Lp0/g;->a()V
iget-object v0, v0, Lp0/g;->b:Ljava/lang/String;
const-string v1, "[DEFAULT]"
invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_2
:cond_0
iget-object p1, p1, Le1/a;->b:Le1/c;
sget-object v0, Le1/c;->a:Le1/c;
if-ne p1, v0, :cond_1
const/4 p1, 0x1
goto :goto_0
:cond_1
const/4 p1, 0x0
:goto_0
if-nez p1, :cond_3
:cond_2
iget-object p1, p0, Lc1/d;->f:Lc1/i;
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
invoke-static {}, Lc1/i;->a()Ljava/lang/String;
move-result-object p1
return-object p1
:cond_3
iget-object p1, p0, Lc1/d;->e:Lr0/o;
invoke-virtual {p1}, Lr0/o;->get()Ljava/lang/Object;
move-result-object p1
check-cast p1, Le1/b;
iget-object v0, p1, Le1/b;->a:Landroid/content/SharedPreferences;
monitor-enter v0
:try_start_0
iget-object v1, p1, Le1/b;->a:Landroid/content/SharedPreferences;
monitor-enter v1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_1
:try_start_1
iget-object v2, p1, Le1/b;->a:Landroid/content/SharedPreferences;
const-string v3, "|S|id"
const/4 v4, 0x0
invoke-interface {v2, v3, v4}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v2
monitor-exit v1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
if-eqz v2, :cond_4
goto :goto_1
:try_start_2
:cond_4
invoke-virtual {p1}, Le1/b;->a()Ljava/lang/String;
move-result-object v2
:goto_1
monitor-exit v0
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_1
invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result p1
if-eqz p1, :cond_5
iget-object p1, p0, Lc1/d;->f:Lc1/i;
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
invoke-static {}, Lc1/i;->a()Ljava/lang/String;
move-result-object v2
:cond_5
return-object v2
:catchall_0
move-exception p1
:try_start_3
monitor-exit v1
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
:try_start_4
throw p1
:catchall_1
move-exception p1
monitor-exit v0
:try_end_4
.catchall {:try_start_4 .. :try_end_4} :catchall_1
throw p1
.end method
.method public final g(Le1/a;)Le1/a;
.locals 22
move-object/from16 v1, p0
move-object/from16 v0, p1
iget-object v2, v0, Le1/a;->a:Ljava/lang/String;
const/4 v3, 0x0
const/4 v4, 0x0
if-eqz v2, :cond_3
invoke-virtual {v2}, Ljava/lang/String;->length()I
move-result v2
const/16 v5, 0xb
if-ne v2, v5, :cond_3
iget-object v2, v1, Lc1/d;->e:Lr0/o;
invoke-virtual {v2}, Lr0/o;->get()Ljava/lang/Object;
move-result-object v2
check-cast v2, Le1/b;
iget-object v5, v2, Le1/b;->a:Landroid/content/SharedPreferences;
monitor-enter v5
:try_start_0
sget-object v6, Le1/b;->c:[Ljava/lang/String;
const/4 v7, 0x0
:goto_0
const/4 v8, 0x4
if-ge v7, v8, :cond_1
aget-object v8, v6, v7
iget-object v9, v2, Le1/b;->b:Ljava/lang/String;
new-instance v10, Ljava/lang/StringBuilder;
invoke-direct {v10}, Ljava/lang/StringBuilder;-><init>()V
const-string v11, "|T|"
invoke-virtual {v10, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v10, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v9, "|"
invoke-virtual {v10, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v10, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v10}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v8
iget-object v9, v2, Le1/b;->a:Landroid/content/SharedPreferences;
invoke-interface {v9, v8, v4}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v8
if-eqz v8, :cond_2
invoke-virtual {v8}, Ljava/lang/String;->isEmpty()Z
move-result v9
if-nez v9, :cond_2
const-string v2, "{"
invoke-virtual {v8, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
move-result v2
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-eqz v2, :cond_0
:try_start_1
new-instance v2, Lorg/json/JSONObject;
invoke-direct {v2, v8}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V
const-string v6, "token"
invoke-virtual {v2, v6}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v4
:try_end_1
.catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_0
.catchall {:try_start_1 .. :try_end_1} :catchall_0
goto :goto_1
:cond_0
move-object v4, v8
:try_start_2
:goto_1
:catch_0
:cond_1
monitor-exit v5
goto :goto_2
:cond_2
add-int/lit8 v7, v7, 0x1
goto :goto_0
:catchall_0
move-exception v0
monitor-exit v5
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
throw v0
:goto_2
:cond_3
iget-object v2, v1, Lc1/d;->b:Lf1/c;
iget-object v5, v1, Lc1/d;->a:Lp0/g;
invoke-virtual {v5}, Lp0/g;->a()V
iget-object v5, v5, Lp0/g;->c:Lp0/h;
iget-object v5, v5, Lp0/h;->a:Ljava/lang/String;
iget-object v6, v0, Le1/a;->a:Ljava/lang/String;
iget-object v7, v1, Lc1/d;->a:Lp0/g;
invoke-virtual {v7}, Lp0/g;->a()V
iget-object v7, v7, Lp0/g;->c:Lp0/h;
iget-object v7, v7, Lp0/h;->g:Ljava/lang/String;
iget-object v8, v1, Lc1/d;->a:Lp0/g;
invoke-virtual {v8}, Lp0/g;->a()V
iget-object v8, v8, Lp0/g;->c:Lp0/h;
iget-object v8, v8, Lp0/h;->b:Ljava/lang/String;
iget-object v9, v2, Lf1/c;->c:Lf1/e;
monitor-enter v9
:try_start_3
iget v10, v9, Lf1/e;->c:I
const/4 v11, 0x1
if-eqz v10, :cond_5
iget-object v10, v9, Lf1/e;->a:Lc1/k;
iget-object v10, v10, Lc1/k;->a:Lz0/e;
invoke-virtual {v10}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v12
iget-wide v14, v9, Lf1/e;->b:J
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_2
cmp-long v10, v12, v14
if-lez v10, :cond_4
goto :goto_3
:cond_4
const/4 v10, 0x0
goto :goto_4
:goto_3
:cond_5
const/4 v10, 0x1
:goto_4
monitor-exit v9
const-string v9, "Firebase Installations Service is unavailable. Please try again later."
if-eqz v10, :cond_e
new-array v10, v11, [Ljava/lang/Object;
aput-object v7, v10, v3
const-string v12, "projects/%s/installations"
invoke-static {v12, v10}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v10
invoke-static {v10}, Lf1/c;->a(Ljava/lang/String;)Ljava/net/URL;
move-result-object v10
const/4 v12, 0x0
:goto_5
if-gt v12, v11, :cond_d
const v13, 0x8001
invoke-static {v13}, Landroid/net/TrafficStats;->setThreadStatsTag(I)V
invoke-virtual {v2, v10, v5}, Lf1/c;->c(Ljava/net/URL;Ljava/lang/String;)Ljava/net/HttpURLConnection;
move-result-object v13
:try_start_4
const-string v14, "POST"
invoke-virtual {v13, v14}, Ljava/net/HttpURLConnection;->setRequestMethod(Ljava/lang/String;)V
invoke-virtual {v13, v11}, Ljava/net/URLConnection;->setDoOutput(Z)V
if-eqz v4, :cond_6
const-string v14, "x-goog-fis-android-iid-migration-auth"
invoke-virtual {v13, v14, v4}, Ljava/net/URLConnection;->addRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
:cond_6
invoke-static {v13, v6, v8}, Lf1/c;->g(Ljava/net/HttpURLConnection;Ljava/lang/String;Ljava/lang/String;)V
invoke-virtual {v13}, Ljava/net/HttpURLConnection;->getResponseCode()I
move-result v14
iget-object v15, v2, Lf1/c;->c:Lf1/e;
invoke-virtual {v15, v14}, Lf1/e;->a(I)V
const/16 v15, 0xc8
if-lt v14, v15, :cond_7
const/16 v15, 0x12c
if-ge v14, v15, :cond_7
const/4 v15, 0x1
goto :goto_6
:cond_7
const/4 v15, 0x0
:goto_6
if-eqz v15, :cond_8
invoke-static {v13}, Lf1/c;->e(Ljava/net/HttpURLConnection;)Lf1/a;
move-result-object v2
goto :goto_7
:cond_8
invoke-static {v13, v8, v5, v7}, Lf1/c;->b(Ljava/net/HttpURLConnection;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
const/16 v15, 0x1ad
if-eq v14, v15, :cond_c
const/16 v15, 0x1f4
if-lt v14, v15, :cond_9
const/16 v15, 0x258
if-ge v14, v15, :cond_9
goto/16 :goto_8
:cond_9
const-string v14, "Firebase-Installations"
const-string v15, "Firebase Installations can not communicate with Firebase server APIs due to invalid configuration. Please update your Firebase initialization process and set valid Firebase options (API key, Project ID, Application ID) when initializing Firebase."
invoke-static {v14, v15}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
const/16 v20, 0x0
const/16 v19, 0x0
const/16 v18, 0x0
const/16 v17, 0x0
sget-object v21, Lf1/d;->b:Lf1/d;
new-instance v14, Lf1/a;
move-object/from16 v16, v14
invoke-direct/range {v16 .. v21}, Lf1/a;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lf1/b;Lf1/d;)V
:try_end_4
.catch Ljava/lang/AssertionError; {:try_start_4 .. :try_end_4} :catch_1
.catch Ljava/io/IOException; {:try_start_4 .. :try_end_4} :catch_1
.catchall {:try_start_4 .. :try_end_4} :catchall_1
move-object v2, v14
:goto_7
invoke-virtual {v13}, Ljava/net/HttpURLConnection;->disconnect()V
invoke-static {}, Landroid/net/TrafficStats;->clearThreadStatsTag()V
iget-object v3, v2, Lf1/a;->e:Lf1/d;
invoke-virtual {v3}, Ljava/lang/Enum;->ordinal()I
move-result v3
if-eqz v3, :cond_b
if-ne v3, v11, :cond_a
new-instance v2, Lk/l;
invoke-direct {v2, v0}, Lk/l;-><init>(Le1/a;)V
const-string v0, "BAD CONFIG"
iput-object v0, v2, Lk/l;->g:Ljava/lang/Object;
sget-object v0, Le1/c;->e:Le1/c;
invoke-virtual {v2, v0}, Lk/l;->b(Le1/c;)V
invoke-virtual {v2}, Lk/l;->a()Le1/a;
move-result-object v0
return-object v0
:cond_a
new-instance v0, Lc1/f;
const-string v2, "Firebase Installations Service is unavailable. Please try again later."
invoke-direct {v0, v2}, Lc1/f;-><init>(Ljava/lang/String;)V
throw v0
:cond_b
iget-object v3, v2, Lf1/a;->b:Ljava/lang/String;
iget-object v4, v2, Lf1/a;->c:Ljava/lang/String;
iget-object v5, v1, Lc1/d;->d:Lc1/k;
invoke-virtual {v5}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
sget-object v6, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
iget-object v5, v5, Lc1/k;->a:Lz0/e;
invoke-virtual {v5}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v7
invoke-virtual {v6, v7, v8}, Ljava/util/concurrent/TimeUnit;->toSeconds(J)J
move-result-wide v5
iget-object v2, v2, Lf1/a;->d:Lf1/b;
iget-object v7, v2, Lf1/b;->a:Ljava/lang/String;
iget-wide v8, v2, Lf1/b;->b:J
new-instance v2, Lk/l;
invoke-direct {v2, v0}, Lk/l;-><init>(Le1/a;)V
iput-object v3, v2, Lk/l;->d:Ljava/lang/String;
sget-object v0, Le1/c;->d:Le1/c;
invoke-virtual {v2, v0}, Lk/l;->b(Le1/c;)V
iput-object v7, v2, Lk/l;->c:Ljava/lang/Object;
iput-object v4, v2, Lk/l;->f:Ljava/lang/Object;
invoke-static {v8, v9}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v0
iput-object v0, v2, Lk/l;->a:Ljava/lang/Long;
invoke-static {v5, v6}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v0
iput-object v0, v2, Lk/l;->b:Ljava/lang/Long;
invoke-virtual {v2}, Lk/l;->a()Le1/a;
move-result-object v0
return-object v0
:try_start_5
:cond_c
new-instance v14, Lc1/f;
const-string v15, "Firebase servers have received too many requests from this client in a short period of time. Please try again later."
invoke-direct {v14, v15}, Lc1/f;-><init>(Ljava/lang/String;)V
throw v14
:try_end_5
.catch Ljava/lang/AssertionError; {:try_start_5 .. :try_end_5} :catch_1
.catch Ljava/io/IOException; {:try_start_5 .. :try_end_5} :catch_1
.catchall {:try_start_5 .. :try_end_5} :catchall_1
:catchall_1
move-exception v0
invoke-virtual {v13}, Ljava/net/HttpURLConnection;->disconnect()V
invoke-static {}, Landroid/net/TrafficStats;->clearThreadStatsTag()V
throw v0
:goto_8
:catch_1
invoke-virtual {v13}, Ljava/net/HttpURLConnection;->disconnect()V
invoke-static {}, Landroid/net/TrafficStats;->clearThreadStatsTag()V
add-int/lit8 v12, v12, 0x1
goto/16 :goto_5
:cond_d
new-instance v0, Lc1/f;
invoke-direct {v0, v9}, Lc1/f;-><init>(Ljava/lang/String;)V
throw v0
:cond_e
new-instance v0, Lc1/f;
invoke-direct {v0, v9}, Lc1/f;-><init>(Ljava/lang/String;)V
throw v0
:catchall_2
move-exception v0
monitor-exit v9
throw v0
.end method
.method public final h(Le1/a;)V
.locals 3
iget-object v0, p0, Lc1/d;->g:Ljava/lang/Object;
monitor-enter v0
:try_start_0
iget-object v1, p0, Lc1/d;->l:Ljava/util/ArrayList;
invoke-virtual {v1}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;
move-result-object v1
:goto_0
:cond_0
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_1
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lc1/j;
invoke-interface {v2, p1}, Lc1/j;->a(Le1/a;)Z
move-result v2
if-eqz v2, :cond_0
invoke-interface {v1}, Ljava/util/Iterator;->remove()V
goto :goto_0
:cond_1
monitor-exit v0
return-void
:catchall_0
move-exception p1
monitor-exit v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw p1
.end method