SmartHomeFeedbackFragment.smali
.class public Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment;
.super Lcom/cmcm/xiaobao/phone/smarthome/baseui/BaseFragment;
# instance fields
.field private mActionEt:Landroid/widget/EditText;
.field private mLocationEt:Landroid/widget/EditText;
.field private mSubmitTv:Landroid/widget/TextView;
.field private mTypeEt:Landroid/widget/EditText;
# 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/SmartHomeFeedbackFragment;)Landroid/app/Activity;
.registers 2
iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment;->mActivity:Landroid/app/Activity;
return-object v0
.end method
.method static synthetic access$100(Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment;)Z
.registers 2
invoke-direct {p0}, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment;->isEditTextEmpty()Z
move-result v0
return v0
.end method
.method static synthetic access$200(Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment;)Landroid/widget/TextView;
.registers 2
iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment;->mSubmitTv:Landroid/widget/TextView;
return-object v0
.end method
.method private handleInput(Landroid/widget/EditText;)V
.registers 3
new-instance v0, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment$3;
invoke-direct {v0, p0}, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment$3;-><init>(Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment;)V
invoke-virtual {p1, v0}, Landroid/widget/EditText;->addTextChangedListener(Landroid/text/TextWatcher;)V
return-void
.end method
.method private isEditTextEmpty()Z
.registers 2
iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment;->mActionEt:Landroid/widget/EditText;
invoke-virtual {p0, v0}, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment;->isEditTextEmpty(Landroid/widget/EditText;)Z
move-result v0
if-nez v0, :cond_18
iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment;->mLocationEt:Landroid/widget/EditText;
invoke-virtual {p0, v0}, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment;->isEditTextEmpty(Landroid/widget/EditText;)Z
move-result v0
if-nez v0, :cond_18
iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment;->mTypeEt:Landroid/widget/EditText;
invoke-virtual {p0, v0}, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment;->isEditTextEmpty(Landroid/widget/EditText;)Z
move-result v0
if-eqz v0, :cond_1a
:cond_18
const/4 v0, 0x1
:goto_19
return v0
:cond_1a
const/4 v0, 0x0
goto :goto_19
.end method
# virtual methods
.method protected getLayoutId()I
.registers 2
sget v0, Lcom/cmcm/xiaobao/phone/smarthome/R$layout;->sh_sdk_feedback_fragment:I
return v0
.end method
.method protected initView()V
.registers 3
iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment;->mActivity:Landroid/app/Activity;
invoke-virtual {v0}, Landroid/app/Activity;->getWindow()Landroid/view/Window;
move-result-object v0
const/16 v1, 0x12
invoke-virtual {v0, v1}, Landroid/view/Window;->setSoftInputMode(I)V
sget v0, Lcom/cmcm/xiaobao/phone/smarthome/R$id;->et_type:I
invoke-virtual {p0, v0}, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/EditText;
iput-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment;->mTypeEt:Landroid/widget/EditText;
sget v0, Lcom/cmcm/xiaobao/phone/smarthome/R$id;->et_location:I
invoke-virtual {p0, v0}, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/EditText;
iput-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment;->mLocationEt:Landroid/widget/EditText;
sget v0, Lcom/cmcm/xiaobao/phone/smarthome/R$id;->et_action:I
invoke-virtual {p0, v0}, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/EditText;
iput-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment;->mActionEt:Landroid/widget/EditText;
sget v0, Lcom/cmcm/xiaobao/phone/smarthome/R$id;->tv_submit:I
invoke-virtual {p0, v0}, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/TextView;
iput-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment;->mSubmitTv:Landroid/widget/TextView;
iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment;->mTypeEt:Landroid/widget/EditText;
invoke-direct {p0, v0}, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment;->handleInput(Landroid/widget/EditText;)V
iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment;->mLocationEt:Landroid/widget/EditText;
invoke-direct {p0, v0}, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment;->handleInput(Landroid/widget/EditText;)V
iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment;->mActionEt:Landroid/widget/EditText;
invoke-direct {p0, v0}, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment;->handleInput(Landroid/widget/EditText;)V
iget-object v0, p0, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment;->mSubmitTv:Landroid/widget/TextView;
new-instance v1, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment$1;
invoke-direct {v1, p0}, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment$1;-><init>(Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment;)V
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V
return-void
.end method
.method public submitFeedback()V
.registers 7
invoke-static {}, Lcom/sdk/orion/orion/OrionClient;->getInstance()Lcom/sdk/orion/orion/OrionClient;
move-result-object v0
const-string/jumbo v1, "/SmartHome/broadLinkFeedbackProblem"
new-instance v2, Lcom/cmcm/xiaobao/phone/smarthome/model/BLFeedback;
iget-object v3, p0, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment;->mTypeEt:Landroid/widget/EditText;
invoke-virtual {p0, v3}, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment;->getEditTextString(Landroid/widget/EditText;)Ljava/lang/String;
move-result-object v3
iget-object v4, p0, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment;->mLocationEt:Landroid/widget/EditText;
invoke-virtual {p0, v4}, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment;->getEditTextString(Landroid/widget/EditText;)Ljava/lang/String;
move-result-object v4
iget-object v5, p0, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment;->mActionEt:Landroid/widget/EditText;
invoke-virtual {p0, v5}, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment;->getEditTextString(Landroid/widget/EditText;)Ljava/lang/String;
move-result-object v5
invoke-direct {v2, v3, v4, v5}, Lcom/cmcm/xiaobao/phone/smarthome/model/BLFeedback;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
new-instance v3, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment$2;
invoke-direct {v3, p0}, Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment$2;-><init>(Lcom/cmcm/xiaobao/phone/smarthome/SmartHomeFeedbackFragment;)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