480 lines
12 KiB
Smali
480 lines
12 KiB
Smali
.class public Lcom/google/android/gms/common/api/GoogleApiActivity;
|
|
.super Landroid/app/Activity;
|
|
.source "com.google.android.gms:play-services-base@@18.0.1"
|
|
|
|
# interfaces
|
|
.implements Landroid/content/DialogInterface$OnCancelListener;
|
|
|
|
|
|
# annotations
|
|
.annotation build Lcom/google/android/gms/common/annotation/KeepName;
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public zaa:I
|
|
.annotation build Lcom/google/android/gms/common/util/VisibleForTesting;
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 1
|
|
|
|
.line 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
|
|
.param p0 # Landroid/content/Context;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p1 # Landroid/app/PendingIntent;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
.line 1
|
|
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"
|
|
|
|
.line 2
|
|
invoke-virtual {v0, p0, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
|
|
|
|
const-string p0, "failing_client_id"
|
|
|
|
.line 3
|
|
invoke-virtual {v0, p0, p2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;
|
|
|
|
const-string p0, "notify_manager"
|
|
|
|
.line 4
|
|
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
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Landroid/app/Activity;->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"
|
|
|
|
.line 2
|
|
invoke-static {v1, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
.line 3
|
|
invoke-virtual {p0}, Landroid/app/Activity;->finish()V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string v2, "pending_intent"
|
|
|
|
.line 4
|
|
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"
|
|
|
|
.line 5
|
|
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"
|
|
|
|
.line 6
|
|
invoke-static {v1, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
.line 7
|
|
invoke-virtual {p0}, Landroid/app/Activity;->finish()V
|
|
|
|
return-void
|
|
|
|
:cond_2
|
|
:goto_0
|
|
const/4 v4, 0x1
|
|
|
|
if-eqz v2, :cond_5
|
|
|
|
.line 8
|
|
: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
|
|
|
|
.line 9
|
|
invoke-virtual/range {v5 .. v11}, Landroid/app/Activity;->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"
|
|
|
|
.line 10
|
|
invoke-static {v1, v2, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
|
|
|
|
.line 11
|
|
invoke-virtual {p0}, Landroid/app/Activity;->finish()V
|
|
|
|
return-void
|
|
|
|
:catch_1
|
|
move-exception v3
|
|
|
|
const-string v5, "notify_manager"
|
|
|
|
.line 12
|
|
invoke-virtual {v0, v5, v4}, Landroid/os/Bundle;->getBoolean(Ljava/lang/String;Z)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
.line 13
|
|
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
|
|
|
|
.line 14
|
|
invoke-virtual {p0}, Landroid/app/Activity;->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
|
|
|
|
.line 15
|
|
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
|
|
|
|
.line 16
|
|
: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 "
|
|
|
|
const-string v6, "."
|
|
|
|
invoke-static {v2, v5, v0, v6}, Landroidx/fragment/app/z;->a(Ljava/lang/StringBuilder;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v2, Landroid/os/Build;->FINGERPRINT:Ljava/lang/String;
|
|
|
|
const-string v5, "generic"
|
|
|
|
.line 17
|
|
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."
|
|
|
|
.line 18
|
|
invoke-virtual {v0, v2}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
.line 19
|
|
:cond_4
|
|
invoke-static {v1, v0, v3}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
|
|
|
|
.line 20
|
|
:goto_1
|
|
iput v4, p0, Lcom/google/android/gms/common/api/GoogleApiActivity;->zaa:I
|
|
|
|
.line 21
|
|
invoke-virtual {p0}, Landroid/app/Activity;->finish()V
|
|
|
|
return-void
|
|
|
|
.line 22
|
|
: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
|
|
|
|
.line 23
|
|
invoke-static {}, Lcom/google/android/gms/common/GoogleApiAvailability;->getInstance()Lcom/google/android/gms/common/GoogleApiAvailability;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x2
|
|
|
|
.line 24
|
|
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
|
|
|
|
|
|
# virtual methods
|
|
.method public final onActivityResult(IILandroid/content/Intent;)V
|
|
.locals 3
|
|
.param p3 # Landroid/content/Intent;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 1
|
|
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
|
|
|
|
.line 2
|
|
invoke-virtual {p0}, Landroid/app/Activity;->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
|
|
|
|
.line 3
|
|
invoke-virtual {p0, p2, p3}, Landroid/app/Activity;->setResult(ILandroid/content/Intent;)V
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
.line 4
|
|
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
|
|
|
|
.line 5
|
|
: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
|
|
|
|
.line 6
|
|
invoke-virtual {p0}, Landroid/app/Activity;->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
|
|
|
|
.line 7
|
|
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
|
|
|
|
.line 8
|
|
: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
|
|
|
|
.line 9
|
|
invoke-virtual {p0, p2, p3}, Landroid/app/Activity;->setResult(ILandroid/content/Intent;)V
|
|
|
|
.line 10
|
|
:cond_3
|
|
:goto_0
|
|
invoke-virtual {p0}, Landroid/app/Activity;->finish()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final onCancel(Landroid/content/DialogInterface;)V
|
|
.locals 0
|
|
.param p1 # Landroid/content/DialogInterface;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
const/4 p1, 0x0
|
|
|
|
.line 1
|
|
iput p1, p0, Lcom/google/android/gms/common/api/GoogleApiActivity;->zaa:I
|
|
|
|
invoke-virtual {p0, p1}, Landroid/app/Activity;->setResult(I)V
|
|
|
|
.line 2
|
|
invoke-virtual {p0}, Landroid/app/Activity;->finish()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final onCreate(Landroid/os/Bundle;)V
|
|
.locals 1
|
|
.param p1 # Landroid/os/Bundle;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 1
|
|
invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const-string v0, "resolution"
|
|
|
|
.line 2
|
|
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
|
|
|
|
.line 3
|
|
invoke-direct {p0}, Lcom/google/android/gms/common/api/GoogleApiActivity;->zab()V
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public final onSaveInstanceState(Landroid/os/Bundle;)V
|
|
.locals 2
|
|
.param p1 # Landroid/os/Bundle;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 1
|
|
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
|
|
|
|
.line 2
|
|
invoke-super {p0, p1}, Landroid/app/Activity;->onSaveInstanceState(Landroid/os/Bundle;)V
|
|
|
|
return-void
|
|
.end method
|