Weather/smali_classes3/com/moji/statistics/EventService.smali
2021-05-10 10:13:34 +02:00

473 lines
12 KiB
Smali

.class public Lcom/moji/statistics/EventService;
.super Ljava/lang/Object;
.source "EventService.java"
# interfaces
.implements Ljava/lang/Runnable;
# instance fields
.field private a:Lcom/moji/statistics/EVENT_TAG;
.field private b:I
.field private c:Landroid/os/Bundle;
# direct methods
.method public constructor <init>(Lcom/moji/statistics/EVENT_TAG;ILandroid/os/Bundle;)V
.locals 1
.line 21
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const/4 v0, 0x0
.line 17
iput-object v0, p0, Lcom/moji/statistics/EventService;->a:Lcom/moji/statistics/EVENT_TAG;
const/4 v0, -0x1
.line 18
iput v0, p0, Lcom/moji/statistics/EventService;->b:I
.line 22
iput-object p1, p0, Lcom/moji/statistics/EventService;->a:Lcom/moji/statistics/EVENT_TAG;
.line 23
iput p2, p0, Lcom/moji/statistics/EventService;->b:I
.line 24
iput-object p3, p0, Lcom/moji/statistics/EventService;->c:Landroid/os/Bundle;
return-void
.end method
# virtual methods
.method public run()V
.locals 11
.line 29
iget-object v0, p0, Lcom/moji/statistics/EventService;->a:Lcom/moji/statistics/EVENT_TAG;
if-nez v0, :cond_0
return-void
:cond_0
const/4 v0, 0x0
.line 37
iget v1, p0, Lcom/moji/statistics/EventService;->b:I
const-wide/16 v2, -0x1
packed-switch v1, :pswitch_data_0
.line 99
new-instance v0, Lcom/moji/statistics/EventEntity;
iget-object v1, p0, Lcom/moji/statistics/EventService;->a:Lcom/moji/statistics/EVENT_TAG;
invoke-direct {v0, v1}, Lcom/moji/statistics/EventEntity;-><init>(Lcom/moji/statistics/EVENT_TAG;)V
goto/16 :goto_5
.line 83
:pswitch_0
iget-object v1, p0, Lcom/moji/statistics/EventService;->c:Landroid/os/Bundle;
if-nez v1, :cond_1
return-void
.line 84
:cond_1
iget-object v1, p0, Lcom/moji/statistics/EventService;->c:Landroid/os/Bundle;
const-string v4, "key_event_params"
invoke-virtual {v1, v4}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v7
.line 87
:try_start_0
new-instance v1, Lorg/json/JSONObject;
iget-object v4, p0, Lcom/moji/statistics/EventService;->c:Landroid/os/Bundle;
const-string v5, "key_event_json"
invoke-virtual {v4, v5}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v4
invoke-direct {v1, v4}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V
:try_end_0
.catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0
move-object v10, v1
goto :goto_0
:catch_0
move-exception v1
const-string v4, "EventService"
.line 89
invoke-static {v4, v1}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
move-object v10, v0
.line 91
:goto_0
iget-object v0, p0, Lcom/moji/statistics/EventService;->c:Landroid/os/Bundle;
const-string v1, "key_event_duration"
invoke-virtual {v0, v1, v2, v3}, Landroid/os/Bundle;->getLong(Ljava/lang/String;J)J
move-result-wide v8
cmp-long v0, v8, v2
if-lez v0, :cond_2
.line 93
new-instance v0, Lcom/moji/statistics/EventEntity;
iget-object v6, p0, Lcom/moji/statistics/EventService;->a:Lcom/moji/statistics/EVENT_TAG;
move-object v5, v0
invoke-direct/range {v5 .. v10}, Lcom/moji/statistics/EventEntity;-><init>(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;JLorg/json/JSONObject;)V
goto/16 :goto_5
.line 95
:cond_2
new-instance v0, Lcom/moji/statistics/EventEntity;
iget-object v1, p0, Lcom/moji/statistics/EventService;->a:Lcom/moji/statistics/EVENT_TAG;
invoke-direct {v0, v1, v7, v10}, Lcom/moji/statistics/EventEntity;-><init>(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;Lorg/json/JSONObject;)V
goto/16 :goto_5
.line 73
:pswitch_1
iget-object v1, p0, Lcom/moji/statistics/EventService;->c:Landroid/os/Bundle;
if-nez v1, :cond_3
return-void
.line 74
:cond_3
iget-object v1, p0, Lcom/moji/statistics/EventService;->c:Landroid/os/Bundle;
const-string v2, "key_event_params"
invoke-virtual {v1, v2}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
.line 76
:try_start_1
new-instance v2, Lorg/json/JSONObject;
iget-object v3, p0, Lcom/moji/statistics/EventService;->c:Landroid/os/Bundle;
const-string v4, "key_event_json"
invoke-virtual {v3, v4}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v3
invoke-direct {v2, v3}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V
:try_end_1
.catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_1
move-object v0, v2
goto :goto_1
:catch_1
move-exception v2
const-string v3, "EventService"
.line 78
invoke-static {v3, v2}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
.line 80
:goto_1
new-instance v2, Lcom/moji/statistics/EventEntity;
iget-object v3, p0, Lcom/moji/statistics/EventService;->a:Lcom/moji/statistics/EVENT_TAG;
invoke-direct {v2, v3, v1, v0}, Lcom/moji/statistics/EventEntity;-><init>(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;Lorg/json/JSONObject;)V
goto :goto_3
.line 63
:pswitch_2
iget-object v1, p0, Lcom/moji/statistics/EventService;->c:Landroid/os/Bundle;
if-nez v1, :cond_4
return-void
.line 64
:cond_4
iget-object v1, p0, Lcom/moji/statistics/EventService;->c:Landroid/os/Bundle;
const-string v2, "key_event_sp"
invoke-virtual {v1, v2}, Landroid/os/Bundle;->getSerializable(Ljava/lang/String;)Ljava/io/Serializable;
move-result-object v1
check-cast v1, Lcom/moji/statistics/EventParams;
.line 66
:try_start_2
new-instance v2, Lorg/json/JSONObject;
iget-object v3, p0, Lcom/moji/statistics/EventService;->c:Landroid/os/Bundle;
const-string v4, "key_event_json"
invoke-virtual {v3, v4}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v3
invoke-direct {v2, v3}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V
:try_end_2
.catch Lorg/json/JSONException; {:try_start_2 .. :try_end_2} :catch_2
move-object v0, v2
goto :goto_2
:catch_2
move-exception v2
const-string v3, "EventService"
.line 68
invoke-static {v3, v2}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
.line 70
:goto_2
new-instance v2, Lcom/moji/statistics/EventEntity;
iget-object v3, p0, Lcom/moji/statistics/EventService;->a:Lcom/moji/statistics/EVENT_TAG;
invoke-direct {v2, v3, v1, v0}, Lcom/moji/statistics/EventEntity;-><init>(Lcom/moji/statistics/EVENT_TAG;Lcom/moji/statistics/EventParams;Lorg/json/JSONObject;)V
goto :goto_3
.line 57
:pswitch_3
iget-object v0, p0, Lcom/moji/statistics/EventService;->c:Landroid/os/Bundle;
if-nez v0, :cond_5
return-void
.line 58
:cond_5
iget-object v0, p0, Lcom/moji/statistics/EventService;->c:Landroid/os/Bundle;
const-string v1, "key_event_params"
invoke-virtual {v0, v1}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
.line 59
iget-object v1, p0, Lcom/moji/statistics/EventService;->c:Landroid/os/Bundle;
const-string v2, "key_event_sp"
invoke-virtual {v1, v2}, Landroid/os/Bundle;->getSerializable(Ljava/lang/String;)Ljava/io/Serializable;
move-result-object v1
check-cast v1, Lcom/moji/statistics/EventParams;
.line 60
new-instance v2, Lcom/moji/statistics/EventEntity;
iget-object v3, p0, Lcom/moji/statistics/EventService;->a:Lcom/moji/statistics/EVENT_TAG;
invoke-direct {v2, v3, v0, v1}, Lcom/moji/statistics/EventEntity;-><init>(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;Lcom/moji/statistics/EventParams;)V
:goto_3
move-object v0, v2
goto :goto_5
.line 52
:pswitch_4
iget-object v0, p0, Lcom/moji/statistics/EventService;->c:Landroid/os/Bundle;
if-nez v0, :cond_6
return-void
.line 53
:cond_6
iget-object v0, p0, Lcom/moji/statistics/EventService;->c:Landroid/os/Bundle;
const-string v1, "key_event_sp"
invoke-virtual {v0, v1}, Landroid/os/Bundle;->getSerializable(Ljava/lang/String;)Ljava/io/Serializable;
move-result-object v0
check-cast v0, Lcom/moji/statistics/EventParams;
.line 54
new-instance v1, Lcom/moji/statistics/EventEntity;
iget-object v2, p0, Lcom/moji/statistics/EventService;->a:Lcom/moji/statistics/EVENT_TAG;
invoke-direct {v1, v2, v0}, Lcom/moji/statistics/EventEntity;-><init>(Lcom/moji/statistics/EVENT_TAG;Lcom/moji/statistics/EventParams;)V
:goto_4
move-object v0, v1
goto :goto_5
.line 42
:pswitch_5
iget-object v0, p0, Lcom/moji/statistics/EventService;->c:Landroid/os/Bundle;
if-nez v0, :cond_7
return-void
.line 43
:cond_7
iget-object v0, p0, Lcom/moji/statistics/EventService;->c:Landroid/os/Bundle;
const-string v1, "key_event_params"
invoke-virtual {v0, v1}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
.line 44
iget-object v1, p0, Lcom/moji/statistics/EventService;->c:Landroid/os/Bundle;
const-string v4, "key_event_duration"
invoke-virtual {v1, v4, v2, v3}, Landroid/os/Bundle;->getLong(Ljava/lang/String;J)J
move-result-wide v4
cmp-long v1, v4, v2
if-lez v1, :cond_8
.line 46
new-instance v1, Lcom/moji/statistics/EventEntity;
iget-object v2, p0, Lcom/moji/statistics/EventService;->a:Lcom/moji/statistics/EVENT_TAG;
invoke-direct {v1, v2, v0, v4, v5}, Lcom/moji/statistics/EventEntity;-><init>(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;J)V
goto :goto_4
.line 48
:cond_8
new-instance v1, Lcom/moji/statistics/EventEntity;
iget-object v2, p0, Lcom/moji/statistics/EventService;->a:Lcom/moji/statistics/EVENT_TAG;
invoke-direct {v1, v2, v0}, Lcom/moji/statistics/EventEntity;-><init>(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;)V
goto :goto_4
.line 39
:pswitch_6
new-instance v0, Lcom/moji/statistics/EventEntity;
iget-object v1, p0, Lcom/moji/statistics/EventService;->a:Lcom/moji/statistics/EVENT_TAG;
invoke-direct {v0, v1}, Lcom/moji/statistics/EventEntity;-><init>(Lcom/moji/statistics/EVENT_TAG;)V
.line 104
:goto_5
:try_start_3
iget-object v1, p0, Lcom/moji/statistics/EventService;->a:Lcom/moji/statistics/EVENT_TAG;
iget-object v1, v1, Lcom/moji/statistics/EVENT_TAG;->mNodes:[Lcom/moji/statistics/EVENT_RECEIVER;
array-length v2, v1
const/4 v3, 0x0
:goto_6
if-ge v3, v2, :cond_9
aget-object v4, v1, v3
.line 105
iget-object v4, v4, Lcom/moji/statistics/EVENT_RECEIVER;->mReceiverClz:Ljava/lang/Class;
invoke-virtual {v4}, Ljava/lang/Class;->newInstance()Ljava/lang/Object;
move-result-object v4
check-cast v4, Lcom/moji/statistics/EventHelper;
.line 106
invoke-interface {v4, v0}, Lcom/moji/statistics/EventHelper;->onEvent(Lcom/moji/statistics/EventEntity;)V
:try_end_3
.catch Ljava/lang/InstantiationException; {:try_start_3 .. :try_end_3} :catch_4
.catch Ljava/lang/IllegalAccessException; {:try_start_3 .. :try_end_3} :catch_3
add-int/lit8 v3, v3, 0x1
goto :goto_6
:catch_3
move-exception v0
const-string v1, "EventService"
.line 111
invoke-static {v1, v0}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
goto :goto_7
:catch_4
move-exception v0
const-string v1, "EventService"
.line 109
invoke-static {v1, v0}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
:cond_9
:goto_7
return-void
:pswitch_data_0
.packed-switch 0x1
:pswitch_6
:pswitch_5
:pswitch_4
:pswitch_3
:pswitch_2
:pswitch_1
:pswitch_0
.end packed-switch
.end method