292 lines
7.7 KiB
Smali
292 lines
7.7 KiB
Smali
.class public Lcom/android/billingclient/api/ProxyBillingActivity;
|
|
.super Landroid/app/Activity;
|
|
.source "com.android.billingclient:billing@@3.0.0"
|
|
|
|
|
|
# instance fields
|
|
.field public d:Landroid/os/ResultReceiver;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Landroid/app/Activity;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public onActivityResult(IILandroid/content/Intent;)V
|
|
.locals 4
|
|
.param p3 # Landroid/content/Intent;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
invoke-super {p0, p1, p2, p3}, Landroid/app/Activity;->onActivityResult(IILandroid/content/Intent;)V
|
|
|
|
const-string v0, "ProxyBillingActivity"
|
|
|
|
const/16 v1, 0x64
|
|
|
|
if-ne p1, v1, :cond_3
|
|
|
|
invoke-static {p3, v0}, Lf/h/a/f/h/n/b;->e(Landroid/content/Intent;Ljava/lang/String;)Lcom/android/billingclient/api/BillingResult;
|
|
|
|
move-result-object p1
|
|
|
|
iget p1, p1, Lcom/android/billingclient/api/BillingResult;->a:I
|
|
|
|
const/4 v1, -0x1
|
|
|
|
if-ne p2, v1, :cond_0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
:cond_0
|
|
const/16 v1, 0x55
|
|
|
|
const-string v2, "Activity finished with resultCode "
|
|
|
|
const-string v3, " and billing\'s responseCode: "
|
|
|
|
invoke-static {v1, v2, p2, v3, p1}, Lf/e/c/a/a;->c(ILjava/lang/String;ILjava/lang/String;I)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-static {v0, p2}, Lf/h/a/f/h/n/b;->g(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
:cond_1
|
|
iget-object p2, p0, Lcom/android/billingclient/api/ProxyBillingActivity;->d:Landroid/os/ResultReceiver;
|
|
|
|
if-nez p3, :cond_2
|
|
|
|
const/4 p3, 0x0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
invoke-virtual {p3}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;
|
|
|
|
move-result-object p3
|
|
|
|
:goto_0
|
|
invoke-virtual {p2, p1, p3}, Landroid/os/ResultReceiver;->send(ILandroid/os/Bundle;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
const/16 p2, 0x45
|
|
|
|
new-instance p3, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p3, p2}, Ljava/lang/StringBuilder;-><init>(I)V
|
|
|
|
const-string p2, "Got onActivityResult with wrong requestCode: "
|
|
|
|
invoke-virtual {p3, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p3, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
const-string p1, "; skipping..."
|
|
|
|
invoke-virtual {p3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {v0, p1}, Lf/h/a/f/h/n/b;->g(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
:goto_1
|
|
invoke-virtual {p0}, Landroid/app/Activity;->finish()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onCreate(Landroid/os/Bundle;)V
|
|
.locals 10
|
|
.param p1 # Landroid/os/Bundle;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V
|
|
|
|
const-string v0, "result_receiver"
|
|
|
|
const-string v1, "ProxyBillingActivity"
|
|
|
|
if-nez p1, :cond_2
|
|
|
|
const-string p1, "Launching Play Store billing flow"
|
|
|
|
invoke-static {v1, p1}, Lf/h/a/f/h/n/b;->d(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p0}, Landroid/app/Activity;->getIntent()Landroid/content/Intent;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1, v0}, Landroid/content/Intent;->getParcelableExtra(Ljava/lang/String;)Landroid/os/Parcelable;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Landroid/os/ResultReceiver;
|
|
|
|
iput-object p1, p0, Lcom/android/billingclient/api/ProxyBillingActivity;->d:Landroid/os/ResultReceiver;
|
|
|
|
invoke-virtual {p0}, Landroid/app/Activity;->getIntent()Landroid/content/Intent;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "BUY_INTENT"
|
|
|
|
invoke-virtual {p1, v0}, Landroid/content/Intent;->hasExtra(Ljava/lang/String;)Z
|
|
|
|
move-result p1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p0}, Landroid/app/Activity;->getIntent()Landroid/content/Intent;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1, v0}, Landroid/content/Intent;->getParcelableExtra(Ljava/lang/String;)Landroid/os/Parcelable;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Landroid/app/PendingIntent;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-virtual {p0}, Landroid/app/Activity;->getIntent()Landroid/content/Intent;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "SUBS_MANAGEMENT_INTENT"
|
|
|
|
invoke-virtual {p1, v0}, Landroid/content/Intent;->hasExtra(Ljava/lang/String;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
invoke-virtual {p0}, Landroid/app/Activity;->getIntent()Landroid/content/Intent;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1, v0}, Landroid/content/Intent;->getParcelableExtra(Ljava/lang/String;)Landroid/os/Parcelable;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Landroid/app/PendingIntent;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
move-object p1, v2
|
|
|
|
:goto_0
|
|
:try_start_0
|
|
invoke-virtual {p1}, Landroid/app/PendingIntent;->getIntentSender()Landroid/content/IntentSender;
|
|
|
|
move-result-object v4
|
|
|
|
const/16 v5, 0x64
|
|
|
|
new-instance v6, Landroid/content/Intent;
|
|
|
|
invoke-direct {v6}, Landroid/content/Intent;-><init>()V
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/4 v8, 0x0
|
|
|
|
const/4 v9, 0x0
|
|
|
|
move-object v3, p0
|
|
|
|
invoke-virtual/range {v3 .. v9}, Landroid/app/Activity;->startIntentSenderForResult(Landroid/content/IntentSender;ILandroid/content/Intent;III)V
|
|
:try_end_0
|
|
.catch Landroid/content/IntentSender$SendIntentException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return-void
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Ljava/lang/String;->length()I
|
|
|
|
move-result v0
|
|
|
|
add-int/lit8 v0, v0, 0x35
|
|
|
|
new-instance v3, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v3, v0}, Ljava/lang/StringBuilder;-><init>(I)V
|
|
|
|
const-string v0, "Got exception while trying to start a purchase flow: "
|
|
|
|
invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {v1, p1}, Lf/h/a/f/h/n/b;->g(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
iget-object p1, p0, Lcom/android/billingclient/api/ProxyBillingActivity;->d:Landroid/os/ResultReceiver;
|
|
|
|
const/4 v0, 0x6
|
|
|
|
invoke-virtual {p1, v0, v2}, Landroid/os/ResultReceiver;->send(ILandroid/os/Bundle;)V
|
|
|
|
invoke-virtual {p0}, Landroid/app/Activity;->finish()V
|
|
|
|
return-void
|
|
|
|
:cond_2
|
|
const-string v2, "Launching Play Store billing flow from savedInstanceState"
|
|
|
|
invoke-static {v1, v2}, Lf/h/a/f/h/n/b;->d(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p1, v0}, Landroid/os/Bundle;->getParcelable(Ljava/lang/String;)Landroid/os/Parcelable;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Landroid/os/ResultReceiver;
|
|
|
|
iput-object p1, p0, Lcom/android/billingclient/api/ProxyBillingActivity;->d:Landroid/os/ResultReceiver;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onSaveInstanceState(Landroid/os/Bundle;)V
|
|
.locals 2
|
|
.param p1 # Landroid/os/Bundle;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
iget-object v0, p0, Lcom/android/billingclient/api/ProxyBillingActivity;->d:Landroid/os/ResultReceiver;
|
|
|
|
const-string v1, "result_receiver"
|
|
|
|
invoke-virtual {p1, v1, v0}, Landroid/os/Bundle;->putParcelable(Ljava/lang/String;Landroid/os/Parcelable;)V
|
|
|
|
return-void
|
|
.end method
|