NewSandboxReportService.smali

.class public Lcom/sandboxol/report/NewSandboxReportService;
.super Ljava/lang/Object;
.source "NewSandboxReportService.java"

# interfaces
.implements Lcom/sandboxol/center/router/moduleApi/INewSandboxReportService;


# annotations
.annotation build Lcom/alibaba/android/arouter/facade/annotation/Route;
    path = "/sandboxReport/newReport"
.end annotation


# static fields
.field private static final KEY_APP_EVENT:Ljava/lang/String; = "key.app.event"

.field private static final KEY_EVENT:Ljava/lang/String; = "ke.event"

.field private static final KEY_EVENT_PLATFORM:Ljava/lang/String; = "key.event.paltform"

.field private static final KEY_EVENT_TYPE:Ljava/lang/String; = "key.event.type"

.field private static final KEY_GAME_EVENT:Ljava/lang/String; = "key.game.event"

.field private static final KEY_GAME_ID:Ljava/lang/String; = "ke.game.id"


# instance fields
.field private delEvents:Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Map<",
            "Ljava/lang/String;",
            "Ljava/util/List<",
            "Lcom/sandboxol/greendao/entity/report/NewEventInfoRequest;",
            ">;>;"
        }
    .end annotation
.end field

.field private isReport:Z

.field private isReportFinish:Z

.field private mDisposable:Lio/reactivex/disposables/b;

.field private reportInterTime:I

.field private reportStrategyMaps:Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Map<",
            "Ljava/lang/String;",
            "Lcom/sandboxol/report/strategy/IReportStrategy;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>()V
    .registers 2

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/4 v0, -0x1

    .line 2
    iput v0, p0, Lcom/sandboxol/report/NewSandboxReportService;->reportInterTime:I

    const/4 v0, 0x0

    .line 3
    iput-boolean v0, p0, Lcom/sandboxol/report/NewSandboxReportService;->isReport:Z

    const/4 v0, 0x1

    .line 4
    iput-boolean v0, p0, Lcom/sandboxol/report/NewSandboxReportService;->isReportFinish:Z

    .line 5
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    iput-object v0, p0, Lcom/sandboxol/report/NewSandboxReportService;->reportStrategyMaps:Ljava/util/Map;

    .line 6
    new-instance v0, Ljava/util/HashMap;

    invoke-direct {v0}, Ljava/util/HashMap;-><init>()V

    iput-object v0, p0, Lcom/sandboxol/report/NewSandboxReportService;->delEvents:Ljava/util/Map;

    return-void
.end method

