.class Lcom/viatech/camera/CameraControlView$3; .super Ljava/lang/Object; .source "CameraControlView.java" # interfaces .implements Lcom/viatech/util/NetworkListener$DeviceFoundCallBack; # annotations .annotation system Ldalvik/annotation/EnclosingClass; value = Lcom/viatech/camera/CameraControlView; .end annotation .annotation system Ldalvik/annotation/InnerClass; accessFlags = 0x0 name = null .end annotation # instance fields .field final synthetic this$0:Lcom/viatech/camera/CameraControlView; # direct methods .method constructor (Lcom/viatech/camera/CameraControlView;)V .locals 0 .prologue .line 754 iput-object p1, p0, Lcom/viatech/camera/CameraControlView$3;->this$0:Lcom/viatech/camera/CameraControlView; invoke-direct {p0}, Ljava/lang/Object;->()V return-void .end method # virtual methods .method public deviceNotify(Ljava/util/ArrayList;Z)V .locals 10 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/ArrayList", "<", "Lcom/viatech/device/VPaiDevice;", ">;Z)V" } .end annotation .prologue const/16 v9, 0x3e9 const/4 v2, 0x0 const/4 v1, 0x0 const/16 v8, 0x3ea const/4 v3, 0x1 .line 758 invoke-virtual {p1}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator; move-result-object v4 :goto_0 invoke-interface {v4}, Ljava/util/Iterator;->hasNext()Z move-result v0 if-eqz v0, :cond_0 invoke-interface {v4}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v0 check-cast v0, Lcom/viatech/device/VPaiDevice; .line 759 const-string v5, "Vpai_CameraControlView" new-instance v6, Ljava/lang/StringBuilder; invoke-direct {v6}, Ljava/lang/StringBuilder;->()V const-string v7, "DeviceFoundCallBack >>>>> deviceNotify: device: " invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v6 invoke-virtual {v6, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; move-result-object v0 invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v0 invoke-static {v5, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I goto :goto_0 .line 762 :cond_0 invoke-virtual {p1}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator; move-result-object v4 :cond_1 invoke-interface {v4}, Ljava/util/Iterator;->hasNext()Z move-result v0 if-eqz v0, :cond_d invoke-interface {v4}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v0 check-cast v0, Lcom/viatech/device/VPaiDevice; .line 763 invoke-virtual {v0}, Lcom/viatech/device/VPaiDevice;->isUSBDevice()Z move-result v5 if-eqz v5, :cond_1 .line 764 const-string v4, "Vpai_CameraControlView" new-instance v5, Ljava/lang/StringBuilder; invoke-direct {v5}, Ljava/lang/StringBuilder;->()V const-string v6, "find new usb device:" invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v5 invoke-virtual {v0}, Lcom/viatech/device/VPaiDevice;->toString()Ljava/lang/String; move-result-object v6 invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v5 invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v5 invoke-static {v4, v5}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I .line 770 :goto_1 iget-object v4, p0, Lcom/viatech/camera/CameraControlView$3;->this$0:Lcom/viatech/camera/CameraControlView; invoke-virtual {v4}, Lcom/viatech/camera/CameraControlView;->getContext()Landroid/content/Context; move-result-object v4 invoke-static {v4}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences; move-result-object v4 .line 771 const-string v5, "player_interactive_mode" const/4 v6, 0x3 invoke-interface {v4, v5, v6}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I move-result v4 .line 774 const/4 v5, 0x2 if-ne v4, v5, :cond_3 move v4, v3 .line 781 :goto_2 iget-object v5, p0, Lcom/viatech/camera/CameraControlView$3;->this$0:Lcom/viatech/camera/CameraControlView; invoke-static {v5}, Lcom/viatech/camera/CameraControlView;->access$4300(Lcom/viatech/camera/CameraControlView;)Lcom/viatech/widget/HorizontalImageText; move-result-object v5 invoke-virtual {v5, v4}, Lcom/viatech/widget/HorizontalImageText;->setSelect(Z)V .line 782 iget-object v5, p0, Lcom/viatech/camera/CameraControlView$3;->this$0:Lcom/viatech/camera/CameraControlView; invoke-static {v5}, Lcom/viatech/camera/CameraControlView;->access$4400(Lcom/viatech/camera/CameraControlView;)Lcom/viatech/widget/HorizontalImageText; move-result-object v5 invoke-virtual {v5, v2}, Lcom/viatech/widget/HorizontalImageText;->setSelect(Z)V .line 783 iget-object v5, p0, Lcom/viatech/camera/CameraControlView$3;->this$0:Lcom/viatech/camera/CameraControlView; invoke-static {v5, v4, v2}, Lcom/viatech/camera/CameraControlView;->access$4500(Lcom/viatech/camera/CameraControlView;ZZ)V .line 785 if-eqz v0, :cond_4 .line 786 invoke-virtual {v0}, Lcom/viatech/device/VPaiDevice;->needConnect()Z move-result v1 if-eqz v1, :cond_2 .line 787 iget-object v1, p0, Lcom/viatech/camera/CameraControlView$3;->this$0:Lcom/viatech/camera/CameraControlView; iget-object v1, v1, Lcom/viatech/camera/CameraControlView;->mHandler:Landroid/os/Handler; invoke-virtual {v1, v9}, Landroid/os/Handler;->removeMessages(I)V .line 788 iget-object v1, p0, Lcom/viatech/camera/CameraControlView$3;->this$0:Lcom/viatech/camera/CameraControlView; iget-object v1, v1, Lcom/viatech/camera/CameraControlView;->mHandler:Landroid/os/Handler; invoke-virtual {v1, v8}, Landroid/os/Handler;->removeMessages(I)V .line 789 iget-object v1, p0, Lcom/viatech/camera/CameraControlView$3;->this$0:Lcom/viatech/camera/CameraControlView; iget-object v1, v1, Lcom/viatech/camera/CameraControlView;->mHandler:Landroid/os/Handler; invoke-virtual {v1, v8, v0}, Landroid/os/Handler;->obtainMessage(ILjava/lang/Object;)Landroid/os/Message; move-result-object v0 .line 790 iget-object v1, p0, Lcom/viatech/camera/CameraControlView$3;->this$0:Lcom/viatech/camera/CameraControlView; iget-object v1, v1, Lcom/viatech/camera/CameraControlView;->mHandler:Landroid/os/Handler; invoke-virtual {v1, v0}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z .line 852 :cond_2 :goto_3 return-void .line 777 :cond_3 if-ne v4, v3, :cond_c move v4, v2 move v2, v3 .line 779 goto :goto_2 .line 795 :cond_4 sget-object v0, Lcom/viatech/camera/CameraControlView;->mCurVPaiDevice:Lcom/viatech/device/VPaiDevice; if-eqz v0, :cond_5 sget-object v0, Lcom/viatech/camera/CameraControlView;->mCurVPaiDevice:Lcom/viatech/device/VPaiDevice; invoke-virtual {v0}, Lcom/viatech/device/VPaiDevice;->isUSBDevice()Z move-result v0 if-eqz v0, :cond_5 iget-object v0, p0, Lcom/viatech/camera/CameraControlView$3;->this$0:Lcom/viatech/camera/CameraControlView; invoke-static {v0, v3, v3}, Lcom/viatech/camera/CameraControlView;->access$2300(Lcom/viatech/camera/CameraControlView;ZZ)Z move-result v0 if-nez v0, :cond_2 .line 801 :cond_5 iget-object v0, p0, Lcom/viatech/camera/CameraControlView$3;->this$0:Lcom/viatech/camera/CameraControlView; invoke-virtual {v0}, Lcom/viatech/camera/CameraControlView;->getContext()Landroid/content/Context; move-result-object v0 invoke-static {v0}, Lcom/viatech/util/WifiHideAPI;->isWifiApEnabled(Landroid/content/Context;)Z move-result v0 if-nez v0, :cond_b .line 802 iget-object v0, p0, Lcom/viatech/camera/CameraControlView$3;->this$0:Lcom/viatech/camera/CameraControlView; invoke-virtual {v0}, Lcom/viatech/camera/CameraControlView;->getContext()Landroid/content/Context; move-result-object v0 const-string v2, "connectivity" .line 803 invoke-virtual {v0, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object; move-result-object v0 check-cast v0, Landroid/net/ConnectivityManager; .line 804 if-eqz v0, :cond_b .line 805 invoke-virtual {v0}, Landroid/net/ConnectivityManager;->getActiveNetworkInfo()Landroid/net/NetworkInfo; move-result-object v0 .line 806 if-eqz v0, :cond_2 .line 807 invoke-virtual {v0}, Landroid/net/NetworkInfo;->getExtraInfo()Ljava/lang/String; move-result-object v0 .line 808 if-eqz v0, :cond_a .line 809 const-string v2, "720vpai-" const-string v3, "" invoke-virtual {v0, v2, v3}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String; move-result-object v0 .line 810 const-string v2, "\"" const-string v3, " " invoke-virtual {v0, v2, v3}, Ljava/lang/String;->replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; move-result-object v0 .line 811 invoke-virtual {v0}, Ljava/lang/String;->trim()Ljava/lang/String; move-result-object v0 move-object v2, v0 .line 823 :goto_4 if-eqz v2, :cond_7 invoke-virtual {v2}, Ljava/lang/String;->isEmpty()Z move-result v0 if-nez v0, :cond_7 .line 824 invoke-virtual {p1}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator; move-result-object v3 :cond_6 invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z move-result v0 if-eqz v0, :cond_7 invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v0 check-cast v0, Lcom/viatech/device/VPaiDevice; .line 825 iget-object v4, v0, Lcom/viatech/device/VPaiDevice;->serialNo:Ljava/lang/String; const-string v5, "" if-eq v4, v5, :cond_6 iget-object v4, v0, Lcom/viatech/device/VPaiDevice;->name:Ljava/lang/String; const-string v5, "" if-eq v4, v5, :cond_6 .line 826 const-string v4, "Vpai_CameraControlView" new-instance v5, Ljava/lang/StringBuilder; invoke-direct {v5}, Ljava/lang/StringBuilder;->()V const-string v6, "info.serialNo = " invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v5 iget-object v6, v0, Lcom/viatech/device/VPaiDevice;->serialNo:Ljava/lang/String; invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v5 const-string v6, " info.name = " invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v5 iget-object v6, v0, Lcom/viatech/device/VPaiDevice;->name:Ljava/lang/String; invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v5 invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v5 invoke-static {v4, v5}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I .line 827 iget-object v4, v0, Lcom/viatech/device/VPaiDevice;->serialNo:Ljava/lang/String; invoke-virtual {v4, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z move-result v4 if-eqz v4, :cond_6 move-object v1, v0 .line 836 :cond_7 if-nez v1, :cond_9 .line 837 invoke-virtual {p1}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator; move-result-object v2 :cond_8 invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z move-result v0 if-eqz v0, :cond_9 invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v0 check-cast v0, Lcom/viatech/device/VPaiDevice; .line 838 iget-object v3, v0, Lcom/viatech/device/VPaiDevice;->serialNo:Ljava/lang/String; const-string v4, "" if-eq v3, v4, :cond_8 iget-object v3, v0, Lcom/viatech/device/VPaiDevice;->name:Ljava/lang/String; const-string v4, "" if-eq v3, v4, :cond_8 .line 844 :goto_5 if-eqz v0, :cond_2 iget-object v1, p0, Lcom/viatech/camera/CameraControlView$3;->this$0:Lcom/viatech/camera/CameraControlView; invoke-static {v1}, Lcom/viatech/camera/CameraControlView;->access$4600(Lcom/viatech/camera/CameraControlView;)Z move-result v1 if-nez v1, :cond_2 invoke-virtual {v0}, Lcom/viatech/device/VPaiDevice;->needConnect()Z move-result v1 if-eqz v1, :cond_2 .line 845 const-string v1, "Vpai_CameraControlView" new-instance v2, Ljava/lang/StringBuilder; invoke-direct {v2}, Ljava/lang/StringBuilder;->()V const-string v3, "need open new VPaiDevice:" invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v2 invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; move-result-object v2 invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v2 invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I .line 846 iget-object v1, p0, Lcom/viatech/camera/CameraControlView$3;->this$0:Lcom/viatech/camera/CameraControlView; iget-object v1, v1, Lcom/viatech/camera/CameraControlView;->mHandler:Landroid/os/Handler; invoke-virtual {v1, v9}, Landroid/os/Handler;->removeMessages(I)V .line 847 iget-object v1, p0, Lcom/viatech/camera/CameraControlView$3;->this$0:Lcom/viatech/camera/CameraControlView; iget-object v1, v1, Lcom/viatech/camera/CameraControlView;->mHandler:Landroid/os/Handler; invoke-virtual {v1, v8}, Landroid/os/Handler;->removeMessages(I)V .line 849 iget-object v1, p0, Lcom/viatech/camera/CameraControlView$3;->this$0:Lcom/viatech/camera/CameraControlView; iget-object v1, v1, Lcom/viatech/camera/CameraControlView;->mHandler:Landroid/os/Handler; invoke-virtual {v1, v8, v0}, Landroid/os/Handler;->obtainMessage(ILjava/lang/Object;)Landroid/os/Message; move-result-object v0 .line 850 iget-object v1, p0, Lcom/viatech/camera/CameraControlView$3;->this$0:Lcom/viatech/camera/CameraControlView; iget-object v1, v1, Lcom/viatech/camera/CameraControlView;->mHandler:Landroid/os/Handler; invoke-virtual {v1, v0}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z goto/16 :goto_3 :cond_9 move-object v0, v1 goto :goto_5 :cond_a move-object v2, v0 goto/16 :goto_4 :cond_b move-object v2, v1 goto/16 :goto_4 :cond_c move v2, v3 move v4, v3 goto/16 :goto_2 :cond_d move-object v0, v1 goto/16 :goto_1 .end method