granularity level: instruction

		.class public final Lf1/c;
.super Ljava/lang/Object;
.source "SourceFile"


.field public static final d:Ljava/util/regex/Pattern;
.field public static final e:Ljava/nio/charset/Charset;
.field public final a:Landroid/content/Context;
.field public final b:Lb1/a;
.field public final c:Lf1/e;


.method public static constructor <clinit>()V
	.locals 1

	const-string v0, "[0-9]+s"
	invoke-static {v0}, Ljava/util/regex/Pattern;->compile(Ljava/lang/String;)Ljava/util/regex/Pattern;
	move-result-object v0
	sput-object v0, Lf1/c;->d:Ljava/util/regex/Pattern;
	const-string v0, "UTF-8"
	invoke-static {v0}, Ljava/nio/charset/Charset;->forName(Ljava/lang/String;)Ljava/nio/charset/Charset;
	move-result-object v0
	sput-object v0, Lf1/c;->e:Ljava/nio/charset/Charset;
	return-void
.end method

.method public constructor <init>(Landroid/content/Context;Lb1/a;)V
	.locals 0

	invoke-direct {p0}, Ljava/lang/Object;-><init>()V
	iput-object p1, p0, Lf1/c;->a:Landroid/content/Context;
	iput-object p2, p0, Lf1/c;->b:Lb1/a;
	new-instance p1, Lf1/e;
	invoke-direct {p1}, Lf1/e;-><init>()V
	iput-object p1, p0, Lf1/c;->c:Lf1/e;
	return-void
.end method

.method public static a(Ljava/lang/String;)Ljava/net/URL;
	.locals 5

	new-instance v0, Ljava/net/URL;
	const-string v1, "https://%s/%s/%s"
	const/4 v2, 0x3
	new-array v2, v2, [Ljava/lang/Object;
	const/4 v3, 0x0
	const-string v4, "firebaseinstallations.googleapis.com"
	aput-object v4, v2, v3
	const/4 v3, 0x1
	const-string v4, "v1"
	aput-object v4, v2, v3
	const/4 v3, 0x2
	aput-object p0, v2, v3
	invoke-static {v1, v2}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
	move-result-object p0
	invoke-direct {v0, p0}, Ljava/net/URL;-><init>(Ljava/lang/String;)V
	return-object v0
.end method

.method public static b(Ljava/net/HttpURLConnection;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
	.locals 10

	return-void
.end method

.method public static d(Ljava/lang/String;)J
	.locals 2

	sget-object v0, Lf1/c;->d:Ljava/util/regex/Pattern;
	invoke-virtual {v0, p0}, 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
	invoke-virtual {p0}, Ljava/lang/String;->length()I
	move-result v0
	const/4 v0, 0x0
	invoke-virtual {p0}, Ljava/lang/String;->length()I
	move-result v1
	add-int/lit8 v1, v1, -0x1
	invoke-virtual {p0, v0, v1}, Ljava/lang/String;->substring(II)Ljava/lang/String;
	move-result-object p0
	invoke-static {p0}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J
	move-result-wide v0
	return-wide v0
.end method

.method public static e(Ljava/net/HttpURLConnection;)Lf1/a;
	.locals 10

	invoke-virtual {p0}, Ljava/net/URLConnection;->getInputStream()Ljava/io/InputStream;
	move-result-object p0
	new-instance v0, Landroid/util/JsonReader;
	new-instance v1, Ljava/io/InputStreamReader;
	sget-object v2, Lf1/c;->e:Ljava/nio/charset/Charset;
	invoke-direct {v1, p0, v2}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;Ljava/nio/charset/Charset;)V
	invoke-direct {v0, v1}, Landroid/util/JsonReader;-><init>(Ljava/io/Reader;)V
	const-wide/16 v1, 0x0
	invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
	move-result-object v1
	invoke-virtual {v0}, Landroid/util/JsonReader;->beginObject()V
	const/4 v2, 0x0
	move-object v3, v2
	move-object v4, v3
	move-object v5, v4
	move-object v6, v5
	move-object v7, v6
	:goto_0
	invoke-virtual {v0}, Landroid/util/JsonReader;->hasNext()Z
	move-result v8
	if-eqz v8, :cond_9
	invoke-virtual {v0}, Landroid/util/JsonReader;->nextName()Ljava/lang/String;
	move-result-object v8
	const-string v9, "name"
	invoke-virtual {v8, v9}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
	move-result v9
	if-eqz v9, :cond_0
	invoke-virtual {v0}, Landroid/util/JsonReader;->nextString()Ljava/lang/String;
	move-result-object v4
	goto :goto_0
	:cond_0
	const-string v9, "fid"
	invoke-virtual {v8, v9}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
	move-result v9
	if-eqz v9, :cond_1
	invoke-virtual {v0}, Landroid/util/JsonReader;->nextString()Ljava/lang/String;
	move-result-object v5
	goto :goto_0
	:cond_1
	const-string v9, "refreshToken"
	invoke-virtual {v8, v9}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
	move-result v9
	if-eqz v9, :cond_2
	invoke-virtual {v0}, Landroid/util/JsonReader;->nextString()Ljava/lang/String;
	move-result-object v6
	goto :goto_0
	:cond_2
	const-string v9, "authToken"
	invoke-virtual {v8, v9}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
	move-result v8
	invoke-virtual {v0}, Landroid/util/JsonReader;->beginObject()V
	:goto_1
	invoke-virtual {v0}, Landroid/util/JsonReader;->hasNext()Z
	move-result v7
	if-eqz v7, :cond_5
	invoke-virtual {v0}, Landroid/util/JsonReader;->nextName()Ljava/lang/String;
	move-result-object v7
	const-string v8, "token"
	invoke-virtual {v7, v8}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
	move-result v8
	if-eqz v8, :cond_3
	invoke-virtual {v0}, Landroid/util/JsonReader;->nextString()Ljava/lang/String;
	move-result-object v3
	goto :goto_1
	:cond_3
	const-string v8, "expiresIn"
	invoke-virtual {v7, v8}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
	move-result v7
	invoke-virtual {v0}, Landroid/util/JsonReader;->nextString()Ljava/lang/String;
	move-result-object v1
	invoke-static {v1}, Lf1/c;->d(Ljava/lang/String;)J
	move-result-wide v7
	invoke-static {v7, v8}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
	move-result-object v1
	goto :goto_1
	:cond_5
	const-string v7, ""
	:goto_2
	invoke-virtual {v7}, Ljava/lang/String;->isEmpty()Z
	move-result v8
	new-instance v7, Lf1/b;
	invoke-virtual {v1}, Ljava/lang/Long;->longValue()J
	move-result-wide v8
	invoke-direct {v7, v3, v8, v9, v2}, Lf1/b;-><init>(Ljava/lang/String;JLf1/f;)V
	invoke-virtual {v0}, Landroid/util/JsonReader;->endObject()V
	goto/16 :goto_0
	:cond_9
	invoke-virtual {v0}, Landroid/util/JsonReader;->endObject()V
	invoke-virtual {v0}, Landroid/util/JsonReader;->close()V
	invoke-virtual {p0}, Ljava/io/InputStream;->close()V
	sget-object v8, Lf1/d;->a:Lf1/d;
	new-instance p0, Lf1/a;
	move-object v3, p0
	invoke-direct/range {v3 .. v8}, Lf1/a;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lf1/b;Lf1/d;)V
	return-object p0
