250 lines
5.8 KiB
Smali
250 lines
5.8 KiB
Smali
|
.class public Lcom/android/billingclient/api/SkuDetails;
|
||
|
.super Ljava/lang/Object;
|
||
|
.source "com.android.billingclient:billing@@3.0.0"
|
||
|
|
||
|
|
||
|
# annotations
|
||
|
.annotation system Ldalvik/annotation/MemberClasses;
|
||
|
value = {
|
||
|
Lcom/android/billingclient/api/SkuDetails$a;
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
|
||
|
# instance fields
|
||
|
.field public final a:Ljava/lang/String;
|
||
|
|
||
|
.field public final b:Lorg/json/JSONObject;
|
||
|
|
||
|
|
||
|
# direct methods
|
||
|
.method public constructor <init>(Ljava/lang/String;)V
|
||
|
.locals 1
|
||
|
.param p1 # 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/SkuDetails;->a:Ljava/lang/String;
|
||
|
|
||
|
new-instance p1, Lorg/json/JSONObject;
|
||
|
|
||
|
iget-object v0, p0, Lcom/android/billingclient/api/SkuDetails;->a:Ljava/lang/String;
|
||
|
|
||
|
invoke-direct {p1, v0}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V
|
||
|
|
||
|
iput-object p1, p0, Lcom/android/billingclient/api/SkuDetails;->b:Lorg/json/JSONObject;
|
||
|
|
||
|
invoke-virtual {p0}, Lcom/android/billingclient/api/SkuDetails;->d()Ljava/lang/String;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
||
|
|
||
|
move-result p1
|
||
|
|
||
|
if-nez p1, :cond_1
|
||
|
|
||
|
invoke-virtual {p0}, Lcom/android/billingclient/api/SkuDetails;->e()Ljava/lang/String;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
||
|
|
||
|
move-result p1
|
||
|
|
||
|
if-nez p1, :cond_0
|
||
|
|
||
|
return-void
|
||
|
|
||
|
:cond_0
|
||
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
||
|
|
||
|
const-string v0, "SkuType cannot be empty."
|
||
|
|
||
|
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
||
|
|
||
|
throw p1
|
||
|
|
||
|
:cond_1
|
||
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
||
|
|
||
|
const-string v0, "SKU cannot be empty."
|
||
|
|
||
|
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
||
|
|
||
|
throw p1
|
||
|
.end method
|
||
|
|
||
|
|
||
|
# virtual methods
|
||
|
.method public a()Ljava/lang/String;
|
||
|
.locals 2
|
||
|
|
||
|
iget-object v0, p0, Lcom/android/billingclient/api/SkuDetails;->b:Lorg/json/JSONObject;
|
||
|
|
||
|
const-string v1, "description"
|
||
|
|
||
|
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 b()Ljava/lang/String;
|
||
|
.locals 2
|
||
|
|
||
|
iget-object v0, p0, Lcom/android/billingclient/api/SkuDetails;->b:Lorg/json/JSONObject;
|
||
|
|
||
|
const-string v1, "price"
|
||
|
|
||
|
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()J
|
||
|
.locals 2
|
||
|
|
||
|
iget-object v0, p0, Lcom/android/billingclient/api/SkuDetails;->b:Lorg/json/JSONObject;
|
||
|
|
||
|
const-string v1, "price_amount_micros"
|
||
|
|
||
|
invoke-virtual {v0, v1}, Lorg/json/JSONObject;->optLong(Ljava/lang/String;)J
|
||
|
|
||
|
move-result-wide v0
|
||
|
|
||
|
return-wide v0
|
||
|
.end method
|
||
|
|
||
|
.method public d()Ljava/lang/String;
|
||
|
.locals 2
|
||
|
|
||
|
iget-object v0, p0, Lcom/android/billingclient/api/SkuDetails;->b: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 e()Ljava/lang/String;
|
||
|
.locals 2
|
||
|
|
||
|
iget-object v0, p0, Lcom/android/billingclient/api/SkuDetails;->b:Lorg/json/JSONObject;
|
||
|
|
||
|
const-string/jumbo v1, "type"
|
||
|
|
||
|
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 equals(Ljava/lang/Object;)Z
|
||
|
.locals 1
|
||
|
.param p1 # Ljava/lang/Object;
|
||
|
.annotation build Landroidx/annotation/Nullable;
|
||
|
.end annotation
|
||
|
.end param
|
||
|
|
||
|
if-ne p0, p1, :cond_0
|
||
|
|
||
|
const/4 p1, 0x1
|
||
|
|
||
|
return p1
|
||
|
|
||
|
:cond_0
|
||
|
instance-of v0, p1, Lcom/android/billingclient/api/SkuDetails;
|
||
|
|
||
|
if-nez v0, :cond_1
|
||
|
|
||
|
const/4 p1, 0x0
|
||
|
|
||
|
return p1
|
||
|
|
||
|
:cond_1
|
||
|
check-cast p1, Lcom/android/billingclient/api/SkuDetails;
|
||
|
|
||
|
iget-object v0, p0, Lcom/android/billingclient/api/SkuDetails;->a:Ljava/lang/String;
|
||
|
|
||
|
iget-object p1, p1, Lcom/android/billingclient/api/SkuDetails;->a:Ljava/lang/String;
|
||
|
|
||
|
invoke-static {v0, p1}, Landroid/text/TextUtils;->equals(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Z
|
||
|
|
||
|
move-result p1
|
||
|
|
||
|
return p1
|
||
|
.end method
|
||
|
|
||
|
.method public final f()Ljava/lang/String;
|
||
|
.locals 2
|
||
|
|
||
|
iget-object v0, p0, Lcom/android/billingclient/api/SkuDetails;->b:Lorg/json/JSONObject;
|
||
|
|
||
|
const-string v1, "packageName"
|
||
|
|
||
|
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 hashCode()I
|
||
|
.locals 1
|
||
|
|
||
|
iget-object v0, p0, Lcom/android/billingclient/api/SkuDetails;->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/SkuDetails;->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, "SkuDetails: "
|
||
|
|
||
|
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
|