WebViewFragment$SimpleJavaScriptInterface.smali
.class Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment$SimpleJavaScriptInterface;
.super Ljava/lang/Object;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = "SimpleJavaScriptInterface"
.end annotation
# instance fields
.field final synthetic this$0:Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;
# direct methods
.method constructor <init>(Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;)V
.registers 2
iput-object p1, p0, Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment$SimpleJavaScriptInterface;->this$0:Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public getIframeSrc(Ljava/lang/String;)V
.registers 6
.annotation runtime Landroid/webkit/JavascriptInterface;
.end annotation
iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment$SimpleJavaScriptInterface;->this$0:Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;
# invokes: Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;->parseData(Ljava/lang/String;)Lcom/cmcm/xiaobao/phone/smarthome/skill/MideaApiSkill$ResponseData;
invoke-static {v0, p1}, Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;->access$200(Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;Ljava/lang/String;)Lcom/cmcm/xiaobao/phone/smarthome/skill/MideaApiSkill$ResponseData;
move-result-object v0
if-nez v0, :cond_9
:goto_8
return-void
:cond_9
const/16 v1, 0xc8
const/4 v2, 0x1
iget v3, v0, Lcom/cmcm/xiaobao/phone/smarthome/skill/MideaApiSkill$ResponseData;->code:I
if-ne v3, v1, :cond_4d
iget-object v1, v0, Lcom/cmcm/xiaobao/phone/smarthome/skill/MideaApiSkill$ResponseData;->data:Lcom/cmcm/xiaobao/phone/smarthome/skill/MideaApiSkill$SkillBindState;
iget v1, v1, Lcom/cmcm/xiaobao/phone/smarthome/skill/MideaApiSkill$SkillBindState;->bind:I
if-ne v1, v2, :cond_4d
iget-object v1, p0, Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment$SimpleJavaScriptInterface;->this$0:Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;
sget v2, Lcom/cmcm/xiaobao/phone/smarthome/R$string;->orion_sdk_smarthome_bind_success:I
invoke-virtual {v1, v2}, Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;->getString(I)Ljava/lang/String;
move-result-object v1
invoke-static {v1}, Lcom/sdk/orion/utils/ToastUtil;->showToast(Ljava/lang/String;)V
const-string/jumbo v1, "msmart"
iget-object v0, v0, Lcom/cmcm/xiaobao/phone/smarthome/skill/MideaApiSkill$ResponseData;->data:Lcom/cmcm/xiaobao/phone/smarthome/skill/MideaApiSkill$SkillBindState;
iget-object v0, v0, Lcom/cmcm/xiaobao/phone/smarthome/skill/MideaApiSkill$SkillBindState;->type:Ljava/lang/String;
invoke-static {v1, v0}, Landroid/text/TextUtils;->equals(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_43
iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment$SimpleJavaScriptInterface;->this$0:Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;
# getter for: Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;->mActivity:Landroid/app/Activity;
invoke-static {v0}, Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;->access$300(Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;)Landroid/app/Activity;
move-result-object v0
iget-object v1, p0, Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment$SimpleJavaScriptInterface;->this$0:Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;
# getter for: Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;->mActivity:Landroid/app/Activity;
invoke-static {v1}, Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;->access$400(Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;)Landroid/app/Activity;
move-result-object v1
sget v2, Lcom/cmcm/xiaobao/phone/smarthome/R$string;->midea_switch_platform:I
invoke-virtual {v1, v2}, Landroid/app/Activity;->getString(I)Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Lcom/cmcm/xiaobao/phone/smarthome/base/MideaSwitchPlatformFragment;->startPage(Landroid/content/Context;Ljava/lang/String;)V
:cond_43
iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment$SimpleJavaScriptInterface;->this$0:Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;
# getter for: Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;->mActivity:Landroid/app/Activity;
invoke-static {v0}, Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;->access$500(Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;)Landroid/app/Activity;
move-result-object v0
invoke-virtual {v0}, Landroid/app/Activity;->finish()V
goto :goto_8
:cond_4d
iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment$SimpleJavaScriptInterface;->this$0:Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;
sget v1, Lcom/cmcm/xiaobao/phone/smarthome/R$string;->orion_sdk_smarthome_bind_error:I
invoke-virtual {v0, v1}, Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;->getString(I)Ljava/lang/String;
move-result-object v0
invoke-static {v0}, Lcom/sdk/orion/utils/ToastUtil;->showToast(Ljava/lang/String;)V
iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment$SimpleJavaScriptInterface;->this$0:Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;
invoke-virtual {v0}, Lcom/cmcm/xiaobao/phone/smarthome/widget/web/WebViewFragment;->loadData()V
goto :goto_8
.end method