今奥全景相机
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

549 lines
16 KiB

.class Lcom/viatech/update/UpgradeDeviceActivity$1;
.super Landroid/content/BroadcastReceiver;
.source "UpgradeDeviceActivity.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/viatech/update/UpgradeDeviceActivity;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = null
.end annotation
# instance fields
.field final synthetic this$0:Lcom/viatech/update/UpgradeDeviceActivity;
# direct methods
.method constructor <init>(Lcom/viatech/update/UpgradeDeviceActivity;)V
.locals 0
.prologue
.line 170
iput-object p1, p0, Lcom/viatech/update/UpgradeDeviceActivity$1;->this$0:Lcom/viatech/update/UpgradeDeviceActivity;
invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V
return-void
.end method
# virtual methods
.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
.locals 13
.prologue
const/16 v12, 0x3f1
const/4 v11, 0x6
const/4 v10, 0x4
const/4 v2, 0x1
const/4 v3, 0x0
.line 173
const-string v0, "Vpai_Upgrade"
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "## BroadcastReceiver, bUSBDevice: ["
invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
iget-object v4, p0, Lcom/viatech/update/UpgradeDeviceActivity$1;->this$0:Lcom/viatech/update/UpgradeDeviceActivity;
invoke-static {v4}, Lcom/viatech/update/UpgradeDeviceActivity;->access$000(Lcom/viatech/update/UpgradeDeviceActivity;)Z
move-result v4
invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
move-result-object v1
const-string v4, "], received:"
invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)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}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 174
iget-object v0, p0, Lcom/viatech/update/UpgradeDeviceActivity$1;->this$0:Lcom/viatech/update/UpgradeDeviceActivity;
invoke-static {v0}, Lcom/viatech/update/UpgradeDeviceActivity;->access$000(Lcom/viatech/update/UpgradeDeviceActivity;)Z
move-result v0
if-eqz v0, :cond_4
.line 175
const-string v0, "android.hardware.usb.action.USB_DEVICE_DETACHED"
invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-nez v0, :cond_0
const-string v0, "android.hardware.usb.action.USB_DEVICE_ATTACHED"
.line 176
invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_4
.line 177
:cond_0
const-string v0, "device"
invoke-virtual {p2, v0}, Landroid/content/Intent;->getParcelableExtra(Ljava/lang/String;)Landroid/os/Parcelable;
move-result-object v0
check-cast v0, Landroid/hardware/usb/UsbDevice;
.line 178
if-eqz v0, :cond_4
.line 179
invoke-virtual {v0}, Landroid/hardware/usb/UsbDevice;->getVendorId()I
move-result v4
.line 180
invoke-virtual {v0}, Landroid/hardware/usb/UsbDevice;->getProductId()I
move-result v5
.line 182
iget-object v1, p0, Lcom/viatech/update/UpgradeDeviceActivity$1;->this$0:Lcom/viatech/update/UpgradeDeviceActivity;
invoke-static {v1}, Lcom/viatech/update/UpgradeDeviceActivity;->access$100(Lcom/viatech/update/UpgradeDeviceActivity;)Ljava/util/ArrayList;
move-result-object v1
invoke-virtual {v1}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;
move-result-object v6
:cond_1
invoke-interface {v6}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_9
invoke-interface {v6}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, [I
.line 183
const-string v7, "Vpai_Upgrade"
new-instance v8, Ljava/lang/StringBuilder;
invoke-direct {v8}, Ljava/lang/StringBuilder;-><init>()V
const-string v9, "check usbDevice ,"
invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v8
invoke-virtual {v8, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v8
const-string v9, "/"
invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v8
aget v9, v1, v3
invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v8
const-string v9, ", "
invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v8
invoke-virtual {v8, v5}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v8
const-string v9, "/"
invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v8
aget v9, v1, v2
invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v8
const-string v9, ", UpgradeStatus:"
invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v8
iget-object v9, p0, Lcom/viatech/update/UpgradeDeviceActivity$1;->this$0:Lcom/viatech/update/UpgradeDeviceActivity;
.line 184
invoke-static {v9}, Lcom/viatech/update/UpgradeDeviceActivity;->access$200(Lcom/viatech/update/UpgradeDeviceActivity;)I
move-result v9
invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v8
const-string v9, ", usbDevice = "
invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v8
invoke-virtual {v8, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v8
invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v8
.line 183
invoke-static {v7, v8}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 185
aget v7, v1, v3
if-ne v4, v7, :cond_1
aget v1, v1, v2
if-ne v5, v1, :cond_1
move v0, v2
.line 190
:goto_0
if-eqz v0, :cond_4
.line 191
iget-object v0, p0, Lcom/viatech/update/UpgradeDeviceActivity$1;->this$0:Lcom/viatech/update/UpgradeDeviceActivity;
invoke-static {v0}, Lcom/viatech/update/UpgradeDeviceActivity;->access$300(Lcom/viatech/update/UpgradeDeviceActivity;)Landroid/os/Handler;
move-result-object v0
const/4 v1, 0x0
invoke-virtual {v0, v1}, Landroid/os/Handler;->removeCallbacksAndMessages(Ljava/lang/Object;)V
.line 192
iget-object v0, p0, Lcom/viatech/update/UpgradeDeviceActivity$1;->this$0:Lcom/viatech/update/UpgradeDeviceActivity;
invoke-static {v0}, Lcom/viatech/update/UpgradeDeviceActivity;->access$200(Lcom/viatech/update/UpgradeDeviceActivity;)I
move-result v0
if-ne v0, v10, :cond_2
.line 193
iget-object v0, p0, Lcom/viatech/update/UpgradeDeviceActivity$1;->this$0:Lcom/viatech/update/UpgradeDeviceActivity;
const/16 v1, 0x64
invoke-static {v0, v1}, Lcom/viatech/update/UpgradeDeviceActivity;->access$402(Lcom/viatech/update/UpgradeDeviceActivity;I)I
.line 194
iget-object v0, p0, Lcom/viatech/update/UpgradeDeviceActivity$1;->this$0:Lcom/viatech/update/UpgradeDeviceActivity;
invoke-static {v0}, Lcom/viatech/update/UpgradeDeviceActivity;->access$500(Lcom/viatech/update/UpgradeDeviceActivity;)Landroid/widget/ProgressBar;
move-result-object v0
iget-object v1, p0, Lcom/viatech/update/UpgradeDeviceActivity$1;->this$0:Lcom/viatech/update/UpgradeDeviceActivity;
invoke-static {v1}, Lcom/viatech/update/UpgradeDeviceActivity;->access$400(Lcom/viatech/update/UpgradeDeviceActivity;)I
move-result v1
invoke-virtual {v0, v1}, Landroid/widget/ProgressBar;->setProgress(I)V
.line 195
iget-object v0, p0, Lcom/viatech/update/UpgradeDeviceActivity$1;->this$0:Lcom/viatech/update/UpgradeDeviceActivity;
invoke-static {v0}, Lcom/viatech/update/UpgradeDeviceActivity;->access$600(Lcom/viatech/update/UpgradeDeviceActivity;)Landroid/widget/TextView;
move-result-object v0
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "%d"
new-array v2, v2, [Ljava/lang/Object;
iget-object v5, p0, Lcom/viatech/update/UpgradeDeviceActivity$1;->this$0:Lcom/viatech/update/UpgradeDeviceActivity;
invoke-static {v5}, Lcom/viatech/update/UpgradeDeviceActivity;->access$400(Lcom/viatech/update/UpgradeDeviceActivity;)I
move-result v5
invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v5
aput-object v5, v2, v3
invoke-static {v4, v2}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v2
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
const-string v2, "%"
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 197
:cond_2
const-string v0, "android.hardware.usb.action.USB_DEVICE_DETACHED"
invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_6
.line 198
invoke-static {}, Lcom/a/a;->a()V
.line 199
iget-object v0, p0, Lcom/viatech/update/UpgradeDeviceActivity$1;->this$0:Lcom/viatech/update/UpgradeDeviceActivity;
invoke-static {v0}, Lcom/viatech/update/UpgradeDeviceActivity;->access$200(Lcom/viatech/update/UpgradeDeviceActivity;)I
move-result v0
if-ne v0, v10, :cond_5
.line 200
iget-object v0, p0, Lcom/viatech/update/UpgradeDeviceActivity$1;->this$0:Lcom/viatech/update/UpgradeDeviceActivity;
invoke-static {v0}, Lcom/viatech/update/UpgradeDeviceActivity;->access$700(Lcom/viatech/update/UpgradeDeviceActivity;)Landroid/widget/TextView;
move-result-object v0
const v1, 0x7f07011d
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(I)V
.line 201
iget-object v0, p0, Lcom/viatech/update/UpgradeDeviceActivity$1;->this$0:Lcom/viatech/update/UpgradeDeviceActivity;
invoke-static {v0}, Lcom/viatech/update/UpgradeDeviceActivity;->access$800(Lcom/viatech/update/UpgradeDeviceActivity;)Landroid/app/ProgressDialog;
move-result-object v0
invoke-virtual {v0}, Landroid/app/ProgressDialog;->isShowing()Z
move-result v0
if-nez v0, :cond_3
.line 202
iget-object v0, p0, Lcom/viatech/update/UpgradeDeviceActivity$1;->this$0:Lcom/viatech/update/UpgradeDeviceActivity;
invoke-static {v0}, Lcom/viatech/update/UpgradeDeviceActivity;->access$800(Lcom/viatech/update/UpgradeDeviceActivity;)Landroid/app/ProgressDialog;
move-result-object v0
invoke-virtual {v0}, Landroid/app/ProgressDialog;->show()V
.line 208
:cond_3
:goto_1
iget-object v0, p0, Lcom/viatech/update/UpgradeDeviceActivity$1;->this$0:Lcom/viatech/update/UpgradeDeviceActivity;
invoke-static {v0, v3}, Lcom/viatech/update/UpgradeDeviceActivity;->access$902(Lcom/viatech/update/UpgradeDeviceActivity;Z)Z
.line 225
:cond_4
:goto_2
return-void
.line 204
:cond_5
iget-object v0, p0, Lcom/viatech/update/UpgradeDeviceActivity$1;->this$0:Lcom/viatech/update/UpgradeDeviceActivity;
invoke-static {v0, v11}, Lcom/viatech/update/UpgradeDeviceActivity;->access$202(Lcom/viatech/update/UpgradeDeviceActivity;I)I
.line 205
iget-object v0, p0, Lcom/viatech/update/UpgradeDeviceActivity$1;->this$0:Lcom/viatech/update/UpgradeDeviceActivity;
invoke-static {v0}, Lcom/viatech/update/UpgradeDeviceActivity;->access$700(Lcom/viatech/update/UpgradeDeviceActivity;)Landroid/widget/TextView;
move-result-object v0
const v1, 0x7f07011a
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(I)V
.line 206
iget-object v0, p0, Lcom/viatech/update/UpgradeDeviceActivity$1;->this$0:Lcom/viatech/update/UpgradeDeviceActivity;
invoke-static {v0}, Lcom/viatech/update/UpgradeDeviceActivity;->access$300(Lcom/viatech/update/UpgradeDeviceActivity;)Landroid/os/Handler;
move-result-object v0
const-wide/16 v4, 0x9c4
invoke-virtual {v0, v12, v4, v5}, Landroid/os/Handler;->sendEmptyMessageDelayed(IJ)Z
goto :goto_1
.line 210
:cond_6
iget-object v0, p0, Lcom/viatech/update/UpgradeDeviceActivity$1;->this$0:Lcom/viatech/update/UpgradeDeviceActivity;
invoke-static {v0}, Lcom/viatech/update/UpgradeDeviceActivity;->access$200(Lcom/viatech/update/UpgradeDeviceActivity;)I
move-result v0
if-ne v0, v10, :cond_8
.line 211
iget-object v0, p0, Lcom/viatech/update/UpgradeDeviceActivity$1;->this$0:Lcom/viatech/update/UpgradeDeviceActivity;
const/4 v1, 0x5
invoke-static {v0, v1}, Lcom/viatech/update/UpgradeDeviceActivity;->access$202(Lcom/viatech/update/UpgradeDeviceActivity;I)I
.line 212
iget-object v0, p0, Lcom/viatech/update/UpgradeDeviceActivity$1;->this$0:Lcom/viatech/update/UpgradeDeviceActivity;
invoke-static {v0}, Lcom/viatech/update/UpgradeDeviceActivity;->access$700(Lcom/viatech/update/UpgradeDeviceActivity;)Landroid/widget/TextView;
move-result-object v0
const v1, 0x7f07011b
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(I)V
.line 213
iget-object v0, p0, Lcom/viatech/update/UpgradeDeviceActivity$1;->this$0:Lcom/viatech/update/UpgradeDeviceActivity;
invoke-static {v0}, Lcom/viatech/update/UpgradeDeviceActivity;->access$800(Lcom/viatech/update/UpgradeDeviceActivity;)Landroid/app/ProgressDialog;
move-result-object v0
invoke-virtual {v0}, Landroid/app/ProgressDialog;->isShowing()Z
move-result v0
if-eqz v0, :cond_7
.line 214
iget-object v0, p0, Lcom/viatech/update/UpgradeDeviceActivity$1;->this$0:Lcom/viatech/update/UpgradeDeviceActivity;
invoke-static {v0}, Lcom/viatech/update/UpgradeDeviceActivity;->access$800(Lcom/viatech/update/UpgradeDeviceActivity;)Landroid/app/ProgressDialog;
move-result-object v0
invoke-virtual {v0}, Landroid/app/ProgressDialog;->dismiss()V
.line 219
:cond_7
:goto_3
iget-object v0, p0, Lcom/viatech/update/UpgradeDeviceActivity$1;->this$0:Lcom/viatech/update/UpgradeDeviceActivity;
invoke-static {v0}, Lcom/viatech/update/UpgradeDeviceActivity;->access$300(Lcom/viatech/update/UpgradeDeviceActivity;)Landroid/os/Handler;
move-result-object v0
const-wide/16 v2, 0x9c4
invoke-virtual {v0, v12, v2, v3}, Landroid/os/Handler;->sendEmptyMessageDelayed(IJ)Z
goto :goto_2
.line 216
:cond_8
iget-object v0, p0, Lcom/viatech/update/UpgradeDeviceActivity$1;->this$0:Lcom/viatech/update/UpgradeDeviceActivity;
invoke-static {v0}, Lcom/viatech/update/UpgradeDeviceActivity;->access$700(Lcom/viatech/update/UpgradeDeviceActivity;)Landroid/widget/TextView;
move-result-object v0
const v1, 0x7f07011a
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(I)V
.line 217
iget-object v0, p0, Lcom/viatech/update/UpgradeDeviceActivity$1;->this$0:Lcom/viatech/update/UpgradeDeviceActivity;
invoke-static {v0, v11}, Lcom/viatech/update/UpgradeDeviceActivity;->access$202(Lcom/viatech/update/UpgradeDeviceActivity;I)I
goto :goto_3
:cond_9
move v0, v3
goto/16 :goto_0
.end method