ab.smali

.class final Lcom/sandboxol/blockymods/view/activity/host/ab;
.super Lcom/sandboxol/common/base/web/OnResponseListener;
.source "HostModel.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/sandboxol/blockymods/view/activity/host/lb;->g(Landroid/content/Context;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x8
    name = null
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/sandboxol/common/base/web/OnResponseListener<",
        "Lcom/sandboxol/center/entity/VipSubInfo;",
        ">;"
    }
.end annotation


# instance fields
.field final synthetic a:Landroid/content/Context;


# direct methods
.method constructor <init>(Landroid/content/Context;)V
    .registers 2

    .line 1
    iput-object p1, p0, Lcom/sandboxol/blockymods/view/activity/host/ab;->a:Landroid/content/Context;

    invoke-direct {p0}, Lcom/sandboxol/common/base/web/OnResponseListener;-><init>()V

    return-void
.end method

.method static synthetic a(Landroid/content/Context;Lcom/sandboxol/center/entity/VipSubInfo;)V
    .registers 4

    .line 1
    invoke-static {}, Lcom/sandboxol/center/router/manager/BillingManager;->getInstance()Lcom/sandboxol/center/router/manager/BillingManager;

    move-result-object v0

    invoke-virtual {v0, p0}, Lcom/sandboxol/center/router/manager/BillingManager;->updateUserMoney(Landroid/content/Context;)V

    .line 2
    invoke-static {}, Lcom/sandboxol/common/messenger/Messenger;->getDefault()Lcom/sandboxol/common/messenger/Messenger;

    move-result-object p0

    const-string v0, "token.refresh.vip.info"

    invoke-virtual {p0, v0}, Lcom/sandboxol/common/messenger/Messenger;->sendNoMsg(Ljava/lang/Object;)V

    .line 3
    invoke-static {}, Lcom/sandboxol/common/messenger/Messenger;->getDefault()Lcom/sandboxol/common/messenger/Messenger;

    move-result-object p0

    invoke-static {}, Lcom/sandboxol/common/widget/rv/msg/RefreshMsg;->create()Lcom/sandboxol/common/widget/rv/msg/RefreshMsg;

    move-result-object v0

    const-string v1, "token.refresh.subscribe.bottom.list"

    invoke-virtual {p0, v0, v1}, Lcom/sandboxol/common/messenger/Messenger;->send(Ljava/lang/Object;Ljava/lang/Object;)V

    .line 4
    invoke-static {}, Lcom/sandboxol/common/messenger/Messenger;->getDefault()Lcom/sandboxol/common/messenger/Messenger;

    move-result-object p0

    invoke-static {}, Lcom/sandboxol/common/widget/rv/msg/RefreshMsg;->create()Lcom/sandboxol/common/widget/rv/msg/RefreshMsg;

    move-result-object v0

    const-string v1, "token.refresh.product.list"

    invoke-virtual {p0, v0, v1}, Lcom/sandboxol/common/messenger/Messenger;->send(Ljava/lang/Object;Ljava/lang/Object;)V

    .line 5
    invoke-static {}, Lcom/sandboxol/common/messenger/Messenger;->getDefault()Lcom/sandboxol/common/messenger/Messenger;

    move-result-object p0

    const-string v0, "token.buy.vip.subs.success"

    invoke-virtual {p0, v0}, Lcom/sandboxol/common/messenger/Messenger;->sendNoMsg(Ljava/lang/Object;)V

    if-eqz p1, :cond_60

    .line 6
    invoke-virtual {p1}, Lcom/sandboxol/center/entity/VipSubInfo;->getPlayerInfo()Lcom/sandboxol/center/entity/PlayerInfo;

    move-result-object p0

    if-eqz p0, :cond_60

    .line 7
    invoke-static {}, Lcom/sandboxol/center/entity/AccountCenter;->newInstance()Lcom/sandboxol/center/entity/AccountCenter;

    move-result-object p0

    invoke-virtual {p1}, Lcom/sandboxol/center/entity/VipSubInfo;->getPlayerInfo()Lcom/sandboxol/center/entity/PlayerInfo;

    move-result-object v0

    invoke-virtual {v0}, Lcom/sandboxol/center/entity/PlayerInfo;->getVip()I

    move-result v0

    invoke-virtual {p0, v0}, Lcom/sandboxol/center/entity/AccountCenter;->setVip(I)V

    .line 8
    invoke-static {}, Lcom/sandboxol/center/entity/AccountCenter;->newInstance()Lcom/sandboxol/center/entity/AccountCenter;

    move-result-object p0

    invoke-virtual {p1}, Lcom/sandboxol/center/entity/VipSubInfo;->getPlayerInfo()Lcom/sandboxol/center/entity/PlayerInfo;

    move-result-object p1

    invoke-virtual {p1}, Lcom/sandboxol/center/entity/PlayerInfo;->getExpireDate()Ljava/lang/String;

    move-result-object p1

    invoke-static {p1}, Lcom/sandboxol/common/utils/DateUtils;->stampToTime(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    invoke-virtual {p0, p1}, Lcom/sandboxol/center/entity/AccountCenter;->setExpireDate(Ljava/lang/String;)V

    .line 9
    invoke-static {}, Lcom/sandboxol/center/entity/AccountCenter;->putAccountInfo()V

    :cond_60
    return-void
.end method


# virtual methods
.method public onError(ILjava/lang/String;)V
    .registers 3

    return-void
.end method

.method public onServerError(I)V
    .registers 2

    return-void
.end method

.method public onSuccess(Lcom/sandboxol/center/entity/VipSubInfo;)V
    .registers 7

    .line 2
    invoke-static {}, Lcom/sandboxol/center/utils/VipDataManager;->getInstance()Lcom/sandboxol/center/utils/VipDataManager;

    move-result-object v0

    invoke-virtual {v0, p1}, Lcom/sandboxol/center/utils/VipDataManager;->setVipSubInfo(Lcom/sandboxol/center/entity/VipSubInfo;)V

    .line 3
    invoke-static {}, Lcom/sandboxol/center/router/manager/BillingManager;->getInstance()Lcom/sandboxol/center/router/manager/BillingManager;

    move-result-object v0

    iget-object v1, p0, Lcom/sandboxol/blockymods/view/activity/host/ab;->a:Landroid/content/Context;

    invoke-static {}, Lcom/sandboxol/center/utils/VipDataManager;->getInstance()Lcom/sandboxol/center/utils/VipDataManager;

    move-result-object v2

    invoke-virtual {v2}, Lcom/sandboxol/center/utils/VipDataManager;->getVipSubInfo()Lcom/sandboxol/center/entity/VipSubInfo;

    move-result-object v2

    iget-object v3, p0, Lcom/sandboxol/blockymods/view/activity/host/ab;->a:Landroid/content/Context;

    new-instance v4, Lcom/sandboxol/blockymods/view/activity/host/pa;

    invoke-direct {v4, v3, p1}, Lcom/sandboxol/blockymods/view/activity/host/pa;-><init>(Landroid/content/Context;Lcom/sandboxol/center/entity/VipSubInfo;)V

    invoke-virtual {v0, v1, v2, v4}, Lcom/sandboxol/center/router/manager/BillingManager;->loadVipStatus(Landroid/content/Context;Lcom/sandboxol/center/entity/VipSubInfo;Lcom/sandboxol/center/listener/OnLoadVipStatusListListener;)V

    return-void
.end method

.method public bridge synthetic onSuccess(Ljava/lang/Object;)V
    .registers 2

    .line 1
    check-cast p1, Lcom/sandboxol/center/entity/VipSubInfo;

    invoke-virtual {p0, p1}, Lcom/sandboxol/blockymods/view/activity/host/ab;->onSuccess(Lcom/sandboxol/center/entity/VipSubInfo;)V

    return-void
.end method