.method private _onAppEvent(Ljava/lang/String;Ljava/lang/String;)V
    .registers 4

    .line 1
    iget-object v0, p0, Lcom/sandboxol/report/NewSandboxReportService;->reportStrategyMaps:Ljava/util/Map;

    invoke-interface {v0, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Lcom/sandboxol/report/strategy/IReportStrategy;

    if-eqz p1, :cond_d

    .line 2
    invoke-interface {p1, p2}, Lcom/sandboxol/report/strategy/IReportStrategy;->onAppEvent(Ljava/lang/String;)V

    :cond_d
    return-void
.end method

.method private _onGameEvent(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .registers 5

    .line 1
    iget-object v0, p0, Lcom/sandboxol/report/NewSandboxReportService;->reportStrategyMaps:Ljava/util/Map;

    invoke-interface {v0, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Lcom/sandboxol/report/strategy/IReportStrategy;

    if-eqz p1, :cond_d

    .line 2
    invoke-interface {p1, p2, p3}, Lcom/sandboxol/report/strategy/IReportStrategy;->onGameEvent(Ljava/lang/String;Ljava/lang/String;)V

    :cond_d
    return-void
.end method

.method private _startReport(Landroid/content/Context;)V
    .registers 5

    .line 1
    iget p1, p0, Lcom/sandboxol/report/NewSandboxReportService;->reportInterTime:I

    mul-int/lit16 p1, p1, 0x3e8

    int-to-long v0, p1

    sget-object p1, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;

    invoke-static {v0, v1, p1}, Lio/reactivex/p;->interval(JLjava/util/concurrent/TimeUnit;)Lio/reactivex/p;

    move-result-object p1

    .line 2
    invoke-static {}, Lio/reactivex/f/b;->b()Lio/reactivex/x;

    move-result-object v0

    invoke-virtual {p1, v0}, Lio/reactivex/p;->observeOn(Lio/reactivex/x;)Lio/reactivex/p;

    move-result-object p1

    new-instance v0, Lcom/sandboxol/report/NewSandboxReportService$2;

    invoke-direct {v0, p0}, Lcom/sandboxol/report/NewSandboxReportService$2;-><init>(Lcom/sandboxol/report/NewSandboxReportService;)V

    .line 3
    invoke-virtual {p1, v0}, Lio/reactivex/p;->subscribe(Lio/reactivex/w;)V

    .line 4
    sget-object p1, Lcom/sandboxol/messager/MessageMediator;->INSTANCE:Lcom/sandboxol/messager/MessageMediator;

    const-class v0, Lcom/sandboxol/report/NewSandboxReportService;

    invoke-virtual {p1, v0}, Lcom/sandboxol/messager/MessageMediator;->unRegisterMsg(Ljava/lang/reflect/Type;)V

    .line 5
    sget-object p1, Lcom/sandboxol/messager/MessageMediator;->INSTANCE:Lcom/sandboxol/messager/MessageMediator;

    const-class v0, Lcom/sandboxol/report/NewSandboxReportService;

    new-instance v1, Lcom/sandboxol/report/NewSandboxReportService$3;

    invoke-direct {v1, p0}, Lcom/sandboxol/report/NewSandboxReportService$3;-><init>(Lcom/sandboxol/report/NewSandboxReportService;)V

    const-string v2, "sandbox.new.report.event"

    invoke-virtual {p1, v0, v2, v1}, Lcom/sandboxol/messager/MessageMediator;->registerMsg1(Ljava/lang/reflect/Type;Ljava/lang/String;Lcom/sandboxol/messager/callback/Action1;)V

    return-void
.end method

.method static synthetic access$000(Lcom/sandboxol/report/NewSandboxReportService;)V
    .registers 1

    .line 1
    invoke-direct {p0}, Lcom/sandboxol/report/NewSandboxReportService;->delEvents()V

    return-void
.end method

.method static synthetic access$100(Lcom/sandboxol/report/NewSandboxReportService;)Lio/reactivex/disposables/b;
    .registers 1

    .line 1
    iget-object p0, p0, Lcom/sandboxol/report/NewSandboxReportService;->mDisposable:Lio/reactivex/disposables/b;

    return-object p0
.end method

.method static synthetic access$102(Lcom/sandboxol/report/NewSandboxReportService;Lio/reactivex/disposables/b;)Lio/reactivex/disposables/b;
    .registers 2

    .line 1
    iput-object p1, p0, Lcom/sandboxol/report/NewSandboxReportService;->mDisposable:Lio/reactivex/disposables/b;

    return-object p1
.end method

.method static synthetic access$200(Lcom/sandboxol/report/NewSandboxReportService;)V
    .registers 1

    .line 1
    invoke-direct {p0}, Lcom/sandboxol/report/NewSandboxReportService;->stopReport()V

    return-void
.end method

.method static synthetic access$300(Lcom/sandboxol/report/NewSandboxReportService;)Z
    .registers 1

    .line 1
    iget-boolean p0, p0, Lcom/sandboxol/report/NewSandboxReportService;->isReportFinish:Z

    return p0
.end method

.method static synthetic access$302(Lcom/sandboxol/report/NewSandboxReportService;Z)Z
    .registers 2

    .line 1
    iput-boolean p1, p0, Lcom/sandboxol/report/NewSandboxReportService;->isReportFinish:Z

    return p1
.end method

.method static synthetic access$400(Lcom/sandboxol/report/NewSandboxReportService;Lrx/functions/Action0;)V
    .registers 2

    .line 1
    invoke-direct {p0, p1}, Lcom/sandboxol/report/NewSandboxReportService;->handleReportEvent(Lrx/functions/Action0;)V

    return-void
.end method

.method static synthetic access$500(Lcom/sandboxol/report/NewSandboxReportService;)V
    .registers 1

    .line 1
    invoke-direct {p0}, Lcom/sandboxol/report/NewSandboxReportService;->resetReport()V

    return-void
.end method

.method static synthetic access$600(Lcom/sandboxol/report/NewSandboxReportService;)Z
    .registers 1

    .line 1
    iget-boolean p0, p0, Lcom/sandboxol/report/NewSandboxReportService;->isReport:Z

    return p0
.end method

.method static synthetic access$700(Lcom/sandboxol/report/NewSandboxReportService;Ljava/lang/String;Ljava/lang/String;)V
    .registers 3

    .line 1
    invoke-direct {p0, p1, p2}, Lcom/sandboxol/report/NewSandboxReportService;->_onAppEvent(Ljava/lang/String;Ljava/lang/String;)V

    return-void
.end method

.method static synthetic access$800(Lcom/sandboxol/report/NewSandboxReportService;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .registers 4

    .line 1
    invoke-direct {p0, p1, p2, p3}, Lcom/sandboxol/report/NewSandboxReportService;->_onGameEvent(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    return-void
.end method

.method private delEvents()V
    .registers 5

    .line 1
    iget-object v0, p0, Lcom/sandboxol/report/NewSandboxReportService;->delEvents:Ljava/util/Map;

    invoke-interface {v0}, Ljava/util/Map;->entrySet()Ljava/util/Set;

    move-result-object v0

    invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :cond_a
    :goto_a
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_3a

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/util/Map$Entry;

    .line 2
    iget-object v2, p0, Lcom/sandboxol/report/NewSandboxReportService;->reportStrategyMaps:Ljava/util/Map;

    invoke-interface {v1}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;

    move-result-object v3

    invoke-interface {v2, v3}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/sandboxol/report/strategy/IReportStrategy;

    if-eqz v2, :cond_a

    .line 3
    invoke-interface {v1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Ljava/util/List;

    invoke-interface {v3}, Ljava/util/List;->size()I

    move-result v3

    if-lez v3, :cond_a

    .line 4
    invoke-interface {v1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/util/List;

    invoke-interface {v2, v1}, Lcom/sandboxol/report/strategy/IReportStrategy;->clearEvents(Ljava/util/List;)Ljava/util/List;

    goto :goto_a

    :cond_3a
    return-void
.end method

.method private handleReportEvent(Lrx/functions/Action0;)V
    .registers 7

    .line 1
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    .line 2
    iget-object v1, p0, Lcom/sandboxol/report/NewSandboxReportService;->delEvents:Ljava/util/Map;

    invoke-interface {v1}, Ljava/util/Map;->clear()V

    .line 3
    iget-object v1, p0, Lcom/sandboxol/report/NewSandboxReportService;->reportStrategyMaps:Ljava/util/Map;

    invoke-interface {v1}, Ljava/util/Map;->entrySet()Ljava/util/Set;

    move-result-object v1

    invoke-interface {v1}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v1

    :cond_14
    :goto_14
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-eqz v2, :cond_3d

    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/util/Map$Entry;

    .line 4
    invoke-interface {v2}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/sandboxol/report/strategy/IReportStrategy;

    invoke-interface {v3}, Lcom/sandboxol/report/strategy/IReportStrategy;->getEvents()Ljava/util/List;

    move-result-object v3

    .line 5
    invoke-interface {v3}, Ljava/util/List;->size()I

    move-result v4

    if-lez v4, :cond_14

    .line 6
    invoke-interface {v0, v3}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z

    .line 7
    iget-object v4, p0, Lcom/sandboxol/report/NewSandboxReportService;->delEvents:Ljava/util/Map;

    invoke-interface {v2}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;

    move-result-object v2

    invoke-interface {v4, v2, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    goto :goto_14

    .line 8
    :cond_3d
    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v1

    if-lez v1, :cond_50

    .line 9
    invoke-static {}, Lcom/sandboxol/common/base/app/BaseApplication;->getApp()Lcom/sandboxol/common/base/app/BaseApplication;

    move-result-object v1

    new-instance v2, Lcom/sandboxol/report/NewSandboxReportService$1;

    invoke-direct {v2, p0, p1}, Lcom/sandboxol/report/NewSandboxReportService$1;-><init>(Lcom/sandboxol/report/NewSandboxReportService;Lrx/functions/Action0;)V

    invoke-static {v1, v0, v2}, Lcom/sandboxol/report/web/ReportInfoApi;->newReportSandboxData(Landroid/content/Context;Ljava/util/List;Lcom/sandboxol/common/base/web/OnResponseListener;)V

    goto :goto_53

    .line 10
    :cond_50
    invoke-interface {p1}, Lrx/functions/Action0;->call()V

    :goto_53
    return-void
.end method

.method private resetReport()V
    .registers 2

    .line 1
    invoke-direct {p0}, Lcom/sandboxol/report/NewSandboxReportService;->stopReport()V

    .line 2
    invoke-static {}, Lcom/sandboxol/common/base/app/BaseApplication;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-direct {p0, v0}, Lcom/sandboxol/report/NewSandboxReportService;->startReport(Landroid/content/Context;)V

    return-void
.end method

.method private startReport(Landroid/content/Context;)V
    .registers 4

    .line 1
    invoke-static {}, Lcom/sandboxol/center/utils/ReportUtils;->blockReport()Z

    move-result v0

    if-eqz v0, :cond_7

    return-void

    .line 2
    :cond_7
    invoke-static {}, Lcom/sandboxol/center/utils/AppUtils;->isMainProcess()Z

    move-result v0

    if-eqz v0, :cond_23

    .line 3
    invoke-virtual {p0}, Lcom/sandboxol/report/NewSandboxReportService;->getReportInternal()I

    move-result v0

    if-lez v0, :cond_20

    .line 4
    iget-boolean v1, p0, Lcom/sandboxol/report/NewSandboxReportService;->isReport:Z

    if-nez v1, :cond_23

    const/4 v1, 0x1

    .line 5
    iput-boolean v1, p0, Lcom/sandboxol/report/NewSandboxReportService;->isReport:Z

    .line 6
    iput v0, p0, Lcom/sandboxol/report/NewSandboxReportService;->reportInterTime:I

    .line 7
    invoke-direct {p0, p1}, Lcom/sandboxol/report/NewSandboxReportService;->_startReport(Landroid/content/Context;)V

    goto :goto_23

    .line 8
    :cond_20
    invoke-direct {p0}, Lcom/sandboxol/report/NewSandboxReportService;->stopReport()V

    :cond_23
    :goto_23
    return-void
.end method

.method private stopReport()V
    .registers 3

    .line 1
    iget-object v0, p0, Lcom/sandboxol/report/NewSandboxReportService;->mDisposable:Lio/reactivex/disposables/b;

    if-eqz v0, :cond_a

    .line 2
    invoke-interface {v0}, Lio/reactivex/disposables/b;->dispose()V

    const/4 v0, 0x0

    .line 3
    iput-object v0, p0, Lcom/sandboxol/report/NewSandboxReportService;->mDisposable:Lio/reactivex/disposables/b;

    :cond_a
    const/4 v0, 0x0

    .line 4
    iput-boolean v0, p0, Lcom/sandboxol/report/NewSandboxReportService;->isReport:Z

    .line 5
    sget-object v0, Lcom/sandboxol/messager/MessageMediator;->INSTANCE:Lcom/sandboxol/messager/MessageMediator;

    const-class v1, Lcom/sandboxol/report/NewSandboxReportService;

    invoke-virtual {v0, v1}, Lcom/sandboxol/messager/MessageMediator;->unRegisterMsg(Ljava/lang/reflect/Type;)V

    return-void
.end method


# virtual methods
.method public getReportInternal()I
    .registers 4

    .line 1
    invoke-static {}, Lcom/sandboxol/common/base/app/BaseApplication;->getContext()Landroid/content/Context;

    move-result-object v0

    const-string v1, "key.new.report.internal"

    const/16 v2, 0x3c

    invoke-static {v0, v1, v2}, Lcom/sandboxol/common/utils/SharedUtils;->getInt(Landroid/content/Context;Ljava/lang/String;I)I

    move-result v0

    return v0
.end method

.method public synthetic init(Landroid/content/Context;)V
    .registers 2

    invoke-static {p0, p1}, Lcom/sandboxol/center/router/moduleApi/a;->a(Lcom/sandboxol/center/router/moduleApi/IBaseService;Landroid/content/Context;)V

    return-void
.end method

.method public onAppEvent(Ljava/lang/String;Ljava/lang/String;)V
    .registers 6

    .line 1
    invoke-static {}, Lcom/sandboxol/center/utils/AppUtils;->isMainProcess()Z

    move-result v0

    if-eqz v0, :cond_e

    .line 2
    iget-boolean v0, p0, Lcom/sandboxol/report/NewSandboxReportService;->isReport:Z

    if-eqz v0, :cond_36

    .line 3
    invoke-direct {p0, p1, p2}, Lcom/sandboxol/report/NewSandboxReportService;->_onAppEvent(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_36

    .line 4
    :cond_e
    invoke-static {}, Landroid/os/Message;->obtain()Landroid/os/Message;

    move-result-object v0

    .line 5
    invoke-virtual {v0}, Landroid/os/Message;->getData()Landroid/os/Bundle;

    move-result-object v1

    const-string v2, "key.event.type"

    invoke-virtual {v1, v2, p1}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 6
    invoke-virtual {v0}, Landroid/os/Message;->getData()Landroid/os/Bundle;

    move-result-object p1

    const-string v1, "ke.event"

    invoke-virtual {p1, v1, p2}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 7
    invoke-virtual {v0}, Landroid/os/Message;->getData()Landroid/os/Bundle;

    move-result-object p1

    const-string p2, "key.event.paltform"

    const-string v1, "key.app.event"

    invoke-virtual {p1, p2, v1}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 8
    sget-object p1, Lcom/sandboxol/messager/MessageMediator;->INSTANCE:Lcom/sandboxol/messager/MessageMediator;

    const-string p2, "sandbox.new.report.event"

    invoke-virtual {p1, p2, v0}, Lcom/sandboxol/messager/MessageMediator;->sendMsg1(Ljava/lang/String;Landroid/os/Message;)V

    :cond_36
    :goto_36
    return-void
.end method

.method public onCreate(Landroid/content/Context;)V
    .registers 6

    .line 1
    iget-object v0, p0, Lcom/sandboxol/report/NewSandboxReportService;->reportStrategyMaps:Ljava/util/Map;

    new-instance v1, Lcom/sandboxol/report/strategy/FunnelAppStrategy;

    const/4 v2, 0x1

    invoke-direct {v1, v2}, Lcom/sandboxol/report/strategy/FunnelAppStrategy;-><init>(Z)V

    const-string v3, "funnel_app_number"

    invoke-interface {v0, v3, v1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 2
    iget-object v0, p0, Lcom/sandboxol/report/NewSandboxReportService;->reportStrategyMaps:Ljava/util/Map;

    new-instance v1, Lcom/sandboxol/report/strategy/FunnelNewAppStrategy;

    invoke-direct {v1, v2}, Lcom/sandboxol/report/strategy/FunnelNewAppStrategy;-><init>(Z)V

    const-string v3, "funnel_new_app_number"

    invoke-interface {v0, v3, v1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 3
    iget-object v0, p0, Lcom/sandboxol/report/NewSandboxReportService;->reportStrategyMaps:Ljava/util/Map;

    new-instance v1, Lcom/sandboxol/report/strategy/FunnelGameNumStrategy;

    invoke-direct {v1, v2}, Lcom/sandboxol/report/strategy/FunnelGameNumStrategy;-><init>(Z)V

    const-string v2, "funnel_game_number"

    invoke-interface {v0, v2, v1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 4
    iget-object v0, p0, Lcom/sandboxol/report/NewSandboxReportService;->reportStrategyMaps:Ljava/util/Map;

    new-instance v1, Lcom/sandboxol/report/strategy/FunnelGameFrequencyStrategy;

    const/4 v2, 0x0

    invoke-direct {v1, v2}, Lcom/sandboxol/report/strategy/FunnelGameFrequencyStrategy;-><init>(Z)V

    const-string v2, "funnel_game_frequency"

    invoke-interface {v0, v2, v1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 5
    invoke-direct {p0, p1}, Lcom/sandboxol/report/NewSandboxReportService;->startReport(Landroid/content/Context;)V

    return-void
.end method

.method public onDestroy()V
    .registers 2

    .line 1
    iget-object v0, p0, Lcom/sandboxol/report/NewSandboxReportService;->reportStrategyMaps:Ljava/util/Map;

    invoke-interface {v0}, Ljava/util/Map;->clear()V

    .line 2
    invoke-direct {p0}, Lcom/sandboxol/report/NewSandboxReportService;->stopReport()V

    return-void
.end method

.method public onGameEvent(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .registers 7

    const-string v0, "g1008"

    .line 1
    invoke-virtual {v0, p3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    const-string v2, "g1046"

    if-eqz v1, :cond_f

    .line 2
    invoke-virtual {p2, v0, v2}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object p2

    move-object p3, v2

    :cond_f
    const-string v0, "g1054"

    .line 3
    invoke-virtual {v0, p3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    const-string v2, "g1058"

    if-eqz v1, :cond_1e

    .line 4
    invoke-virtual {p2, v0, v2}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object p2

    move-object p3, v2

    .line 5
    :cond_1e
    invoke-static {}, Lcom/sandboxol/center/utils/AppUtils;->isMainProcess()Z

    move-result v0

    if-eqz v0, :cond_2c

    .line 6
    iget-boolean v0, p0, Lcom/sandboxol/report/NewSandboxReportService;->isReport:Z

    if-eqz v0, :cond_5d

    .line 7
    invoke-direct {p0, p1, p2, p3}, Lcom/sandboxol/report/NewSandboxReportService;->_onGameEvent(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_5d

    .line 8
    :cond_2c
    invoke-static {}, Landroid/os/Message;->obtain()Landroid/os/Message;

    move-result-object v0

    .line 9
    invoke-virtual {v0}, Landroid/os/Message;->getData()Landroid/os/Bundle;

    move-result-object v1

    const-string v2, "key.event.type"

    invoke-virtual {v1, v2, p1}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 10
    invoke-virtual {v0}, Landroid/os/Message;->getData()Landroid/os/Bundle;

    move-result-object p1

    const-string v1, "ke.event"

    invoke-virtual {p1, v1, p2}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 11
    invoke-virtual {v0}, Landroid/os/Message;->getData()Landroid/os/Bundle;

    move-result-object p1

    const-string p2, "ke.game.id"

    invoke-virtual {p1, p2, p3}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 12
    invoke-virtual {v0}, Landroid/os/Message;->getData()Landroid/os/Bundle;

    move-result-object p1

    const-string p2, "key.event.paltform"

    const-string p3, "key.game.event"

    invoke-virtual {p1, p2, p3}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 13
    sget-object p1, Lcom/sandboxol/messager/MessageMediator;->INSTANCE:Lcom/sandboxol/messager/MessageMediator;

    const-string p2, "sandbox.new.report.event"

    invoke-virtual {p1, p2, v0}, Lcom/sandboxol/messager/MessageMediator;->sendMsg1(Ljava/lang/String;Landroid/os/Message;)V

    :cond_5d
    :goto_5d
    return-void
.end method

.method public setReportInternal(I)V
    .registers 4

    .line 1
    invoke-static {}, Lcom/sandboxol/common/base/app/BaseApplication;->getContext()Landroid/content/Context;

    move-result-object v0

    const-string v1, "key.new.report.internal"

    invoke-static {v0, v1, p1}, Lcom/sandboxol/common/utils/SharedUtils;->putInt(Landroid/content/Context;Ljava/lang/String;I)V

    .line 2
    invoke-static {}, Lcom/sandboxol/common/base/app/BaseApplication;->getContext()Landroid/content/Context;

    move-result-object p1

    invoke-direct {p0, p1}, Lcom/sandboxol/report/NewSandboxReportService;->startReport(Landroid/content/Context;)V

    return-void
.end method