BaseSocketSmartHomeSkill.smali

.class public abstract Lcom/cmcm/xiaobao/phone/smarthome/base/BaseSocketSmartHomeSkill;
.super Lcom/cmcm/xiaobao/phone/smarthome/base/BaseSmartHomeSkill;


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

    invoke-direct {p0}, Lcom/cmcm/xiaobao/phone/smarthome/base/BaseSmartHomeSkill;-><init>()V

    return-void
.end method


# virtual methods
.method protected connectDevice(Landroid/app/Activity;)V
    .registers 3

    invoke-static {}, Lcom/cmcm/xiaobao/phone/smarthome/socket/SocketMgr;->getIns()Lcom/cmcm/xiaobao/phone/smarthome/socket/SocketMgr;

    move-result-object v0

    invoke-virtual {v0}, Lcom/cmcm/xiaobao/phone/smarthome/socket/SocketMgr;->isConnected()Z

    move-result v0

    if-eqz v0, :cond_e

    invoke-super {p0, p1}, Lcom/cmcm/xiaobao/phone/smarthome/base/BaseSmartHomeSkill;->connectDevice(Landroid/app/Activity;)V

    :goto_d
    return-void

    :cond_e
    sget v0, Lcom/cmcm/xiaobao/phone/smarthome/R$string;->cant_connect_speaker:I

    invoke-static {v0}, Lcom/cmcm/xiaobao/phone/commons/utils/ToastUtils;->showToast(I)V

    goto :goto_d
.end method

.method protected goLogin(Landroid/app/Activity;)V
    .registers 4

    sget v0, Lcom/cmcm/xiaobao/phone/smarthome/R$string;->midea_login:I

    invoke-virtual {p1, v0}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object v0

    iget-object v1, p0, Lcom/cmcm/xiaobao/phone/smarthome/base/BaseSocketSmartHomeSkill;->mSkill:Lcom/sdk/orion/bean/SkillListBean$DataBean;

    invoke-static {p1, v0, v1}, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeLoginFragment;->startSmartLogin(Landroid/content/Context;Ljava/lang/String;Lcom/sdk/orion/bean/SkillListBean$DataBean;)V

    return-void
.end method

.method public onDestroy()V
    .registers 1

    invoke-super {p0}, Lcom/cmcm/xiaobao/phone/smarthome/base/BaseSmartHomeSkill;->onDestroy()V

    return-void
.end method

.method public onResume(Landroid/app/Activity;)V
    .registers 3

    invoke-super {p0, p1}, Lcom/cmcm/xiaobao/phone/smarthome/base/BaseSmartHomeSkill;->onResume(Landroid/app/Activity;)V

    invoke-static {}, Lcom/cmcm/xiaobao/phone/smarthome/socket/SocketMgr;->getIns()Lcom/cmcm/xiaobao/phone/smarthome/socket/SocketMgr;

    move-result-object v0

    invoke-virtual {v0}, Lcom/cmcm/xiaobao/phone/smarthome/socket/SocketMgr;->constructSocketAtStartup()V

    return-void
.end method