granularity level: instruction

		.class public Lcom/google/android/gms/common/api/GoogleApiActivity;
.super Landroid/app/Activity;
.source "com.google.android.gms:play-services-base@@18.0.1"
.implements Landroid/content/DialogInterface$OnCancelListener;


.field protected zaa:I


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

	invoke-direct {p0}, Landroid/app/Activity;-><init>()V
	const/4 v0, 0x0
	iput v0, p0, Lcom/google/android/gms/common/api/GoogleApiActivity;->zaa:I
	return-void
.end method

.method public static zaa(Landroid/content/Context;Landroid/app/PendingIntent;IZ)Landroid/content/Intent;
	.locals 2

	new-instance v0, Landroid/content/Intent;
	const-class v1, Lcom/google/android/gms/common/api/GoogleApiActivity;
	invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V
	const-string p0, "pending_intent"
	invoke-virtual {v0, p0, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
	const-string p0, "failing_client_id"
	invoke-virtual {v0, p0, p2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;
	const-string p0, "notify_manager"
	invoke-virtual {v0, p0, p3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;
	return-object v0
.end method

.method private final zab()V
	.locals 12

	invoke-virtual {p0}, Lcom/google/android/gms/common/api/GoogleApiActivity;->getIntent()Landroid/content/Intent;
	move-result-object v0
	invoke-virtual {v0}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;
	move-result-object v0
	const-string v1, "GoogleApiActivity"
	if-nez v0, :cond_0
	const-string v0, "Activity started without extras"
	invoke-static {v1, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
	invoke-virtual {p0}, Lcom/google/android/gms/common/api/GoogleApiActivity;->finish()V
	return-void
	:cond_0
	const-string v2, "pending_intent"
	invoke-virtual {v0, v2}, Landroid/os/Bundle;->get(Ljava/lang/String;)Ljava/lang/Object;
	move-result-object v2
	check-cast v2, Landroid/app/PendingIntent;
	const-string v3, "error_code"
	invoke-virtual {v0, v3}, Landroid/os/Bundle;->get(Ljava/lang/String;)Ljava/lang/Object;
	move-result-object v3
	check-cast v3, Ljava/lang/Integer;
	if-nez v2, :cond_2
	if-eqz v3, :cond_1
	goto :goto_0
	:cond_1
	const-string v0, "Activity started without resolution"
	invoke-static {v1, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
	invoke-virtual {p0}, Lcom/google/android/gms/common/api/GoogleApiActivity;->finish()V
	return-void
	:goto_0
	:cond_2
	const/4 v4, 0x1
	if-eqz v2, :cond_5
	:try_start_0
	invoke-virtual {v2}, Landroid/app/PendingIntent;->getIntentSender()Landroid/content/IntentSender;
	move-result-object v6
	const/4 v7, 0x1
	const/4 v8, 0x0
	const/4 v9, 0x0
	const/4 v10, 0x0
	const/4 v11, 0x0
	move-object v5, p0
	invoke-virtual/range {v5 .. v11}, Lcom/google/android/gms/common/api/GoogleApiActivity;->startIntentSenderForResult(Landroid/content/IntentSender;ILandroid/content/Intent;III)V
	iput v4, p0, Lcom/google/android/gms/common/api/GoogleApiActivity;->zaa:I
	:try_end_0
	.catch Landroid/content/ActivityNotFoundException; {:try_start_0 .. :try_end_0} :catch_1
	.catch Landroid/content/IntentSender$SendIntentException; {:try_start_0 .. :try_end_0} :catch_0
	return-void
	:catch_0
	move-exception v0
	const-string v2, "Failed to launch pendingIntent"
	invoke-static {v1, v2, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
	invoke-virtual {p0}, Lcom/google/android/gms/common/api/GoogleApiActivity;->finish()V
	return-void
	:catch_1
	move-exception v3
	const-string v5, "notify_manager"
	invoke-virtual {v0, v5, v4}, Landroid/os/Bundle;->getBoolean(Ljava/lang/String;Z)Z
	move-result v0
	if-eqz v0, :cond_3
	invoke-static {p0}, Lcom/google/android/gms/common/api/internal/GoogleApiManager;->zam(Landroid/content/Context;)Lcom/google/android/gms/common/api/internal/GoogleApiManager;
	move-result-object v0
	new-instance v1, Lcom/google/android/gms/common/ConnectionResult;
	const/16 v2, 0x16
	const/4 v3, 0x0
	invoke-direct {v1, v2, v3}, Lcom/google/android/gms/common/ConnectionResult;-><init>(ILandroid/app/PendingIntent;)V
	invoke-virtual {p0}, Lcom/google/android/gms/common/api/GoogleApiActivity;->getIntent()Landroid/content/Intent;
	move-result-object v2
	const/4 v3, -0x1
	const-string v5, "failing_client_id"
	invoke-virtual {v2, v5, v3}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I
	move-result v2
	invoke-virtual {v0, v1, v2}, Lcom/google/android/gms/common/api/internal/GoogleApiManager;->zaz(Lcom/google/android/gms/common/ConnectionResult;I)V
	goto :goto_1
	:cond_3
	invoke-virtual {v2}, Ljava/lang/Object;->toString()Ljava/lang/String;
	move-result-object v0
	new-instance v2, Ljava/lang/StringBuilder;
	invoke-virtual {v0}, Ljava/lang/String;->length()I
	move-result v5
	add-int/lit8 v5, v5, 0x24
	invoke-direct {v2, v5}, Ljava/lang/StringBuilder;-><init>(I)V
	const-string v5, "Activity not found while launching "
	invoke-virtual {v2, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
	invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
	const-string v0, "."
	invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
	invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
	move-result-object v0
	sget-object v2, Landroid/os/Build;->FINGERPRINT:Ljava/lang/String;
	const-string v5, "generic"
	invoke-virtual {v2, v5}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
	move-result v2
	if-eqz v2, :cond_4
	const-string v2, " This may occur when resolving Google Play services connection issues on emulators with Google APIs but not Google Play Store."
	invoke-virtual {v0, v2}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
	move-result-object v0
	:cond_4
	invoke-static {v1, v0, v3}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
	:goto_1
	iput v4, p0, Lcom/google/android/gms/common/api/GoogleApiActivity;->zaa:I
	invoke-virtual {p0}, Lcom/google/android/gms/common/api/GoogleApiActivity;->finish()V
	return-void
	:cond_5
	invoke-static {v3}, Lcom/google/android/gms/common/internal/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
	move-result-object v0
	check-cast v0, Ljava/lang/Integer;
	invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
	move-result v0
	invoke-static {}, Lcom/google/android/gms/common/GoogleApiAvailability;->getInstance()Lcom/google/android/gms/common/GoogleApiAvailability;
	move-result-object v1
	const/4 v2, 0x2
	invoke-virtual {v1, p0, v0, v2, p0}, Lcom/google/android/gms/common/GoogleApiAvailability;->showErrorDialogFragment(Landroid/app/Activity;IILandroid/content/DialogInterface$OnCancelListener;)Z
	iput v4, p0, Lcom/google/android/gms/common/api/GoogleApiActivity;->zaa:I
	return-void
.end method

.method protected final onActivityResult(IILandroid/content/Intent;)V
	.locals 3

	invoke-super {p0, p1, p2, p3}, Landroid/app/Activity;->onActivityResult(IILandroid/content/Intent;)V
	const/4 v0, 0x0
	const/4 v1, 0x1
	if-ne p1, v1, :cond_2
	invoke-virtual {p0}, Lcom/google/android/gms/common/api/GoogleApiActivity;->getIntent()Landroid/content/Intent;
	move-result-object p1
	const-string v2, "notify_manager"
	invoke-virtual {p1, v2, v1}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
	move-result p1
	iput v0, p0, Lcom/google/android/gms/common/api/GoogleApiActivity;->zaa:I
	invoke-virtual {p0, p2, p3}, Lcom/google/android/gms/common/api/GoogleApiActivity;->setResult(ILandroid/content/Intent;)V
	if-eqz p1, :cond_3
	invoke-static {p0}, Lcom/google/android/gms/common/api/internal/GoogleApiManager;->zam(Landroid/content/Context;)Lcom/google/android/gms/common/api/internal/GoogleApiManager;
	move-result-object p1
	const/4 p3, -0x1
	if-eq p2, p3, :cond_1
	if-eqz p2, :cond_0
	goto :goto_0
	:cond_0
	new-instance p2, Lcom/google/android/gms/common/ConnectionResult;
	const/16 v0, 0xd
	const/4 v1, 0x0
	invoke-direct {p2, v0, v1}, Lcom/google/android/gms/common/ConnectionResult;-><init>(ILandroid/app/PendingIntent;)V
	invoke-virtual {p0}, Lcom/google/android/gms/common/api/GoogleApiActivity;->getIntent()Landroid/content/Intent;
	move-result-object v0
	const-string v1, "failing_client_id"
	invoke-virtual {v0, v1, p3}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I
	move-result p3
	invoke-virtual {p1, p2, p3}, Lcom/google/android/gms/common/api/internal/GoogleApiManager;->zaz(Lcom/google/android/gms/common/ConnectionResult;I)V
	goto :goto_0
	:cond_1
	invoke-virtual {p1}, Lcom/google/android/gms/common/api/internal/GoogleApiManager;->zaA()V
	goto :goto_0
	:cond_2
	const/4 v1, 0x2
	if-ne p1, v1, :cond_3
	iput v0, p0, Lcom/google/android/gms/common/api/GoogleApiActivity;->zaa:I
	invoke-virtual {p0, p2, p3}, Lcom/google/android/gms/common/api/GoogleApiActivity;->setResult(ILandroid/content/Intent;)V
	:cond_3
	:goto_0
	invoke-virtual {p0}, Lcom/google/android/gms/common/api/GoogleApiActivity;->finish()V
	return-void
.end method

.method public final onCancel(Landroid/content/DialogInterface;)V
	.locals 0

	const/4 p1, 0x0
	iput p1, p0, Lcom/google/android/gms/common/api/GoogleApiActivity;->zaa:I
	invoke-virtual {p0, p1}, Lcom/google/android/gms/common/api/GoogleApiActivity;->setResult(I)V
	invoke-virtual {p0}, Lcom/google/android/gms/common/api/GoogleApiActivity;->finish()V
	return-void
.end method

.method protected final onCreate(Landroid/os/Bundle;)V
	.locals 1

	invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V
	if-eqz p1, :cond_0
	const-string v0, "resolution"
	invoke-virtual {p1, v0}, Landroid/os/Bundle;->getInt(Ljava/lang/String;)I
	move-result p1
	iput p1, p0, Lcom/google/android/gms/common/api/GoogleApiActivity;->zaa:I
	:cond_0
	iget p1, p0, Lcom/google/android/gms/common/api/GoogleApiActivity;->zaa:I
	const/4 v0, 0x1
	if-eq p1, v0, :cond_1
	invoke-direct {p0}, Lcom/google/android/gms/common/api/GoogleApiActivity;->zab()V
	:cond_1
	return-void
.end method

.method protected final onSaveInstanceState(Landroid/os/Bundle;)V
	.locals 2

	iget v0, p0, Lcom/google/android/gms/common/api/GoogleApiActivity;->zaa:I
	const-string v1, "resolution"
	invoke-virtual {p1, v1, v0}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V
	invoke-super {p0, p1}, Landroid/app/Activity;->onSaveInstanceState(Landroid/os/Bundle;)V
	return-void
.end method