今奥全景相机
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.

743 lines
17 KiB

.class Lcom/a/k$b;
.super Ljava/lang/Object;
# interfaces
.implements Ljava/lang/Runnable;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/a/k;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = "b"
.end annotation
# instance fields
.field final synthetic a:Lcom/a/k;
# direct methods
.method constructor <init>(Lcom/a/k;)V
.locals 0
iput-object p1, p0, Lcom/a/k$b;->a:Lcom/a/k;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public run()V
.locals 12
const/16 v11, 0x1f4
const/4 v2, 0x1
const/4 v1, 0x0
const/16 v0, 0x4000
new-array v4, v0, [B
:try_start_0
iget-object v0, p0, Lcom/a/k$b;->a:Lcom/a/k;
invoke-static {v0}, Lcom/a/k;->f(Lcom/a/k;)I
move-result v0
const/4 v3, 0x3
if-ne v0, v3, :cond_4
const-string v0, "UsbHostTransfer"
const-string v2, "readLoop enter : MODE_VTP"
invoke-static {v0, v2}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
move v0, v1
:cond_0
:goto_0
iget-object v2, p0, Lcom/a/k$b;->a:Lcom/a/k;
invoke-static {v2}, Lcom/a/k;->g(Lcom/a/k;)Landroid/hardware/usb/UsbDeviceConnection;
move-result-object v2
if-eqz v2, :cond_1
iget-object v2, p0, Lcom/a/k$b;->a:Lcom/a/k;
invoke-static {v2}, Lcom/a/k;->g(Lcom/a/k;)Landroid/hardware/usb/UsbDeviceConnection;
move-result-object v2
iget-object v3, p0, Lcom/a/k$b;->a:Lcom/a/k;
invoke-static {v3}, Lcom/a/k;->h(Lcom/a/k;)Landroid/hardware/usb/UsbEndpoint;
move-result-object v3
array-length v5, v4
const v6, 0x36ee80
invoke-virtual {v2, v3, v4, v5, v6}, Landroid/hardware/usb/UsbDeviceConnection;->bulkTransfer(Landroid/hardware/usb/UsbEndpoint;[BII)I
move-result v2
if-gtz v2, :cond_2
const-string v3, "UsbHostTransfer"
new-instance v5, Ljava/lang/StringBuilder;
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
const-string v6, "read timeout or error, ret:"
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
invoke-virtual {v5, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v2
const-string v5, " timeoutTimes ="
invoke-virtual {v2, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2, v0}, 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 {v3, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
const-wide/16 v2, 0xa
invoke-static {v2, v3}, Ljava/lang/Thread;->sleep(J)V
add-int/lit8 v0, v0, 0x1
if-lt v0, v11, :cond_0
const-string v0, "UsbHostTransfer"
const-string v1, "read timeout or error break the loop"
invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
:cond_1
:goto_1
monitor-enter p0
:try_start_1
const-string v0, "UsbHostTransfer"
const-string v1, "will exit read thread now..."
invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
iget-object v0, p0, Lcom/a/k$b;->a:Lcom/a/k;
const/4 v1, 0x0
invoke-static {v0, v1}, Lcom/a/k;->a(Lcom/a/k;Z)Z
invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V
monitor-exit p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
iget-object v0, p0, Lcom/a/k$b;->a:Lcom/a/k;
invoke-static {v0}, Lcom/a/k;->e(Lcom/a/k;)V
:goto_2
const-string v0, "UsbHostTransfer"
const-string v1, "readLoop exited"
invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
return-void
:cond_2
if-lez v2, :cond_3
:try_start_2
iget-object v0, p0, Lcom/a/k$b;->a:Lcom/a/k;
invoke-static {v0, v4, v2}, Lcom/a/k;->a(Lcom/a/k;[BI)V
:cond_3
move v0, v1
goto :goto_0
:cond_4
const-string v0, "UsbHostTransfer"
const-string v3, "readLoop enter : MODE_TCP"
invoke-static {v0, v3}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
new-instance v5, Lcom/a/m;
invoke-direct {v5}, Lcom/a/m;-><init>()V
const-string v0, "UsbHostTransfer"
const-string v3, "send snoop request to device..."
invoke-static {v0, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
const/4 v0, 0x1
const v3, 0x27afe2d8
invoke-static {v4, v0, v3}, Lcom/a/l;->a([BBI)I
move-result v0
iget-object v3, p0, Lcom/a/k$b;->a:Lcom/a/k;
invoke-virtual {v3, v4, v0}, Lcom/a/k;->a([BI)V
new-instance v6, Lcom/a/l;
invoke-direct {v6}, Lcom/a/l;-><init>()V
iput-object v4, v6, Lcom/a/l;->d:[B
move v3, v1
move v0, v2
:cond_5
:goto_3
iget-object v7, p0, Lcom/a/k$b;->a:Lcom/a/k;
invoke-static {v7}, Lcom/a/k;->g(Lcom/a/k;)Landroid/hardware/usb/UsbDeviceConnection;
move-result-object v7
if-eqz v7, :cond_1
iget-object v7, p0, Lcom/a/k$b;->a:Lcom/a/k;
invoke-static {v7}, Lcom/a/k;->g(Lcom/a/k;)Landroid/hardware/usb/UsbDeviceConnection;
move-result-object v7
iget-object v8, p0, Lcom/a/k$b;->a:Lcom/a/k;
invoke-static {v8}, Lcom/a/k;->h(Lcom/a/k;)Landroid/hardware/usb/UsbEndpoint;
move-result-object v8
array-length v9, v4
const v10, 0x36ee80
invoke-virtual {v7, v8, v4, v9, v10}, Landroid/hardware/usb/UsbDeviceConnection;->bulkTransfer(Landroid/hardware/usb/UsbEndpoint;[BII)I
move-result v7
if-gtz v7, :cond_6
const-string v8, "UsbHostTransfer"
new-instance v9, Ljava/lang/StringBuilder;
invoke-direct {v9}, Ljava/lang/StringBuilder;-><init>()V
const-string v10, "read timeout or error, ret:"
invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v9
invoke-virtual {v9, v7}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v7
const-string v9, " timeoutTimes ="
invoke-virtual {v7, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v7
invoke-virtual {v7, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v7
invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v7
invoke-static {v8, v7}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
const-wide/16 v8, 0xa
invoke-static {v8, v9}, Ljava/lang/Thread;->sleep(J)V
add-int/lit8 v3, v3, 0x1
if-lt v3, v11, :cond_5
const-string v0, "UsbHostTransfer"
const-string v1, "read timeout or error break the loop"
invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
:try_end_2
.catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_0
.catchall {:try_start_2 .. :try_end_2} :catchall_0
goto/16 :goto_1
:catch_0
move-exception v0
:try_start_3
const-string v1, "UsbHostTransfer"
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "usb readLoop error"
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 v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-static {v1, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
monitor-enter p0
:try_start_4
const-string v0, "UsbHostTransfer"
const-string v1, "will exit read thread now..."
invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
iget-object v0, p0, Lcom/a/k$b;->a:Lcom/a/k;
const/4 v1, 0x0
invoke-static {v0, v1}, Lcom/a/k;->a(Lcom/a/k;Z)Z
invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V
monitor-exit p0
:try_end_4
.catchall {:try_start_4 .. :try_end_4} :catchall_2
iget-object v0, p0, Lcom/a/k$b;->a:Lcom/a/k;
invoke-static {v0}, Lcom/a/k;->e(Lcom/a/k;)V
goto/16 :goto_2
:cond_6
:try_start_5
const-string v3, "UsbHostTransfer"
new-instance v8, Ljava/lang/StringBuilder;
invoke-direct {v8}, Ljava/lang/StringBuilder;-><init>()V
const-string v9, "read n:"
invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v8
invoke-virtual {v8, v7}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v8
invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v8
invoke-static {v3, v8}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
invoke-virtual {v5, v4, v7}, Lcom/a/m;->a([BI)V
move v3, v0
:goto_4
invoke-virtual {v5, v3, v6}, Lcom/a/m;->a(ZLcom/a/l;)Z
move-result v0
if-eqz v0, :cond_c
const-string v0, "UsbHostTransfer"
new-instance v7, Ljava/lang/StringBuilder;
invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V
const-string v8, "packet cmd : "
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v7
iget-byte v8, v6, Lcom/a/l;->a:B
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v7
invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v7
invoke-static {v0, v7}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
iget-byte v0, v6, Lcom/a/l;->a:B
const/4 v7, 0x2
if-ne v0, v7, :cond_8
new-instance v7, Ljava/lang/String;
iget-object v0, v6, Lcom/a/l;->d:[B
const/4 v8, 0x0
iget-short v9, v6, Lcom/a/l;->b:S
const-string v10, "UTF-8"
invoke-direct {v7, v0, v8, v9, v10}, Ljava/lang/String;-><init>([BIILjava/lang/String;)V
const-string v0, "UsbHostTransfer"
new-instance v8, Ljava/lang/StringBuilder;
invoke-direct {v8}, Ljava/lang/StringBuilder;-><init>()V
const-string v9, "snoop response is :"
invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v8
invoke-virtual {v8, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v8
const-string v9, " mSnoopString :"
invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v8
iget-object v9, p0, Lcom/a/k$b;->a:Lcom/a/k;
invoke-static {v9}, Lcom/a/k;->i(Lcom/a/k;)Ljava/lang/String;
move-result-object v9
invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v8
invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v8
invoke-static {v0, v8}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
const-string v0, "_PID_"
invoke-virtual {v7, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v0
if-eqz v0, :cond_b
iget-object v0, p0, Lcom/a/k$b;->a:Lcom/a/k;
invoke-static {v0}, Lcom/a/k;->i(Lcom/a/k;)Ljava/lang/String;
move-result-object v0
if-eqz v0, :cond_b
iget-object v0, p0, Lcom/a/k$b;->a:Lcom/a/k;
invoke-static {v0}, Lcom/a/k;->i(Lcom/a/k;)Ljava/lang/String;
move-result-object v0
invoke-virtual {v0, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_b
move v0, v1
:goto_5
iget-object v8, p0, Lcom/a/k$b;->a:Lcom/a/k;
invoke-static {v8, v7}, Lcom/a/k;->a(Lcom/a/k;Ljava/lang/String;)Ljava/lang/String;
const-string v7, "UsbHostTransfer"
new-instance v8, Ljava/lang/StringBuilder;
invoke-direct {v8}, Ljava/lang/StringBuilder;-><init>()V
const-string v9, "mSnoopString = "
invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v8
iget-object v9, p0, Lcom/a/k$b;->a:Lcom/a/k;
invoke-static {v9}, Lcom/a/k;->i(Lcom/a/k;)Ljava/lang/String;
move-result-object v9
invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v8
const-string v9, " deviceChanged = "
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(Z)Ljava/lang/StringBuilder;
move-result-object v8
const-string v9, " firstSync = "
invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v8
invoke-virtual {v8, v3}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
invoke-static {v7, v3}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
if-eqz v0, :cond_7
iget-object v0, p0, Lcom/a/k$b;->a:Lcom/a/k;
invoke-static {v0}, Lcom/a/k;->j(Lcom/a/k;)Lcom/a/c$d;
move-result-object v0
invoke-interface {v0}, Lcom/a/c$d;->b()V
iget-object v0, p0, Lcom/a/k$b;->a:Lcom/a/k;
invoke-static {v0}, Lcom/a/k;->c(Lcom/a/k;)Lcom/a/c$c;
move-result-object v0
iget-object v3, p0, Lcom/a/k$b;->a:Lcom/a/k;
invoke-static {v3}, Lcom/a/k;->i(Lcom/a/k;)Ljava/lang/String;
move-result-object v3
const/16 v7, 0x64
invoke-interface {v0, v3, v7}, Lcom/a/c$c;->onUSBDeviceStatus(Ljava/lang/String;I)V
:cond_7
move v3, v1
goto/16 :goto_4
:cond_8
iget-byte v0, v6, Lcom/a/l;->a:B
const/16 v7, 0x50
if-lt v0, v7, :cond_9
iget-object v0, p0, Lcom/a/k$b;->a:Lcom/a/k;
invoke-static {v0}, Lcom/a/k;->c(Lcom/a/k;)Lcom/a/c$c;
move-result-object v0
iget-byte v7, v6, Lcom/a/l;->a:B
iget-object v8, v6, Lcom/a/l;->d:[B
invoke-interface {v0, v7, v8}, Lcom/a/c$c;->onCustomCommand(B[B)V
:try_end_5
.catch Ljava/lang/Exception; {:try_start_5 .. :try_end_5} :catch_0
.catchall {:try_start_5 .. :try_end_5} :catchall_0
goto/16 :goto_4
:catchall_0
move-exception v0
monitor-enter p0
:try_start_6
const-string v1, "UsbHostTransfer"
const-string v2, "will exit read thread now..."
invoke-static {v1, v2}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
iget-object v1, p0, Lcom/a/k$b;->a:Lcom/a/k;
const/4 v2, 0x0
invoke-static {v1, v2}, Lcom/a/k;->a(Lcom/a/k;Z)Z
invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V
monitor-exit p0
:try_end_6
.catchall {:try_start_6 .. :try_end_6} :catchall_3
iget-object v1, p0, Lcom/a/k$b;->a:Lcom/a/k;
invoke-static {v1}, Lcom/a/k;->e(Lcom/a/k;)V
throw v0
:cond_9
if-nez v3, :cond_a
:try_start_7
iget-object v0, p0, Lcom/a/k$b;->a:Lcom/a/k;
invoke-static {v0}, Lcom/a/k;->j(Lcom/a/k;)Lcom/a/c$d;
move-result-object v0
invoke-interface {v0, v6}, Lcom/a/c$d;->a(Lcom/a/l;)V
goto/16 :goto_4
:cond_a
const-string v0, "UsbHostTransfer"
new-instance v7, Ljava/lang/StringBuilder;
invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V
const-string v8, "ignore un-sync command:"
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v7
iget-byte v8, v6, Lcom/a/l;->a:B
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v7
invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v7
invoke-static {v0, v7}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
:try_end_7
.catch Ljava/lang/Exception; {:try_start_7 .. :try_end_7} :catch_0
.catchall {:try_start_7 .. :try_end_7} :catchall_0
goto/16 :goto_4
:catchall_1
move-exception v0
:try_start_8
monitor-exit p0
:try_end_8
.catchall {:try_start_8 .. :try_end_8} :catchall_1
throw v0
:catchall_2
move-exception v0
:try_start_9
monitor-exit p0
:try_end_9
.catchall {:try_start_9 .. :try_end_9} :catchall_2
throw v0
:catchall_3
move-exception v0
:try_start_a
monitor-exit p0
:try_end_a
.catchall {:try_start_a .. :try_end_a} :catchall_3
throw v0
:cond_b
move v0, v2
goto/16 :goto_5
:cond_c
move v0, v3
move v3, v1
goto/16 :goto_3
.end method