ReportInfoApi.smali

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


# static fields
.field private static final api:Lcom/sandboxol/report/web/IReportInfoApi;


# direct methods
.method static constructor <clinit>()V
    .registers 2

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

    move-result-object v0

    invoke-virtual {v0}, Lcom/sandboxol/common/base/app/BaseApplication;->getMetaDataBaseUrl()Ljava/lang/String;

    move-result-object v0

    const-class v1, Lcom/sandboxol/report/web/IReportInfoApi;

    invoke-static {v0, v1}, Lcom/sandboxol/common/retrofit/RetrofitFactory;->httpsCreate(Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/sandboxol/report/web/IReportInfoApi;

    sput-object v0, Lcom/sandboxol/report/web/ReportInfoApi;->api:Lcom/sandboxol/report/web/IReportInfoApi;

    return-void
.end method

.method public constructor <init>()V
    .registers 1

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

    return-void
.end method

.method static synthetic a(Landroid/content/Context;Lcom/sandboxol/greendao/entity/report/EventRequest;Lcom/sandboxol/common/base/web/OnResponseListener;)V
    .registers 3

    .line 1
    invoke-static {p0, p1, p2}, Lcom/sandboxol/report/web/ReportInfoApi;->reportSandboxData(Landroid/content/Context;Lcom/sandboxol/greendao/entity/report/EventRequest;Lcom/sandboxol/common/base/web/OnResponseListener;)V

    return-void
.end method

.method static synthetic a(Landroid/content/Context;Ljava/util/List;Lcom/sandboxol/common/base/web/OnResponseListener;)V
    .registers 3

    .line 2
    invoke-static {p0, p1, p2}, Lcom/sandboxol/report/web/ReportInfoApi;->newReportSandboxData(Landroid/content/Context;Ljava/util/List;Lcom/sandboxol/common/base/web/OnResponseListener;)V

    return-void
.end method

.method public static newReportSandboxData(Landroid/content/Context;Ljava/util/List;Lcom/sandboxol/common/base/web/OnResponseListener;)V
    .registers 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Ljava/util/List<",
            "Lcom/sandboxol/greendao/entity/report/NewEventInfoRequest;",
            ">;",
            "Lcom/sandboxol/common/base/web/OnResponseListener;",
            ")V"
        }
    .end annotation

    .line 1
    new-instance v0, Lcom/sandboxol/report/web/b;

    invoke-direct {v0, p0, p1, p2}, Lcom/sandboxol/report/web/b;-><init>(Landroid/content/Context;Ljava/util/List;Lcom/sandboxol/common/base/web/OnResponseListener;)V

    invoke-static {p2, v0}, Lcom/sandboxol/common/utils/HttpUtils;->getRetryCommand(Lcom/sandboxol/common/base/web/OnResponseListener;Lrx/functions/Action0;)Lcom/sandboxol/common/command/ReplyCommand;

    move-result-object v0

    .line 2
    sget-object v1, Lcom/sandboxol/report/web/ReportInfoApi;->api:Lcom/sandboxol/report/web/IReportInfoApi;

    invoke-static {p0}, Lcom/sandboxol/common/utils/CommonHelper;->getAndroidId(Landroid/content/Context;)Ljava/lang/String;

    move-result-object p0

    invoke-interface {v1, p0, p1}, Lcom/sandboxol/report/web/IReportInfoApi;->newReportSandboxData(Ljava/lang/String;Ljava/util/List;)Lrx/Observable;

    move-result-object p0

    .line 3
    invoke-static {}, Lcom/sandboxol/center/transformers/DataTransformers;->applySchedulersIo()Lrx/Observable$Transformer;

    move-result-object p1

    invoke-virtual {p0, p1}, Lrx/Observable;->compose(Lrx/Observable$Transformer;)Lrx/Observable;

    move-result-object p0

    new-instance p1, Lcom/sandboxol/center/web/http/AuthTokenHttpSubscriber;

    invoke-direct {p1, p2, v0}, Lcom/sandboxol/center/web/http/AuthTokenHttpSubscriber;-><init>(Lcom/sandboxol/common/base/web/OnResponseListener;Lcom/sandboxol/common/command/ReplyCommand;)V

    .line 4
    invoke-virtual {p0, p1}, Lrx/Observable;->subscribe(Lrx/Subscriber;)Lrx/Subscription;

    return-void
.end method

.method public static reportSandboxData(Landroid/content/Context;Lcom/sandboxol/greendao/entity/report/EventRequest;Lcom/sandboxol/common/base/web/OnResponseListener;)V
    .registers 5

    .line 1
    new-instance v0, Lcom/sandboxol/report/web/a;

    invoke-direct {v0, p0, p1, p2}, Lcom/sandboxol/report/web/a;-><init>(Landroid/content/Context;Lcom/sandboxol/greendao/entity/report/EventRequest;Lcom/sandboxol/common/base/web/OnResponseListener;)V

    invoke-static {p2, v0}, Lcom/sandboxol/common/utils/HttpUtils;->getRetryCommand(Lcom/sandboxol/common/base/web/OnResponseListener;Lrx/functions/Action0;)Lcom/sandboxol/common/command/ReplyCommand;

    move-result-object v0

    .line 2
    sget-object v1, Lcom/sandboxol/report/web/ReportInfoApi;->api:Lcom/sandboxol/report/web/IReportInfoApi;

    invoke-static {p0}, Lcom/sandboxol/common/utils/CommonHelper;->getAndroidId(Landroid/content/Context;)Ljava/lang/String;

    move-result-object p0

    invoke-interface {v1, p0, p1}, Lcom/sandboxol/report/web/IReportInfoApi;->reportSandboxData(Ljava/lang/String;Lcom/sandboxol/greendao/entity/report/EventRequest;)Lrx/Observable;

    move-result-object p0

    .line 3
    invoke-static {}, Lrx/schedulers/Schedulers;->io()Lrx/Scheduler;

    move-result-object p1

    invoke-virtual {p0, p1}, Lrx/Observable;->subscribeOn(Lrx/Scheduler;)Lrx/Observable;

    move-result-object p0

    .line 4
    invoke-static {}, Lrx/android/schedulers/AndroidSchedulers;->mainThread()Lrx/Scheduler;

    move-result-object p1

    invoke-virtual {p0, p1}, Lrx/Observable;->observeOn(Lrx/Scheduler;)Lrx/Observable;

    move-result-object p0

    new-instance p1, Lcom/sandboxol/center/web/http/AuthTokenHttpSubscriber;

    invoke-direct {p1, p2, v0}, Lcom/sandboxol/center/web/http/AuthTokenHttpSubscriber;-><init>(Lcom/sandboxol/common/base/web/OnResponseListener;Lcom/sandboxol/common/command/ReplyCommand;)V

    .line 5
    invoke-virtual {p0, p1}, Lrx/Observable;->subscribe(Lrx/Subscriber;)Lrx/Subscription;

    return-void
.end method