.end method

.method public static f(Ljava/net/HttpURLConnection;)Lf1/b;
	.locals 5

	const/4 v0, 0x0
	return-object v0
.end method

.method public static g(Ljava/net/HttpURLConnection;Ljava/lang/String;Ljava/lang/String;)V
	.locals 2

	new-instance v0, Lorg/json/JSONObject;
	invoke-direct {v0}, Lorg/json/JSONObject;-><init>()V
	const-string v1, "fid"
	invoke-virtual {v0, v1, p1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
	const-string p1, "appId"
	invoke-virtual {v0, p1, p2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
	const-string p1, "authVersion"
	const-string p2, "FIS_v2"
	invoke-virtual {v0, p1, p2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
	const-string p1, "sdkVersion"
	const-string p2, "a:17.1.0"
	invoke-virtual {v0, p1, p2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
	invoke-virtual {v0}, Lorg/json/JSONObject;->toString()Ljava/lang/String;
	move-result-object p1
	const-string p2, "UTF-8"
	invoke-virtual {p1, p2}, Ljava/lang/String;->getBytes(Ljava/lang/String;)[B
	move-result-object p1
	invoke-static {p0, p1}, Lf1/c;->i(Ljava/net/URLConnection;[B)V
	return-void
.end method

.method public static h(Ljava/net/HttpURLConnection;)V
	.locals 3

	return-void
.end method

.method public static i(Ljava/net/URLConnection;[B)V
	.locals 1

	invoke-virtual {p0}, Ljava/net/URLConnection;->getOutputStream()Ljava/io/OutputStream;
	move-result-object p0
	new-instance v0, Ljava/util/zip/GZIPOutputStream;
	invoke-direct {v0, p0}, Ljava/util/zip/GZIPOutputStream;-><init>(Ljava/io/OutputStream;)V
	invoke-virtual {v0, p1}, Ljava/io/OutputStream;->write([B)V
	:try_start_1
	invoke-virtual {v0}, Ljava/io/OutputStream;->close()V
	invoke-virtual {p0}, Ljava/io/OutputStream;->close()V
	:try_end_1
	.catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_0
	:catch_0
	return-void
.end method

.method public final c(Ljava/net/URL;Ljava/lang/String;)Ljava/net/HttpURLConnection;
	.locals 8

	invoke-virtual {p1}, Ljava/net/URL;->openConnection()Ljava/net/URLConnection;
	move-result-object p1
	check-cast p1, Ljava/net/HttpURLConnection;
	const/16 v0, 0x2710
	invoke-virtual {p1, v0}, Ljava/net/URLConnection;->setConnectTimeout(I)V
	const/4 v1, 0x0
	invoke-virtual {p1, v1}, Ljava/net/URLConnection;->setUseCaches(Z)V
	invoke-virtual {p1, v0}, Ljava/net/URLConnection;->setReadTimeout(I)V
	const-string v0, "application/json"
	const-string v2, "Content-Type"
	invoke-virtual {p1, v2, v0}, Ljava/net/URLConnection;->addRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
	const-string v2, "Accept"
	invoke-virtual {p1, v2, v0}, Ljava/net/URLConnection;->addRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
	const-string v0, "Content-Encoding"
	const-string v2, "gzip"
	invoke-virtual {p1, v0, v2}, Ljava/net/URLConnection;->addRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
	const-string v0, "Cache-Control"
	const-string v2, "no-cache"
	invoke-virtual {p1, v0, v2}, Ljava/net/URLConnection;->addRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
	iget-object v0, p0, Lf1/c;->a:Landroid/content/Context;
	invoke-virtual {v0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
	move-result-object v0
	const-string v2, "X-Android-Package"
	invoke-virtual {p1, v2, v0}, Ljava/net/URLConnection;->addRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
	iget-object v0, p0, Lf1/c;->b:Lb1/a;
	invoke-interface {v0}, Lb1/a;->get()Ljava/lang/Object;
	move-result-object v0
	check-cast v0, Lz0/f;
	const-string v2, "ContentValues"
	if-eqz v0, :cond_0
	const-string v3, "x-firebase-client"
	check-cast v0, Lz0/d;
	invoke-virtual {v0}, Lz0/d;->a()Lo0/o;
	move-result-object v0
	invoke-static {v0}, Lf0/a;->a(Lo0/o;)Ljava/lang/Object;
	move-result-object v0
	check-cast v0, Ljava/lang/String;
	invoke-virtual {p1, v3, v0}, Ljava/net/URLConnection;->addRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
	:cond_0
	const/4 v0, 0x0
	iget-object v3, p0, Lf1/c;->a:Landroid/content/Context;
	invoke-virtual {v3}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
	move-result-object v4
	invoke-static {v3}, Lf0/b;->a(Landroid/content/Context;)Lj1/c;
	move-result-object v3
	const/16 v5, 0x40
	iget-object v3, v3, Lj1/c;->a:Ljava/lang/Object;
	check-cast v3, Landroid/content/Context;
	invoke-virtual {v3}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
	move-result-object v3
	invoke-virtual {v3, v4, v5}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;
	move-result-object v3
	iget-object v4, v3, Landroid/content/pm/PackageInfo;->signatures:[Landroid/content/pm/Signature;
	array-length v4, v4
	const/4 v5, 0x1
	const-string v4, "SHA1"
	const/4 v5, 0x0
	:goto_2
	const/4 v6, 0x2
	invoke-static {v4}, Ljava/security/MessageDigest;->getInstance(Ljava/lang/String;)Ljava/security/MessageDigest;
	move-result-object v6
	iget-object v3, v3, Landroid/content/pm/PackageInfo;->signatures:[Landroid/content/pm/Signature;
	aget-object v3, v3, v1
	invoke-virtual {v3}, Landroid/content/pm/Signature;->toByteArray()[B
	move-result-object v3
	invoke-virtual {v6, v3}, Ljava/security/MessageDigest;->digest([B)[B
	move-result-object v3
	array-length v4, v3
	new-instance v5, Ljava/lang/StringBuilder;
	add-int v6, v4, v4
	invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(I)V
	:goto_5
	if-ge v1, v4, :cond_6
	sget-object v6, Lf0/a;->c:[C
	aget-byte v7, v3, v1
	and-int/lit16 v7, v7, 0xf0
	ushr-int/lit8 v7, v7, 0x4
	aget-char v7, v6, v7
	invoke-virtual {v5, v7}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
	aget-byte v7, v3, v1
	and-int/lit8 v7, v7, 0xf
	aget-char v6, v6, v7
	invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
	add-int/lit8 v1, v1, 0x1
	goto :goto_5
	:cond_6
	invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
	move-result-object v0
	const-string v1, "X-Android-Cert"
	invoke-virtual {p1, v1, v0}, Ljava/net/URLConnection;->addRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
	const-string v0, "x-goog-api-key"
	invoke-virtual {p1, v0, p2}, Ljava/net/URLConnection;->addRequestProperty(Ljava/lang/String;Ljava/lang/String;)V
	return-object p1
.end method