.class Lcom/viatech/camera/SettingActivity$14; .super Ljava/lang/Object; .source "SettingActivity.java" # interfaces .implements Ljava/lang/Runnable; # annotations .annotation system Ldalvik/annotation/EnclosingMethod; value = Lcom/viatech/camera/SettingActivity;->authorization(Ljava/lang/String;Ljava/lang/String;)V .end annotation .annotation system Ldalvik/annotation/InnerClass; accessFlags = 0x0 name = null .end annotation # instance fields .field final synthetic this$0:Lcom/viatech/camera/SettingActivity; .field final synthetic val$key:Ljava/lang/String; .field final synthetic val$manufactory:Ljava/lang/String; # direct methods .method constructor (Lcom/viatech/camera/SettingActivity;Ljava/lang/String;Ljava/lang/String;)V .locals 0 .prologue .line 925 iput-object p1, p0, Lcom/viatech/camera/SettingActivity$14;->this$0:Lcom/viatech/camera/SettingActivity; iput-object p2, p0, Lcom/viatech/camera/SettingActivity$14;->val$manufactory:Ljava/lang/String; iput-object p3, p0, Lcom/viatech/camera/SettingActivity$14;->val$key:Ljava/lang/String; invoke-direct {p0}, Ljava/lang/Object;->()V return-void .end method # virtual methods .method public run()V .locals 6 .prologue .line 928 const/4 v0, 0x0 .line 929 invoke-static {}, Lcom/viatech/camera/RemoteCameraConnectManager;->instance()Lcom/viatech/camera/RemoteCameraConnectManager; move-result-object v1 if-eqz v1, :cond_0 .line 930 iget-object v0, p0, Lcom/viatech/camera/SettingActivity$14;->this$0:Lcom/viatech/camera/SettingActivity; invoke-static {v0}, Lcom/viatech/camera/SettingActivity;->access$700(Lcom/viatech/camera/SettingActivity;)Lcom/viatech/device/VPaiDevice; move-result-object v0 iget-object v0, v0, Lcom/viatech/device/VPaiDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; .line 932 :cond_0 const-string v1, "VPAI_SettingActivity" new-instance v2, Ljava/lang/StringBuilder; invoke-direct {v2}, Ljava/lang/StringBuilder;->()V const-string v3, " >> authorization manufactory:" invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v2 iget-object v3, p0, Lcom/viatech/camera/SettingActivity$14;->val$manufactory:Ljava/lang/String; invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v2 const-string v3, ", key:" invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v2 iget-object v3, p0, Lcom/viatech/camera/SettingActivity$14;->val$key:Ljava/lang/String; invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v2 const-string v3, ", devinfo:" 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 933 if-nez v0, :cond_2 .line 934 const v0, 0x7f0701a6 invoke-static {v0}, Lcom/viatech/VPaiApplication;->b(I)V .line 962 :cond_1 :goto_0 return-void .line 937 :cond_2 const-string v1, "http://api.720vpai.com/api/" .line 938 new-instance v2, Lorg/apache/a/b/a/g; invoke-direct {v2, v1}, Lorg/apache/a/b/a/g;->(Ljava/lang/String;)V .line 939 const-string v1, "Content-Type" const-string v3, "text/plain; charset=utf-8" invoke-virtual {v2, v1, v3}, Lorg/apache/a/b/a/g;->addHeader(Ljava/lang/String;Ljava/lang/String;)V .line 940 const-string v1, "devicereg{\"serialnum\":\"%s\", \"manufactor\":\"%s\", \"version\":\"%s\", \"model\":\"%s\", \"product\":\"%s\", \"key\":\"%s\"}" const/4 v3, 0x6 new-array v3, v3, [Ljava/lang/Object; const/4 v4, 0x0 iget-object v5, v0, Lcom/viatech/device/DeviceInfo;->deviceid:Ljava/lang/String; aput-object v5, v3, v4 const/4 v4, 0x1 iget-object v5, p0, Lcom/viatech/camera/SettingActivity$14;->val$manufactory:Ljava/lang/String; aput-object v5, v3, v4 const/4 v4, 0x2 iget v5, v0, Lcom/viatech/device/DeviceInfo;->version:I .line 942 invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer; move-result-object v5 aput-object v5, v3, v4 const/4 v4, 0x3 iget-object v5, v0, Lcom/viatech/device/DeviceInfo;->module:Ljava/lang/String; aput-object v5, v3, v4 const/4 v4, 0x4 iget-object v0, v0, Lcom/viatech/device/DeviceInfo;->product:Ljava/lang/String; aput-object v0, v3, v4 const/4 v0, 0x5 iget-object v4, p0, Lcom/viatech/camera/SettingActivity$14;->val$key:Ljava/lang/String; aput-object v4, v3, v0 .line 940 invoke-static {v1, v3}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; move-result-object v0 .line 944 :try_start_0 const-string v1, "VPAI_SettingActivity" new-instance v3, Ljava/lang/StringBuilder; invoke-direct {v3}, Ljava/lang/StringBuilder;->()V const-string v4, "authorization >> httpRequest, entity:" invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v3 invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v3 invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v3 invoke-static {v1, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I .line 945 new-instance v1, Lorg/apache/a/e/g; const-string v3, "utf-8" invoke-direct {v1, v0, v3}, Lorg/apache/a/e/g;->(Ljava/lang/String;Ljava/lang/String;)V invoke-virtual {v2, v1}, Lorg/apache/a/b/a/g;->setEntity(Lorg/apache/a/j;)V .line 946 new-instance v0, Lorg/apache/a/f/b/h; invoke-direct {v0}, Lorg/apache/a/f/b/h;->()V invoke-virtual {v0, v2}, Lorg/apache/a/f/b/h;->execute(Lorg/apache/a/b/a/k;)Lorg/apache/a/r; move-result-object v0 .line 947 const-string v1, "VPAI_SettingActivity" new-instance v2, Ljava/lang/StringBuilder; invoke-direct {v2}, Ljava/lang/StringBuilder;->()V const-string v3, "authorization >> getStatusCode:" invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v2 invoke-interface {v0}, Lorg/apache/a/r;->a()Lorg/apache/a/ad; move-result-object v3 invoke-interface {v3}, Lorg/apache/a/ad;->b()I move-result v3 invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(I)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 948 invoke-interface {v0}, Lorg/apache/a/r;->a()Lorg/apache/a/ad; move-result-object v1 invoke-interface {v1}, Lorg/apache/a/ad;->b()I move-result v1 const/16 v2, 0xc8 if-ne v1, v2, :cond_1 .line 949 invoke-interface {v0}, Lorg/apache/a/r;->b()Lorg/apache/a/j; move-result-object v0 const-string v1, "utf-8" invoke-static {v0, v1}, Lorg/apache/a/k/d;->a(Lorg/apache/a/j;Ljava/lang/String;)Ljava/lang/String; move-result-object v0 .line 950 const-string v1, "VPAI_SettingActivity" new-instance v2, Ljava/lang/StringBuilder; invoke-direct {v2}, Ljava/lang/StringBuilder;->()V const-string v3, "authorization >> strResult:" 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/String;)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 951 new-instance v1, Landroid/os/Message; invoke-direct {v1}, Landroid/os/Message;->()V .line 952 const/16 v2, 0x64 iput v2, v1, Landroid/os/Message;->what:I .line 953 invoke-virtual {v1}, Landroid/os/Message;->getData()Landroid/os/Bundle; move-result-object v2 const-string v3, "manufactory" iget-object v4, p0, Lcom/viatech/camera/SettingActivity$14;->val$manufactory:Ljava/lang/String; invoke-virtual {v2, v3, v4}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V .line 954 invoke-virtual {v1}, Landroid/os/Message;->getData()Landroid/os/Bundle; move-result-object v2 const-string v3, "data" invoke-virtual {v2, v3, v0}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V .line 955 iget-object v0, p0, Lcom/viatech/camera/SettingActivity$14;->this$0:Lcom/viatech/camera/SettingActivity; iget-object v0, v0, Lcom/viatech/camera/SettingActivity;->mHandler:Landroid/os/Handler; invoke-virtual {v0, v1}, Landroid/os/Handler;->sendMessage(Landroid/os/Message;)Z :try_end_0 .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0 goto/16 :goto_0 .line 959 :catch_0 move-exception v0 .line 960 invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V goto/16 :goto_0 .end method