MideaSwitchPlatformFragment.smali

.class public Lcom/cmcm/xiaobao/phone/smarthome/base/MideaSwitchPlatformFragment;
.super Lcom/cmcm/xiaobao/phone/smarthome/baseui/BaseFragment;

# interfaces
.implements Landroid/view/View$OnClickListener;


# static fields
.field private static final TAG:Ljava/lang/String; = "MideaSwitchPlatform"


# instance fields
.field private mProgressDialog:Landroid/app/ProgressDialog;


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

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

    return-void
.end method

.method static synthetic access$000(Lcom/cmcm/xiaobao/phone/smarthome/base/MideaSwitchPlatformFragment;)V
    .registers 1

    invoke-direct {p0}, Lcom/cmcm/xiaobao/phone/smarthome/base/MideaSwitchPlatformFragment;->onDone()V

    return-void
.end method

.method static synthetic access$100(Lcom/cmcm/xiaobao/phone/smarthome/base/MideaSwitchPlatformFragment;)Landroid/app/Activity;
    .registers 2

    iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/base/MideaSwitchPlatformFragment;->mActivity:Landroid/app/Activity;

    return-object v0
.end method

.method static synthetic access$200(Lcom/cmcm/xiaobao/phone/smarthome/base/MideaSwitchPlatformFragment;)Landroid/app/Activity;
    .registers 2

    iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/base/MideaSwitchPlatformFragment;->mActivity:Landroid/app/Activity;

    return-object v0
.end method

.method private onDone()V
    .registers 2

    iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/base/MideaSwitchPlatformFragment;->mProgressDialog:Landroid/app/ProgressDialog;

    if-eqz v0, :cond_c

    iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/base/MideaSwitchPlatformFragment;->mProgressDialog:Landroid/app/ProgressDialog;

    invoke-virtual {v0}, Landroid/app/ProgressDialog;->dismiss()V

    const/4 v0, 0x0

    iput-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/base/MideaSwitchPlatformFragment;->mProgressDialog:Landroid/app/ProgressDialog;

    :cond_c
    return-void
.end method

.method public static startPage(Landroid/content/Context;Ljava/lang/String;)V
    .registers 3

    const-class v0, Lcom/cmcm/xiaobao/phone/smarthome/base/MideaSwitchPlatformFragment;

    invoke-static {p0, v0, p1}, Lcom/cmcm/xiaobao/phone/smarthome/baseui/ContainsFragmentActivity;->getStartIntent(Landroid/content/Context;Ljava/lang/Class;Ljava/lang/String;)Landroid/content/Intent;

    move-result-object v0

    invoke-virtual {p0, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    return-void
.end method

.method private switchPlatform(I)V
    .registers 6

    const-string/jumbo v0, "MideaSwitchPlatform"

    new-instance v1, Ljava/lang/StringBuilder;

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

    const-string/jumbo v2, "switchPlatform = "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/cmcm/xiaobao/phone/commons/log/LogUtil;->d(Ljava/lang/String;Ljava/lang/String;)V

    invoke-static {}, Lcom/sdk/orion/orion/OrionClient;->getInstance()Lcom/sdk/orion/orion/OrionClient;

    move-result-object v0

    const-string/jumbo v1, "/SmartHome/setMideaPlatform"

    new-instance v2, Lcom/cmcm/xiaobao/phone/smarthome/model/PlatformId;

    invoke-direct {v2, p1}, Lcom/cmcm/xiaobao/phone/smarthome/model/PlatformId;-><init>(I)V

    new-instance v3, Lcom/cmcm/xiaobao/phone/smarthome/base/MideaSwitchPlatformFragment$1;

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

    invoke-virtual {v0, v1, v2, v3}, Lcom/sdk/orion/orion/OrionClient;->getSmartHomeSdk(Ljava/lang/String;Ljava/lang/Object;Lcom/sdk/orion/callback/ContentCallBack;)V

    return-void
.end method


# virtual methods
.method protected getLayoutId()I
    .registers 2

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

    return v0
.end method

.method protected initView()V
    .registers 2

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

    invoke-virtual {p0, v0}, Lcom/cmcm/xiaobao/phone/smarthome/base/MideaSwitchPlatformFragment;->findViewById(I)Landroid/view/View;

    move-result-object v0

    invoke-virtual {v0, p0}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

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

    invoke-virtual {p0, v0}, Lcom/cmcm/xiaobao/phone/smarthome/base/MideaSwitchPlatformFragment;->findViewById(I)Landroid/view/View;

    move-result-object v0

    invoke-virtual {v0, p0}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    return-void
.end method

.method public onClick(Landroid/view/View;)V
    .registers 6

    const/16 v3, 0x8

    const/4 v2, 0x0

    invoke-virtual {p1}, Landroid/view/View;->getId()I

    move-result v0

    sget v1, Lcom/cmcm/xiaobao/phone/smarthome/R$id;->rl_midea:I

    if-ne v0, v1, :cond_2f

    const/16 v0, 0xb

    invoke-direct {p0, v0}, Lcom/cmcm/xiaobao/phone/smarthome/base/MideaSwitchPlatformFragment;->switchPlatform(I)V

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

    invoke-virtual {p0, v0}, Lcom/cmcm/xiaobao/phone/smarthome/base/MideaSwitchPlatformFragment;->findViewById(I)Landroid/view/View;

    move-result-object v0

    invoke-virtual {v0, v3}, Landroid/view/View;->setVisibility(I)V

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

    invoke-virtual {p0, v0}, Lcom/cmcm/xiaobao/phone/smarthome/base/MideaSwitchPlatformFragment;->findViewById(I)Landroid/view/View;

    move-result-object v0

    invoke-virtual {v0, v2}, Landroid/view/View;->setVisibility(I)V

    :goto_22
    iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/base/MideaSwitchPlatformFragment;->mActivity:Landroid/app/Activity;

    const/4 v1, 0x0

    const-string/jumbo v2, "\u5207\u6362\u4e2d"

    invoke-static {v0, v1, v2}, Landroid/app/ProgressDialog;->show(Landroid/content/Context;Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Landroid/app/ProgressDialog;

    move-result-object v0

    iput-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/base/MideaSwitchPlatformFragment;->mProgressDialog:Landroid/app/ProgressDialog;

    :cond_2e
    return-void

    :cond_2f
    sget v1, Lcom/cmcm/xiaobao/phone/smarthome/R$id;->rl_mismart:I

    if-ne v0, v1, :cond_2e

    const/16 v0, 0xc

    invoke-direct {p0, v0}, Lcom/cmcm/xiaobao/phone/smarthome/base/MideaSwitchPlatformFragment;->switchPlatform(I)V

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

    invoke-virtual {p0, v0}, Lcom/cmcm/xiaobao/phone/smarthome/base/MideaSwitchPlatformFragment;->findViewById(I)Landroid/view/View;

    move-result-object v0

    invoke-virtual {v0, v3}, Landroid/view/View;->setVisibility(I)V

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

    invoke-virtual {p0, v0}, Lcom/cmcm/xiaobao/phone/smarthome/base/MideaSwitchPlatformFragment;->findViewById(I)Landroid/view/View;

    move-result-object v0

    invoke-virtual {v0, v2}, Landroid/view/View;->setVisibility(I)V

    goto :goto_22
.end method