DCUniMPCapsuleButtonStyle.smali
.class public Lio/dcloud/feature/sdk/DCUniMPCapsuleButtonStyle;
.super Ljava/lang/Object;
# instance fields
.field private backgroundColor:Ljava/lang/String;
.field private borderColor:Ljava/lang/String;
.field private highlightColor:Ljava/lang/String;
.field private textColor:Ljava/lang/String;
# direct methods
.method public constructor <init>()V
.registers 1
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method getCapsuleButtonStyle()Lorg/json/JSONObject;
.registers 5
.line 1
iget-object v0, p0, Lio/dcloud/feature/sdk/DCUniMPCapsuleButtonStyle;->backgroundColor:Ljava/lang/String;
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
const/4 v1, 0x0
if-eqz v0, :cond_22
iget-object v0, p0, Lio/dcloud/feature/sdk/DCUniMPCapsuleButtonStyle;->textColor:Ljava/lang/String;
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_22
iget-object v0, p0, Lio/dcloud/feature/sdk/DCUniMPCapsuleButtonStyle;->highlightColor:Ljava/lang/String;
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_22
iget-object v0, p0, Lio/dcloud/feature/sdk/DCUniMPCapsuleButtonStyle;->borderColor:Ljava/lang/String;
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_22
return-object v1
.line 5
:cond_22
:try_start_22
new-instance v0, Lorg/json/JSONObject;
invoke-direct {v0}, Lorg/json/JSONObject;-><init>()V
.line 6
iget-object v2, p0, Lio/dcloud/feature/sdk/DCUniMPCapsuleButtonStyle;->backgroundColor:Ljava/lang/String;
invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v2
:try_end_2d
.catch Lorg/json/JSONException; {:try_start_22 .. :try_end_2d} :catch_65
if-nez v2, :cond_36
const-string v2, "backgroundColor"
.line 7
:try_start_31
iget-object v3, p0, Lio/dcloud/feature/sdk/DCUniMPCapsuleButtonStyle;->backgroundColor:Ljava/lang/String;
invoke-virtual {v0, v2, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
.line 9
:cond_36
iget-object v2, p0, Lio/dcloud/feature/sdk/DCUniMPCapsuleButtonStyle;->textColor:Ljava/lang/String;
invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v2
:try_end_3c
.catch Lorg/json/JSONException; {:try_start_31 .. :try_end_3c} :catch_65
if-nez v2, :cond_45
const-string v2, "textColor"
.line 10
:try_start_40
iget-object v3, p0, Lio/dcloud/feature/sdk/DCUniMPCapsuleButtonStyle;->textColor:Ljava/lang/String;
invoke-virtual {v0, v2, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
.line 12
:cond_45
iget-object v2, p0, Lio/dcloud/feature/sdk/DCUniMPCapsuleButtonStyle;->highlightColor:Ljava/lang/String;
invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v2
:try_end_4b
.catch Lorg/json/JSONException; {:try_start_40 .. :try_end_4b} :catch_65
if-nez v2, :cond_54
const-string v2, "highlightColor"
.line 13
:try_start_4f
iget-object v3, p0, Lio/dcloud/feature/sdk/DCUniMPCapsuleButtonStyle;->highlightColor:Ljava/lang/String;
invoke-virtual {v0, v2, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
.line 15
:cond_54
iget-object v2, p0, Lio/dcloud/feature/sdk/DCUniMPCapsuleButtonStyle;->borderColor:Ljava/lang/String;
invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v2
:try_end_5a
.catch Lorg/json/JSONException; {:try_start_4f .. :try_end_5a} :catch_65
if-nez v2, :cond_63
const-string v2, "borderColor"
.line 16
:try_start_5e
iget-object v3, p0, Lio/dcloud/feature/sdk/DCUniMPCapsuleButtonStyle;->borderColor:Ljava/lang/String;
invoke-virtual {v0, v2, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
:try_end_63
.catch Lorg/json/JSONException; {:try_start_5e .. :try_end_63} :catch_65
:cond_63
move-object v1, v0
goto :goto_69
:catch_65
move-exception v0
.line 19
invoke-virtual {v0}, Lorg/json/JSONException;->printStackTrace()V
:goto_69
return-object v1
.end method
.method public setBackgroundColor(Ljava/lang/String;)V
.registers 2
.line 1
iput-object p1, p0, Lio/dcloud/feature/sdk/DCUniMPCapsuleButtonStyle;->backgroundColor:Ljava/lang/String;
return-void
.end method
.method public setBorderColor(Ljava/lang/String;)V
.registers 2
.line 1
iput-object p1, p0, Lio/dcloud/feature/sdk/DCUniMPCapsuleButtonStyle;->borderColor:Ljava/lang/String;
return-void
.end method
.method public setHighlightColor(Ljava/lang/String;)V
.registers 2
.line 1
iput-object p1, p0, Lio/dcloud/feature/sdk/DCUniMPCapsuleButtonStyle;->highlightColor:Ljava/lang/String;
return-void
.end method
.method public setTextColor(Ljava/lang/String;)V
.registers 2
.line 1
iput-object p1, p0, Lio/dcloud/feature/sdk/DCUniMPCapsuleButtonStyle;->textColor:Ljava/lang/String;
return-void
.end method