108 lines
2.5 KiB
Smali
108 lines
2.5 KiB
Smali
.class public final Lcom/my/tracker/utils/EventUtils$b;
|
|
.super Ljava/lang/Object;
|
|
.source "EventUtils.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/my/tracker/utils/EventUtils;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x9
|
|
name = "b"
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public a:Lorg/json/JSONObject;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Ljava/lang/String;)V
|
|
.locals 1
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 2
|
|
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 3
|
|
:try_start_0
|
|
new-instance v0, Lorg/json/JSONObject;
|
|
|
|
invoke-direct {v0, p1}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V
|
|
|
|
iput-object v0, p0, Lcom/my/tracker/utils/EventUtils$b;->a:Lorg/json/JSONObject;
|
|
:try_end_0
|
|
.catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
const-string p1, "JSON exception serializing event"
|
|
|
|
.line 4
|
|
invoke-static {p1}, Lcom/my/tracker/Tracer;->a(Ljava/lang/String;)V
|
|
|
|
.line 5
|
|
:cond_0
|
|
:goto_0
|
|
iget-object p1, p0, Lcom/my/tracker/utils/EventUtils$b;->a:Lorg/json/JSONObject;
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
.line 6
|
|
new-instance p1, Lorg/json/JSONObject;
|
|
|
|
invoke-direct {p1}, Lorg/json/JSONObject;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/my/tracker/utils/EventUtils$b;->a:Lorg/json/JSONObject;
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final a(Ljava/lang/String;Ljava/lang/String;)Lcom/my/tracker/utils/EventUtils$b;
|
|
.locals 1
|
|
|
|
.line 1
|
|
:try_start_0
|
|
iget-object v0, p0, Lcom/my/tracker/utils/EventUtils$b;->a:Lorg/json/JSONObject;
|
|
|
|
invoke-virtual {v0, p1, p2}, Lorg/json/JSONObject;->putOpt(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
|
|
:try_end_0
|
|
.catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
const-string p1, "JSON exception add string to event params"
|
|
|
|
.line 2
|
|
invoke-static {p1}, Lcom/my/tracker/Tracer;->a(Ljava/lang/String;)V
|
|
|
|
:goto_0
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public final toString()Ljava/lang/String;
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/my/tracker/utils/EventUtils$b;->a:Lorg/json/JSONObject;
|
|
|
|
invoke-virtual {v0}, Lorg/json/JSONObject;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|