.class Lcom/baidu/mobads/production/b;
.super Ljava/lang/Object;
.source "SourceFile"

# interfaces
.implements Lcom/baidu/mobads/openad/interfaces/event/IOAdEventListener;


# instance fields
.field final synthetic a:Lcom/baidu/mobads/production/a;


# direct methods
.method constructor <init>(Lcom/baidu/mobads/production/a;)V
    .locals 0

    .line 136
    iput-object p1, p0, Lcom/baidu/mobads/production/b;->a:Lcom/baidu/mobads/production/a;

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

    return-void
.end method


# virtual methods
.method public run(Lcom/baidu/mobads/openad/interfaces/event/IOAdEvent;)V
    .locals 3

    .line 139
    iget-object v0, p0, Lcom/baidu/mobads/production/b;->a:Lcom/baidu/mobads/production/a;

    invoke-virtual {v0}, Lcom/baidu/mobads/production/a;->h()V

    const-string v0, "URLLoader.Load.Complete"

    .line 142
    invoke-interface {p1}, Lcom/baidu/mobads/openad/interfaces/event/IOAdEvent;->getType()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_1

    .line 143
    invoke-interface {p1}, Lcom/baidu/mobads/openad/interfaces/event/IOAdEvent;->getData()Ljava/util/Map;

    move-result-object p1

    const-string v0, "message"

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

    move-result-object p1

    check-cast p1, Ljava/lang/String;

    .line 145
    :try_start_0
    iget-object v0, p0, Lcom/baidu/mobads/production/b;->a:Lcom/baidu/mobads/production/a;

    new-instance v1, Lcom/baidu/mobads/vo/c;

    invoke-direct {v1, p1}, Lcom/baidu/mobads/vo/c;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, v1}, Lcom/baidu/mobads/production/a;->setAdResponseInfo(Lcom/baidu/mobads/interfaces/IXAdResponseInfo;)V

    .line 146
    iget-object p1, p0, Lcom/baidu/mobads/production/b;->a:Lcom/baidu/mobads/production/a;

    invoke-static {p1}, Lcom/baidu/mobads/production/a;->a(Lcom/baidu/mobads/production/a;)Lcom/baidu/mobads/interfaces/IXAdResponseInfo;

    move-result-object p1

    if-eqz p1, :cond_0

    iget-object p1, p0, Lcom/baidu/mobads/production/b;->a:Lcom/baidu/mobads/production/a;

    invoke-static {p1}, Lcom/baidu/mobads/production/a;->a(Lcom/baidu/mobads/production/a;)Lcom/baidu/mobads/interfaces/IXAdResponseInfo;

    move-result-object p1

    invoke-interface {p1}, Lcom/baidu/mobads/interfaces/IXAdResponseInfo;->getAdInstanceList()Ljava/util/ArrayList;

    move-result-object p1

    invoke-virtual {p1}, Ljava/util/ArrayList;->size()I

    move-result p1

    if-lez p1, :cond_0

    .line 147
    iget-object p1, p0, Lcom/baidu/mobads/production/b;->a:Lcom/baidu/mobads/production/a;

    const/4 v0, 0x1

    invoke-static {v0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v0

    iput-object v0, p1, Lcom/baidu/mobads/production/a;->b:Ljava/lang/Boolean;

    .line 149
    iget-object p1, p0, Lcom/baidu/mobads/production/b;->a:Lcom/baidu/mobads/production/a;

    iget-object v0, p0, Lcom/baidu/mobads/production/b;->a:Lcom/baidu/mobads/production/a;

    invoke-static {v0}, Lcom/baidu/mobads/production/a;->a(Lcom/baidu/mobads/production/a;)Lcom/baidu/mobads/interfaces/IXAdResponseInfo;

    move-result-object v0

    invoke-virtual {p1, v0}, Lcom/baidu/mobads/production/a;->a(Lcom/baidu/mobads/interfaces/IXAdResponseInfo;)V

    .line 151
    iget-object p1, p0, Lcom/baidu/mobads/production/b;->a:Lcom/baidu/mobads/production/a;

    const-string v0, "XAdMouldeLoader ad-server requesting success"

    invoke-virtual {p1, v0}, Lcom/baidu/mobads/production/a;->a(Ljava/lang/String;)V

    goto :goto_0

    .line 153
    :cond_0
    invoke-static {}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getInstance()Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;

    move-result-object p1

    invoke-virtual {p1}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getErrorCode()Lcom/baidu/mobads/interfaces/error/IXAdErrorCode;

    move-result-object p1

    iget-object v0, p0, Lcom/baidu/mobads/production/b;->a:Lcom/baidu/mobads/production/a;

    invoke-virtual {v0}, Lcom/baidu/mobads/production/a;->getAdResponseInfo()Lcom/baidu/mobads/interfaces/IXAdResponseInfo;

    move-result-object v0

    invoke-interface {v0}, Lcom/baidu/mobads/interfaces/IXAdResponseInfo;->getErrorCode()Ljava/lang/String;

    move-result-object v0

    iget-object v1, p0, Lcom/baidu/mobads/production/b;->a:Lcom/baidu/mobads/production/a;

    invoke-virtual {v1}, Lcom/baidu/mobads/production/a;->getAdResponseInfo()Lcom/baidu/mobads/interfaces/IXAdResponseInfo;

    move-result-object v1

    invoke-interface {v1}, Lcom/baidu/mobads/interfaces/IXAdResponseInfo;->getErrorMessage()Ljava/lang/String;

    move-result-object v1

    const-string v2, ""

    invoke-interface {p1, v0, v1, v2}, Lcom/baidu/mobads/interfaces/error/IXAdErrorCode;->printErrorMessage(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    .line 158
    iget-object p1, p0, Lcom/baidu/mobads/production/b;->a:Lcom/baidu/mobads/production/a;

    iget-object v0, p0, Lcom/baidu/mobads/production/b;->a:Lcom/baidu/mobads/production/a;

    invoke-virtual {v0}, Lcom/baidu/mobads/production/a;->getAdResponseInfo()Lcom/baidu/mobads/interfaces/IXAdResponseInfo;

    move-result-object v0

    invoke-interface {v0}, Lcom/baidu/mobads/interfaces/IXAdResponseInfo;->getErrorMessage()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p1, v0}, Lcom/baidu/mobads/production/a;->b(Ljava/lang/String;)V
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    const-string p1, "response json parsing error"

    .line 162
    invoke-static {}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getInstance()Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;

    move-result-object v0

    invoke-virtual {v0}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getErrorCode()Lcom/baidu/mobads/interfaces/error/IXAdErrorCode;

    move-result-object v0

    const-string v1, ""

    const-string v2, ""

    invoke-interface {v0, v1, p1, v2}, Lcom/baidu/mobads/interfaces/error/IXAdErrorCode;->printErrorMessage(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    .line 163
    iget-object v0, p0, Lcom/baidu/mobads/production/b;->a:Lcom/baidu/mobads/production/a;

    invoke-virtual {v0, p1}, Lcom/baidu/mobads/production/a;->b(Ljava/lang/String;)V

    .line 165
    invoke-static {}, Lcom/baidu/mobads/c/a;->a()Lcom/baidu/mobads/c/a;

    move-result-object v0

    invoke-virtual {v0, p1}, Lcom/baidu/mobads/c/a;->a(Ljava/lang/String;)V

    goto :goto_0

    :cond_1
    const-string p1, "request ad-server error, io_err/timeout"

    .line 169
    invoke-static {}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getInstance()Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;

    move-result-object v0

    invoke-virtual {v0}, Lcom/baidu/mobads/utils/XAdSDKFoundationFacade;->getErrorCode()Lcom/baidu/mobads/interfaces/error/IXAdErrorCode;

    move-result-object v0

    const-string v1, ""

    const-string v2, ""

    invoke-interface {v0, v1, p1, v2}, Lcom/baidu/mobads/interfaces/error/IXAdErrorCode;->printErrorMessage(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    .line 170
    iget-object v0, p0, Lcom/baidu/mobads/production/b;->a:Lcom/baidu/mobads/production/a;

    invoke-virtual {v0, p1}, Lcom/baidu/mobads/production/a;->b(Ljava/lang/String;)V

    .line 172
    invoke-static {}, Lcom/baidu/mobads/c/a;->a()Lcom/baidu/mobads/c/a;

    move-result-object v0

    invoke-virtual {v0, p1}, Lcom/baidu/mobads/c/a;->a(Ljava/lang/String;)V

    :goto_0
    return-void
.end method
