BasePayService$2.smali
.class Lcom/sandboxol/googlepay/billing/BasePayService$2;
.super Ljava/lang/Object;
.source "BasePayService.java"
# interfaces
.implements Lcom/android/billingclient/api/PurchasesUpdatedListener;
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/sandboxol/googlepay/billing/BasePayService;->initClient(Landroid/app/Activity;)V
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = null
.end annotation
# instance fields
.field final synthetic this$0:Lcom/sandboxol/googlepay/billing/BasePayService;
.field final synthetic val$context:Landroid/app/Activity;
# direct methods
.method constructor <init>(Lcom/sandboxol/googlepay/billing/BasePayService;Landroid/app/Activity;)V
.registers 3
.line 1
iput-object p1, p0, Lcom/sandboxol/googlepay/billing/BasePayService$2;->this$0:Lcom/sandboxol/googlepay/billing/BasePayService;
iput-object p2, p0, Lcom/sandboxol/googlepay/billing/BasePayService$2;->val$context:Landroid/app/Activity;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public onPurchasesUpdated(Lcom/android/billingclient/api/BillingResult;Ljava/util/List;)V
.registers 7
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/android/billingclient/api/BillingResult;",
"Ljava/util/List<",
"Lcom/android/billingclient/api/Purchase;",
">;)V"
}
.end annotation
.line 1
invoke-virtual {p1}, Lcom/android/billingclient/api/BillingResult;->getResponseCode()I
move-result v0
if-nez v0, :cond_51
if-eqz p2, :cond_51
.line 2
invoke-interface {p2}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object p2
:goto_c
invoke-interface {p2}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_9a
invoke-interface {p2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/android/billingclient/api/Purchase;
const-string v1, "\u8d2d\u4e70\u76d1\u542c\u66f4\u65b0"
.line 3
invoke-static {v1, p1, v0}, Lcom/sandboxol/googlepay/billing/PayLogger;->d(Ljava/lang/String;Lcom/android/billingclient/api/BillingResult;Lcom/android/billingclient/api/Purchase;)V
.line 4
iget-object v1, p0, Lcom/sandboxol/googlepay/billing/BasePayService$2;->this$0:Lcom/sandboxol/googlepay/billing/BasePayService;
# invokes: Lcom/sandboxol/googlepay/billing/BasePayService;->handlePurchase(Lcom/android/billingclient/api/Purchase;)V
invoke-static {v1, v0}, Lcom/sandboxol/googlepay/billing/BasePayService;->access$000(Lcom/sandboxol/googlepay/billing/BasePayService;Lcom/android/billingclient/api/Purchase;)V
.line 5
invoke-static {}, Lcom/sandboxol/common/base/app/BaseApplication;->getContext()Landroid/content/Context;
move-result-object v1
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "appversion:"
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-static {}, Lcom/sandboxol/common/base/app/BaseApplication;->getApp()Lcom/sandboxol/common/base/app/BaseApplication;
move-result-object v3
invoke-virtual {v3}, Lcom/sandboxol/common/base/app/BaseApplication;->getMetaDataAppVersion()I
move-result v3
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string v3, ",billDetail:"
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Lcom/android/billingclient/api/Purchase;->getDeveloperPayload()Ljava/lang/String;
move-result-object 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
const-string v2, "on.pay.result"
invoke-static {v1, v2, v0}, Lcom/sandboxol/common/interfaces/ReportDataAdapter;->onEvent(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V
goto :goto_c
:cond_51
const/4 v0, 0x1
if-nez p2, :cond_86
const-string p2, "\u8d2d\u4e70\u76d1\u542c\u66f4\u65b0 \u6ca1\u6709purchase"
.line 6
invoke-static {p2, p1}, Lcom/sandboxol/googlepay/billing/PayLogger;->d(Ljava/lang/String;Lcom/android/billingclient/api/BillingResult;)V
.line 7
invoke-virtual {p1}, Lcom/android/billingclient/api/BillingResult;->getResponseCode()I
move-result p2
const/4 v1, 0x7
if-ne p2, v1, :cond_6b
.line 8
iget-object p1, p0, Lcom/sandboxol/googlepay/billing/BasePayService$2;->val$context:Landroid/app/Activity;
invoke-static {p1}, Lcom/sandboxol/center/router/manager/VipManager;->reportAlreadyOwnedVipSub(Landroid/content/Context;)V
.line 9
iget-object p1, p0, Lcom/sandboxol/googlepay/billing/BasePayService$2;->this$0:Lcom/sandboxol/googlepay/billing/BasePayService;
# invokes: Lcom/sandboxol/googlepay/billing/BasePayService;->queryPurchases()V
invoke-static {p1}, Lcom/sandboxol/googlepay/billing/BasePayService;->access$100(Lcom/sandboxol/googlepay/billing/BasePayService;)V
goto :goto_9a
.line 10
:cond_6b
invoke-virtual {p1}, Lcom/android/billingclient/api/BillingResult;->getResponseCode()I
move-result p2
const/4 v1, 0x0
if-ne p2, v0, :cond_7a
.line 11
new-array p2, v1, [Ljava/lang/String;
const-string v1, "gpay_pay_cancelled"
invoke-static {v1, p2}, Lcom/sandboxol/center/router/manager/GooglePayReportManager;->onEvent(Ljava/lang/String;[Ljava/lang/String;)V
goto :goto_81
.line 12
:cond_7a
new-array p2, v1, [Ljava/lang/String;
const-string v1, "gpay_pay_failed"
invoke-static {v1, p2}, Lcom/sandboxol/center/router/manager/GooglePayReportManager;->onEvent(Ljava/lang/String;[Ljava/lang/String;)V
:goto_81
const/4 p2, 0x0
.line 13
invoke-static {p1, v0, p2}, Lcom/sandboxol/googlepay/billing/PayMessenger;->sendNotOK(Lcom/android/billingclient/api/BillingResult;ZLcom/android/billingclient/api/Purchase;)V
goto :goto_9a
.line 14
:cond_86
invoke-interface {p2}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object p2
:goto_8a
invoke-interface {p2}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_9a
invoke-interface {p2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/android/billingclient/api/Purchase;
.line 15
invoke-static {p1, v0, v1}, Lcom/sandboxol/googlepay/billing/PayMessenger;->sendNotOK(Lcom/android/billingclient/api/BillingResult;ZLcom/android/billingclient/api/Purchase;)V
goto :goto_8a
:cond_9a
:goto_9a
return-void
.end method