200 lines
4.7 KiB
Smali
200 lines
4.7 KiB
Smali
.class public Lcom/android/billingclient/api/Purchase;
|
|
.super Ljava/lang/Object;
|
|
.source "com.android.billingclient:billing@@3.0.0"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/android/billingclient/api/Purchase$a;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final a:Ljava/lang/String;
|
|
|
|
.field public final b:Ljava/lang/String;
|
|
|
|
.field public final c:Lorg/json/JSONObject;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Ljava/lang/String;Ljava/lang/String;)V
|
|
.locals 0
|
|
.param p1 # Ljava/lang/String;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Ljava/lang/String;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Lorg/json/JSONException;
|
|
}
|
|
.end annotation
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/android/billingclient/api/Purchase;->a:Ljava/lang/String;
|
|
|
|
iput-object p2, p0, Lcom/android/billingclient/api/Purchase;->b:Ljava/lang/String;
|
|
|
|
new-instance p1, Lorg/json/JSONObject;
|
|
|
|
iget-object p2, p0, Lcom/android/billingclient/api/Purchase;->a:Ljava/lang/String;
|
|
|
|
invoke-direct {p1, p2}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V
|
|
|
|
iput-object p1, p0, Lcom/android/billingclient/api/Purchase;->c:Lorg/json/JSONObject;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a()Ljava/lang/String;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/android/billingclient/api/Purchase;->c:Lorg/json/JSONObject;
|
|
|
|
const-string v1, "purchaseToken"
|
|
|
|
invoke-virtual {v0, v1}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string/jumbo v2, "token"
|
|
|
|
invoke-virtual {v0, v2, v1}, Lorg/json/JSONObject;->optString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public b()Ljava/lang/String;
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/android/billingclient/api/Purchase;->c:Lorg/json/JSONObject;
|
|
|
|
const-string v1, "productId"
|
|
|
|
invoke-virtual {v0, v1}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public c()Z
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/android/billingclient/api/Purchase;->c:Lorg/json/JSONObject;
|
|
|
|
const-string v1, "acknowledged"
|
|
|
|
const/4 v2, 0x1
|
|
|
|
invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->optBoolean(Ljava/lang/String;Z)Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public equals(Ljava/lang/Object;)Z
|
|
.locals 4
|
|
.param p1 # Ljava/lang/Object;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
const/4 v0, 0x1
|
|
|
|
if-ne p0, p1, :cond_0
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
instance-of v1, p1, Lcom/android/billingclient/api/Purchase;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
return v2
|
|
|
|
:cond_1
|
|
check-cast p1, Lcom/android/billingclient/api/Purchase;
|
|
|
|
iget-object v1, p0, Lcom/android/billingclient/api/Purchase;->a:Ljava/lang/String;
|
|
|
|
iget-object v3, p1, Lcom/android/billingclient/api/Purchase;->a:Ljava/lang/String;
|
|
|
|
invoke-static {v1, v3}, Landroid/text/TextUtils;->equals(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
iget-object v1, p0, Lcom/android/billingclient/api/Purchase;->b:Ljava/lang/String;
|
|
|
|
iget-object p1, p1, Lcom/android/billingclient/api/Purchase;->b:Ljava/lang/String;
|
|
|
|
invoke-static {v1, p1}, Landroid/text/TextUtils;->equals(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
return v0
|
|
|
|
:cond_2
|
|
return v2
|
|
.end method
|
|
|
|
.method public hashCode()I
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/android/billingclient/api/Purchase;->a:Ljava/lang/String;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/String;->hashCode()I
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public toString()Ljava/lang/String;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/android/billingclient/api/Purchase;->a:Ljava/lang/String;
|
|
|
|
invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Ljava/lang/String;->length()I
|
|
|
|
move-result v1
|
|
|
|
const-string v2, "Purchase. Json: "
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
invoke-virtual {v2, v0}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
new-instance v0, Ljava/lang/String;
|
|
|
|
invoke-direct {v0, v2}, Ljava/lang/String;-><init>(Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|