granularity level: instruction

		.class public final Le1/b;
.super Ljava/lang/Object;
.source "SourceFile"


.field public static final c:[Ljava/lang/String;
.field public final a:Landroid/content/SharedPreferences;
.field public final b:Ljava/lang/String;


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

	const-string v0, "*"
	const-string v1, "FCM"
	const-string v2, "GCM"
	const-string v3, ""
	filled-new-array {v0, v1, v2, v3}, [Ljava/lang/String;
	move-result-object v0
	sput-object v0, Le1/b;->c:[Ljava/lang/String;
	return-void
.end method

.method public constructor <init>(Lp0/g;)V
	.locals 3

	invoke-direct {p0}, Ljava/lang/Object;-><init>()V
	invoke-virtual {p1}, Lp0/g;->a()V
	iget-object v0, p1, Lp0/g;->a:Landroid/content/Context;
	const/4 v1, 0x0
	const-string v2, "com.google.android.gms.appid"
	invoke-virtual {v0, v2, v1}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
	move-result-object v0
	iput-object v0, p0, Le1/b;->a:Landroid/content/SharedPreferences;
	invoke-virtual {p1}, Lp0/g;->a()V
	iget-object v0, p1, Lp0/g;->c:Lp0/h;
	iget-object v0, v0, Lp0/h;->e:Ljava/lang/String;
	if-eqz v0, :cond_0
	goto :goto_1
	:cond_0
	invoke-virtual {p1}, Lp0/g;->a()V
	iget-object p1, p1, Lp0/g;->c:Lp0/h;
	iget-object v0, p1, Lp0/h;->b:Ljava/lang/String;
	const-string p1, "1:"
	invoke-virtual {v0, p1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
	move-result p1
	if-nez p1, :cond_1
	const-string p1, "2:"
	invoke-virtual {v0, p1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
	move-result p1
	if-nez p1, :cond_1
	goto :goto_1
	:cond_1
	const-string p1, ":"
	invoke-virtual {v0, p1}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;
	move-result-object p1
	array-length v0, p1
	const/4 v1, 0x4
	const/4 v2, 0x0
	if-eq v0, v1, :cond_2
	:goto_0
	move-object v0, v2
	goto :goto_1
	:cond_2
	const/4 v0, 0x1
	aget-object v0, p1, v0
	invoke-virtual {v0}, Ljava/lang/String;->isEmpty()Z
	move-result p1
	if-eqz p1, :cond_3
	goto :goto_0
	:goto_1
	:cond_3
	iput-object v0, p0, Le1/b;->b:Ljava/lang/String;
	return-void
.end method

.method public final a()Ljava/lang/String;
	.locals 6

	iget-object v0, p0, Le1/b;->a:Landroid/content/SharedPreferences;
	monitor-enter v0
	:try_start_0
	iget-object v1, p0, Le1/b;->a:Landroid/content/SharedPreferences;
	const-string v2, "|S||P|"
	const/4 v3, 0x0
	invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
	move-result-object v1
	if-nez v1, :cond_0
	monitor-exit v0
	:try_end_0
	.catchall {:try_start_0 .. :try_end_0} :catchall_0
	return-object v3
	:cond_0
	const/16 v2, 0x8
	:try_start_1
	invoke-static {v1, v2}, Landroid/util/Base64;->decode(Ljava/lang/String;I)[B
	move-result-object v1
	const-string v4, "RSA"
	invoke-static {v4}, Ljava/security/KeyFactory;->getInstance(Ljava/lang/String;)Ljava/security/KeyFactory;
	move-result-object v4
	new-instance v5, Ljava/security/spec/X509EncodedKeySpec;
	invoke-direct {v5, v1}, Ljava/security/spec/X509EncodedKeySpec;-><init>([B)V
	invoke-virtual {v4, v5}, Ljava/security/KeyFactory;->generatePublic(Ljava/security/spec/KeySpec;)Ljava/security/PublicKey;
	move-result-object v1
	:try_end_1
	.catch Ljava/lang/IllegalArgumentException; {:try_start_1 .. :try_end_1} :catch_2
	.catch Ljava/security/spec/InvalidKeySpecException; {:try_start_1 .. :try_end_1} :catch_1
	.catch Ljava/security/NoSuchAlgorithmException; {:try_start_1 .. :try_end_1} :catch_0
	.catchall {:try_start_1 .. :try_end_1} :catchall_0
	goto :goto_1
	:catch_0
	move-exception v1
	goto :goto_0
	:catch_1
	move-exception v1
	goto :goto_0
	:catch_2
	move-exception v1
	:goto_0
	:try_start_2
	new-instance v4, Ljava/lang/StringBuilder;
	invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
	const-string v5, "Invalid key stored "
	invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
	invoke-virtual {v4, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
	invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
	move-result-object v1
	const-string v4, "ContentValues"
	invoke-static {v4, v1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
	move-object v1, v3
	:goto_1
	if-nez v1, :cond_1
	monitor-exit v0
	return-object v3
	:cond_1
	invoke-interface {v1}, Ljava/security/Key;->getEncoded()[B
	move-result-object v1
	:try_end_2
	.catchall {:try_start_2 .. :try_end_2} :catchall_0
	:try_start_3
	const-string v4, "SHA1"
	invoke-static {v4}, Ljava/security/MessageDigest;->getInstance(Ljava/lang/String;)Ljava/security/MessageDigest;
	move-result-object v4
	invoke-virtual {v4, v1}, Ljava/security/MessageDigest;->digest([B)[B
	move-result-object v1
	const/4 v4, 0x0
	aget-byte v5, v1, v4
	and-int/lit8 v5, v5, 0xf
	add-int/lit8 v5, v5, 0x70
	and-int/lit16 v5, v5, 0xff
	int-to-byte v5, v5
	aput-byte v5, v1, v4
	const/16 v5, 0xb
	invoke-static {v1, v4, v2, v5}, Landroid/util/Base64;->encodeToString([BIII)Ljava/lang/String;
	move-result-object v3
	:try_end_3
	.catch Ljava/security/NoSuchAlgorithmException; {:try_start_3 .. :try_end_3} :catch_3
	.catchall {:try_start_3 .. :try_end_3} :catchall_0
	goto :goto_2
	:try_start_4
	:catch_3
	const-string v1, "ContentValues"
	const-string v2, "Unexpected error, device missing required algorithms"
	invoke-static {v1, v2}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
	:goto_2
	monitor-exit v0
	return-object v3
	:catchall_0
	move-exception v1
	monitor-exit v0
	:try_end_4
	.catchall {:try_start_4 .. :try_end_4} :catchall_0
	throw v1
.end method