granularity level: instruction

		.class public abstract Lx/e;
.super Ljava/lang/Object;
.source "SourceFile"


.field public static final a:I


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

	sget-object v0, Lx/g;->a:Ljava/util/concurrent/atomic/AtomicBoolean;
	const v0, 0xbdfcb8
	sput v0, Lx/e;->a:I
	return-void
.end method

.method public constructor <init>()V
	.locals 0

	invoke-direct {p0}, Ljava/lang/Object;-><init>()V
	return-void
.end method

.method public a(ILandroid/content/Context;Ljava/lang/String;)Landroid/content/Intent;
	.locals 3

	const/4 v0, 0x1
	const-string v1, "com.google.android.gms"
	if-eq p1, v0, :cond_1
	const/4 v0, 0x2
	if-eq p1, v0, :cond_1
	const/4 p2, 0x3
	const/4 p3, 0x0
	if-eq p1, p2, :cond_0
	return-object p3
	:cond_0
	sget p1, La0/h0;->a:I
	const-string p1, "package"
	invoke-static {p1, v1, p3}, Landroid/net/Uri;->fromParts(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Landroid/net/Uri;
	move-result-object p1
	new-instance p2, Landroid/content/Intent;
	const-string p3, "android.settings.APPLICATION_DETAILS_SETTINGS"
	invoke-direct {p2, p3}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
	invoke-virtual {p2, p1}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;
	return-object p2
	:cond_1
	if-eqz p2, :cond_3
	invoke-static {p2}, Lp0/a;->w(Landroid/content/Context;)Z
	move-result p1
	if-nez p1, :cond_2
	goto :goto_0
	:cond_2
	sget p1, La0/h0;->a:I
	new-instance p1, Landroid/content/Intent;
	const-string p2, "com.google.android.clockwork.home.UPDATE_ANDROID_WEAR_ACTION"
	invoke-direct {p1, p2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
	const-string p2, "com.google.android.wearable.app"
	invoke-virtual {p1, p2}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;
	return-object p1
	:goto_0
	:cond_3
	const-string p1, "gcore_"
	invoke-static {p1}, Lc0/b;->b(Ljava/lang/String;)Ljava/lang/StringBuilder;
	move-result-object p1
	sget v0, Lx/e;->a:I
	invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
	const-string v0, "-"
	invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
	invoke-static {p3}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
	move-result v2
	if-nez v2, :cond_4
	invoke-virtual {p1, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
	:cond_4
	invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
	if-eqz p2, :cond_5
	invoke-virtual {p2}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
	move-result-object p3
	invoke-virtual {p1, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
	:cond_5
	invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
	if-eqz p2, :cond_6
	:try_start_0
	invoke-static {p2}, Lf0/b;->a(Landroid/content/Context;)Lj1/c;
	move-result-object p3
	invoke-virtual {p2}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
	move-result-object p2
	const/4 v0, 0x0
	iget-object p3, p3, Lj1/c;->a:Ljava/lang/Object;
	check-cast p3, Landroid/content/Context;
	invoke-virtual {p3}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
	move-result-object p3
	invoke-virtual {p3, p2, v0}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;
	move-result-object p2
	iget p2, p2, Landroid/content/pm/PackageInfo;->versionCode:I
	invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
	:try_end_0
	.catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
	goto :goto_1
	:catch_0
	nop
	:goto_1
	:cond_6
	invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
	move-result-object p1
	sget p2, La0/h0;->a:I
	new-instance p2, Landroid/content/Intent;
	const-string p3, "android.intent.action.VIEW"
	invoke-direct {p2, p3}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
	const-string p3, "market://details"
	invoke-static {p3}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
	move-result-object p3
	invoke-virtual {p3}, Landroid/net/Uri;->buildUpon()Landroid/net/Uri$Builder;
	move-result-object p3
	const-string v0, "id"
	invoke-virtual {p3, v0, v1}, Landroid/net/Uri$Builder;->appendQueryParameter(Ljava/lang/String;Ljava/lang/String;)Landroid/net/Uri$Builder;
	move-result-object p3
	invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
	move-result v0
	if-nez v0, :cond_7
	const-string v0, "pcampaignid"
	invoke-virtual {p3, v0, p1}, Landroid/net/Uri$Builder;->appendQueryParameter(Ljava/lang/String;Ljava/lang/String;)Landroid/net/Uri$Builder;
	:cond_7
	invoke-virtual {p3}, Landroid/net/Uri$Builder;->build()Landroid/net/Uri;
	move-result-object p1
	invoke-virtual {p2, p1}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;
	const-string p1, "com.android.vending"
	invoke-virtual {p2, p1}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;
	const/high16 p1, 0x80000
	invoke-virtual {p2, p1}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;
	return-object p2
.end method

.method public b(Landroid/content/Context;I)I
	.locals 11

	sget-object v0, Lx/g;->a:Ljava/util/concurrent/atomic/AtomicBoolean;
	:try_start_0
	invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
	move-result-object v0
	const v1, 0x7f090008
	invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
	:try_end_0
	.catchall {:try_start_0 .. :try_end_0} :catchall_0
	goto :goto_0
	:catchall_0
	const-string v0, "GooglePlayServicesUtil"
	const-string v1, "The Google Play services resources were not found. Check your project configuration to ensure that the resources are included."
	invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
	:goto_0
	const-string v0, "com.google.android.gms"
	invoke-virtual {p1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
	move-result-object v1
	invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
	move-result v0
	const/4 v1, 0x1
	if-nez v0, :cond_5
	sget-object v0, Lx/g;->b:Ljava/util/concurrent/atomic/AtomicBoolean;
	invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicBoolean;->get()Z
	move-result v0
	if-eqz v0, :cond_0
	goto :goto_3
	:cond_0
	sget-object v0, La0/v;->a:Ljava/lang/Object;
	monitor-enter v0
	:try_start_1
	sget-boolean v2, La0/v;->b:Z
	if-eqz v2, :cond_1
	goto :goto_1
	:cond_1
	sput-boolean v1, La0/v;->b:Z
	invoke-virtual {p1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
	move-result-object v2
	invoke-static {p1}, Lf0/b;->a(Landroid/content/Context;)Lj1/c;
	move-result-object v3
	:try_end_1
	.catchall {:try_start_1 .. :try_end_1} :catchall_1
	const/16 v4, 0x80
	:try_start_2
	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, v2, v4}, Landroid/content/pm/PackageManager;->getApplicationInfo(Ljava/lang/String;I)Landroid/content/pm/ApplicationInfo;
	move-result-object v2
	iget-object v2, v2, Landroid/content/pm/ApplicationInfo;->metaData:Landroid/os/Bundle;
	if-nez v2, :cond_2
	goto :goto_1
	:cond_2
	const-string v3, "com.google.app.id"
	invoke-virtual {v2, v3}, Landroid/os/BaseBundle;->getString(Ljava/lang/String;)Ljava/lang/String;
	const-string v3, "com.google.android.gms.version"
	invoke-virtual {v2, v3}, Landroid/os/BaseBundle;->getInt(Ljava/lang/String;)I
	move-result v2
	sput v2, La0/v;->c:I
	:try_end_2
	.catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_2 .. :try_end_2} :catch_0
	.catchall {:try_start_2 .. :try_end_2} :catchall_1
	goto :goto_1
	:catchall_1
	move-exception p1
	goto :goto_2
	:catch_0
	move-exception v2
	:try_start_3
	const-string v3, "MetadataValueReader"
	const-string v4, "This should never happen."
	invoke-static {v3, v4, v2}, Landroid/util/Log;->wtf(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
	:goto_1
	monitor-exit v0
	:try_end_3
	.catchall {:try_start_3 .. :try_end_3} :catchall_1
	sget v0, La0/v;->c:I
	if-eqz v0, :cond_4
	const v2, 0xbdfcb8
	if-ne v0, v2, :cond_3
	goto :goto_3
	:cond_3
	new-instance p1, Lcom/google/android/gms/common/GooglePlayServicesIncorrectManifestValueException;
	invoke-direct {p1, v0}, Lcom/google/android/gms/common/GooglePlayServicesIncorrectManifestValueException;-><init>(I)V
	throw p1
	:cond_4
	new-instance p1, Lcom/google/android/gms/common/GooglePlayServicesMissingManifestValueException;
	invoke-direct {p1}, Lcom/google/android/gms/common/GooglePlayServicesMissingManifestValueException;-><init>()V
	throw p1
	:try_start_4
	:goto_2
	monitor-exit v0
	:try_end_4
	.catchall {:try_start_4 .. :try_end_4} :catchall_1
	throw p1
	:goto_3
	:cond_5
	invoke-static {p1}, Lp0/a;->w(Landroid/content/Context;)Z
	move-result v0
	const/4 v2, 0x0
	if-nez v0, :cond_9
	sget-object v0, Lp0/a;->c:Ljava/lang/Boolean;
	if-nez v0, :cond_8
	invoke-virtual {p1}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
	move-result-object v0
	const-string v3, "android.hardware.type.iot"
	invoke-virtual {v0, v3}, Landroid/content/pm/PackageManager;->hasSystemFeature(Ljava/lang/String;)Z
	move-result v0
	if-nez v0, :cond_7
	invoke-virtual {p1}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
	move-result-object v0
	const-string v3, "android.hardware.type.embedded"
	invoke-virtual {v0, v3}, Landroid/content/pm/PackageManager;->hasSystemFeature(Ljava/lang/String;)Z
	move-result v0
	if-eqz v0, :cond_6
	goto :goto_4
	:cond_6
	const/4 v0, 0x0
	goto :goto_5
	:goto_4
	:cond_7
	const/4 v0, 0x1
	:goto_5
	invoke-static {v0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
	move-result-object v0
	sput-object v0, Lp0/a;->c:Ljava/lang/Boolean;
	:cond_8
	sget-object v0, Lp0/a;->c:Ljava/lang/Boolean;
	invoke-virtual {v0}, Ljava/lang/Boolean;->booleanValue()Z
	move-result v0
	if-nez v0, :cond_9
	const/4 v0, 0x1
	goto :goto_6
	:cond_9
	const/4 v0, 0x0
	:goto_6
	if-ltz p2, :cond_a
	const/4 v3, 0x1
	goto :goto_7
	:cond_a
	const/4 v3, 0x0
	:goto_7
	if-eqz v3, :cond_19
	invoke-virtual {p1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
	move-result-object v3
	invoke-virtual {p1}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
	move-result-object v4
	if-eqz v0, :cond_b
	:try_start_5
	const-string v5, "com.android.vending"
	const/16 v6, 0x2040
	invoke-virtual {v4, v5, v6}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;
	move-result-object v5
	:try_end_5
	.catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_5 .. :try_end_5} :catch_1
	goto :goto_8
	:catch_1
	const-string p2, "GooglePlayServicesUtil"
	invoke-static {v3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
	move-result-object v0
	const-string v3, " requires the Google Play Store, but it is missing."
	goto/16 :goto_b
	:cond_b
	const/4 v5, 0x0
	:try_start_6
	:goto_8
	const-string v6, "com.google.android.gms"
	const/16 v7, 0x40
	invoke-virtual {v4, v6, v7}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;
	move-result-object v6
	:try_end_6
	.catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_6 .. :try_end_6} :catch_3
	const-class v7, Lx/h;
	monitor-enter v7
	:try_start_7
	sget-object v8, Lx/h;->a:Lx/h;
	if-nez v8, :cond_d
	sget-object v8, Lx/o;->a:Lx/j;
	const-class v8, Lx/o;
	monitor-enter v8
	:try_end_7
	.catchall {:try_start_7 .. :try_end_7} :catchall_3
	:try_start_8
	sget-object v9, Lx/o;->c:Landroid/content/Context;
	if-nez v9, :cond_c
	invoke-virtual {p1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
	move-result-object v9
	sput-object v9, Lx/o;->c:Landroid/content/Context;
	goto :goto_9
	:cond_c
	const-string v9, "GoogleCertificates"
	const-string v10, "GoogleCertificates has been initialized already"
	invoke-static {v9, v10}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
	:try_end_8
	.catchall {:try_start_8 .. :try_end_8} :catchall_2
	:goto_9
	:try_start_9
	monitor-exit v8
	new-instance v8, Lx/h;
	invoke-direct {v8, p1}, Lx/h;-><init>(Landroid/content/Context;)V
	sput-object v8, Lx/h;->a:Lx/h;
	goto :goto_a
	:catchall_2
	move-exception p1
	monitor-exit v8
	throw p1
	:cond_d
	:goto_a
	monitor-exit v7
	:try_end_9
	.catchall {:try_start_9 .. :try_end_9} :catchall_3
	invoke-static {v6}, Lx/h;->c(Landroid/content/pm/PackageInfo;)Z
	move-result v7
	if-nez v7, :cond_e
	const-string p2, "GooglePlayServicesUtil"
	invoke-static {v3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
	move-result-object v0
	const-string v3, " requires Google Play services, but their signature is invalid."
	goto :goto_b
	:cond_e
	if-eqz v0, :cond_f
	invoke-static {v5}, Lp0/a;->j(Ljava/lang/Object;)V
	invoke-static {v5}, Lx/h;->c(Landroid/content/pm/PackageInfo;)Z
	move-result v7
	if-nez v7, :cond_f
	const-string p2, "GooglePlayServicesUtil"
	invoke-static {v3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
	move-result-object v0
	const-string v3, " requires Google Play Store, but its signature is invalid."
	goto :goto_b
	:cond_f
	if-eqz v0, :cond_10
	if-eqz v5, :cond_10
	iget-object v0, v5, Landroid/content/pm/PackageInfo;->signatures:[Landroid/content/pm/Signature;
	aget-object v0, v0, v2
	iget-object v5, v6, Landroid/content/pm/PackageInfo;->signatures:[Landroid/content/pm/Signature;
	aget-object v5, v5, v2
	invoke-virtual {v0, v5}, Landroid/content/pm/Signature;->equals(Ljava/lang/Object;)Z
	move-result v0
	if-nez v0, :cond_10
	const-string p2, "GooglePlayServicesUtil"
	invoke-static {v3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
	move-result-object v0
	const-string v3, " requires Google Play Store, but its signature doesn\'t match that of Google Play services."
	:goto_b
	invoke-virtual {v0, v3}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
	move-result-object v0
	invoke-static {p2, v0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
	const/16 p2, 0x9
	goto/16 :goto_10
	:cond_10
	iget v0, v6, Landroid/content/pm/PackageInfo;->versionCode:I
	const/4 v5, -0x1
	if-ne v0, v5, :cond_11
	const/4 v7, -0x1
	goto :goto_c
	:cond_11
	div-int/lit16 v7, v0, 0x3e8
	:goto_c
	if-ne p2, v5, :cond_12
	goto :goto_d
	:cond_12
	div-int/lit16 v5, p2, 0x3e8
	:goto_d
	if-ge v7, v5, :cond_13
	new-instance v4, Ljava/lang/StringBuilder;
	invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
	const-string v5, "Google Play services out of date for "
	invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
	invoke-virtual {v4, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
	const-string v3, ".  Requires "
	invoke-virtual {v4, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
	invoke-virtual {v4, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
	const-string p2, " but found "
	invoke-virtual {v4, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
	invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
	const-string p2, "GooglePlayServicesUtil"
	invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
	move-result-object v0
	invoke-static {p2, v0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
	const/4 p2, 0x2
	goto :goto_10
	:cond_13
	iget-object p2, v6, Landroid/content/pm/PackageInfo;->applicationInfo:Landroid/content/pm/ApplicationInfo;
	if-nez p2, :cond_14
	:try_start_a
	const-string p2, "com.google.android.gms"
	invoke-virtual {v4, p2, v2}, Landroid/content/pm/PackageManager;->getApplicationInfo(Ljava/lang/String;I)Landroid/content/pm/ApplicationInfo;
	move-result-object p2
	:try_end_a
	.catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_a .. :try_end_a} :catch_2
	goto :goto_e
	:catch_2
	move-exception p2
	const-string v0, "GooglePlayServicesUtil"
	invoke-static {v3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
	move-result-object v3
	const-string v4, " requires Google Play services, but they\'re missing when getting application info."
	invoke-virtual {v3, v4}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
	move-result-object v3
	invoke-static {v0, v3, p2}, Landroid/util/Log;->wtf(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
	goto :goto_f
	:cond_14
	:goto_e
	iget-boolean p2, p2, Landroid/content/pm/ApplicationInfo;->enabled:Z
	if-nez p2, :cond_15
	const/4 p2, 0x3
	goto :goto_10
	:cond_15
	const/4 p2, 0x0
	goto :goto_10
	:catchall_3
	move-exception p1
	:try_start_b
	monitor-exit v7
	:try_end_b
	.catchall {:try_start_b .. :try_end_b} :catchall_3
	throw p1
	:catch_3
	const-string p2, "GooglePlayServicesUtil"
	invoke-static {v3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
	move-result-object v0
	const-string v3, " requires Google Play services, but they are missing."
	invoke-virtual {v0, v3}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
	move-result-object v0
	invoke-static {p2, v0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
	:goto_f
	const/4 p2, 0x1
	:goto_10
	const/16 v0, 0x12
	if-ne p2, v0, :cond_16
	goto :goto_11
	:cond_16
	if-ne p2, v1, :cond_17
	invoke-static {p1}, Lx/g;->a(Landroid/content/Context;)Z
	move-result v1
	goto :goto_11
	:cond_17
	const/4 v1, 0x0
	:goto_11
	if-eqz v1, :cond_18
	return v0
	:cond_18
	return p2
	:cond_19
	new-instance p1, Ljava/lang/IllegalArgumentException;
	invoke-direct {p1}, Ljava/lang/IllegalArgumentException;-><init>()V
	throw p1
.end method