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.
4310 lines
102 KiB
4310 lines
102 KiB
.class public Lcom/viatech/device/VPaiVTPDevice; |
|
.super Lcom/viatech/device/VPaiDevice; |
|
.source "VPaiVTPDevice.java" |
|
|
|
# interfaces |
|
.implements Lcom/a/f$a; |
|
|
|
|
|
# static fields |
|
.field private static final TAG:Ljava/lang/String; = "VPaiVTPDevice" |
|
|
|
|
|
# instance fields |
|
.field private Debug:Z |
|
|
|
.field private final IDR_TYPE:I |
|
|
|
.field private final SEI_TYPE:I |
|
|
|
.field private final SLICE_TYPE:I |
|
|
|
.field private final SPS_TYPE:I |
|
|
|
.field private isOpened:Z |
|
|
|
.field private isStreamOpened:Z |
|
|
|
.field private mMediaPortListener:Lcom/viatech/device/MediaPortListener; |
|
|
|
.field private mPicH:I |
|
|
|
.field private mPicW:I |
|
|
|
.field private mResumeCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
.field private mSetResolutionCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
.field private mStartCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
.field private mStopCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
.field private mSuspendCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
.field private mTakePictureCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
.field private mUiHandler:Landroid/os/Handler; |
|
|
|
.field private mUpgradeCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
.field private mVtpProxy:Lcom/a/f; |
|
|
|
|
|
# direct methods |
|
.method public constructor <init>()V |
|
.locals 2 |
|
|
|
.prologue |
|
const/4 v1, 0x0 |
|
|
|
const/4 v0, 0x0 |
|
|
|
.line 54 |
|
invoke-direct {p0}, Lcom/viatech/device/VPaiDevice;-><init>()V |
|
|
|
.line 34 |
|
iput-boolean v1, p0, Lcom/viatech/device/VPaiVTPDevice;->Debug:Z |
|
|
|
.line 36 |
|
iput-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mTakePictureCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
.line 37 |
|
iput-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mUpgradeCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
.line 38 |
|
iput-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mStopCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
.line 39 |
|
iput-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mStartCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
.line 40 |
|
iput-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mSuspendCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
.line 41 |
|
iput-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mResumeCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
.line 42 |
|
iput-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mSetResolutionCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
.line 46 |
|
const/4 v0, 0x1 |
|
|
|
iput v0, p0, Lcom/viatech/device/VPaiVTPDevice;->SLICE_TYPE:I |
|
|
|
.line 47 |
|
const/4 v0, 0x5 |
|
|
|
iput v0, p0, Lcom/viatech/device/VPaiVTPDevice;->IDR_TYPE:I |
|
|
|
.line 48 |
|
const/4 v0, 0x6 |
|
|
|
iput v0, p0, Lcom/viatech/device/VPaiVTPDevice;->SEI_TYPE:I |
|
|
|
.line 49 |
|
const/4 v0, 0x7 |
|
|
|
iput v0, p0, Lcom/viatech/device/VPaiVTPDevice;->SPS_TYPE:I |
|
|
|
.line 131 |
|
iput-boolean v1, p0, Lcom/viatech/device/VPaiVTPDevice;->isOpened:Z |
|
|
|
.line 132 |
|
iput-boolean v1, p0, Lcom/viatech/device/VPaiVTPDevice;->isStreamOpened:Z |
|
|
|
.line 55 |
|
new-instance v0, Lcom/viatech/device/VPaiVTPDevice$1; |
|
|
|
invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper; |
|
|
|
move-result-object v1 |
|
|
|
invoke-direct {v0, p0, v1}, Lcom/viatech/device/VPaiVTPDevice$1;-><init>(Lcom/viatech/device/VPaiVTPDevice;Landroid/os/Looper;)V |
|
|
|
iput-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mUiHandler:Landroid/os/Handler; |
|
|
|
.line 59 |
|
invoke-static {}, Lcom/a/f;->a()Lcom/a/f; |
|
|
|
move-result-object v0 |
|
|
|
iput-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mVtpProxy:Lcom/a/f; |
|
|
|
.line 60 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mVtpProxy:Lcom/a/f; |
|
|
|
invoke-virtual {v0, p0}, Lcom/a/f;->a(Lcom/a/f$a;)V |
|
|
|
.line 61 |
|
return-void |
|
.end method |
|
|
|
.method static synthetic access$000(Lcom/viatech/device/VPaiVTPDevice;)Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
.locals 1 |
|
|
|
.prologue |
|
.line 32 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mUpgradeCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method static synthetic access$002(Lcom/viatech/device/VPaiVTPDevice;Lcom/viatech/device/DeviceMessage$DeviceMessageCallback;)Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
.locals 0 |
|
|
|
.prologue |
|
.line 32 |
|
iput-object p1, p0, Lcom/viatech/device/VPaiVTPDevice;->mUpgradeCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
return-object p1 |
|
.end method |
|
|
|
.method static synthetic access$100(Lcom/viatech/device/VPaiVTPDevice;)Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
.locals 1 |
|
|
|
.prologue |
|
.line 32 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mTakePictureCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method static synthetic access$102(Lcom/viatech/device/VPaiVTPDevice;Lcom/viatech/device/DeviceMessage$DeviceMessageCallback;)Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
.locals 0 |
|
|
|
.prologue |
|
.line 32 |
|
iput-object p1, p0, Lcom/viatech/device/VPaiVTPDevice;->mTakePictureCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
return-object p1 |
|
.end method |
|
|
|
.method private buildJsonResponse(Ljava/lang/String;Ljava/lang/String;II)Ljava/lang/String; |
|
.locals 3 |
|
|
|
.prologue |
|
.line 806 |
|
:try_start_0 |
|
new-instance v0, Lorg/json/JSONObject; |
|
|
|
invoke-direct {v0}, Lorg/json/JSONObject;-><init>()V |
|
|
|
.line 807 |
|
const-string v1, "ret" |
|
|
|
invoke-virtual {v0, v1, p4}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject; |
|
|
|
.line 808 |
|
const-string v1, "cmd" |
|
|
|
invoke-virtual {v0, v1, p1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject; |
|
|
|
.line 809 |
|
const-string v1, "cookie" |
|
|
|
invoke-virtual {v0, v1, p3}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject; |
|
|
|
.line 810 |
|
const-string v1, "action" |
|
|
|
invoke-virtual {v0, v1, p2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject; |
|
|
|
.line 811 |
|
invoke-virtual {v0}, Lorg/json/JSONObject;->toString()Ljava/lang/String; |
|
:try_end_0 |
|
.catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0 |
|
|
|
move-result-object v0 |
|
|
|
.line 815 |
|
:goto_0 |
|
return-object v0 |
|
|
|
.line 812 |
|
:catch_0 |
|
move-exception v0 |
|
|
|
.line 813 |
|
iget-boolean v1, p0, Lcom/viatech/device/VPaiVTPDevice;->Debug:Z |
|
|
|
if-eqz v1, :cond_0 |
|
|
|
.line 814 |
|
const-string v1, "VPaiVTPDevice" |
|
|
|
const-string v2, "buildMediaJsonResponse Failed:" |
|
|
|
invoke-static {v1, v2, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I |
|
|
|
.line 815 |
|
:cond_0 |
|
const-string v0, "" |
|
|
|
goto :goto_0 |
|
.end method |
|
|
|
.method private bytes2Int([BI)I |
|
.locals 3 |
|
|
|
.prologue |
|
.line 820 |
|
add-int/lit8 v0, p2, 0x3 |
|
|
|
aget-byte v0, p1, v0 |
|
|
|
shl-int/lit8 v0, v0, 0x18 |
|
|
|
const/high16 v1, -0x1000000 |
|
|
|
and-int/2addr v0, v1 |
|
|
|
add-int/lit8 v1, p2, 0x2 |
|
|
|
aget-byte v1, p1, v1 |
|
|
|
shl-int/lit8 v1, v1, 0x10 |
|
|
|
const/high16 v2, 0xff0000 |
|
|
|
and-int/2addr v1, v2 |
|
|
|
or-int/2addr v0, v1 |
|
|
|
add-int/lit8 v1, p2, 0x1 |
|
|
|
aget-byte v1, p1, v1 |
|
|
|
shl-int/lit8 v1, v1, 0x8 |
|
|
|
const v2, 0xff00 |
|
|
|
and-int/2addr v1, v2 |
|
|
|
or-int/2addr v0, v1 |
|
|
|
aget-byte v1, p1, p2 |
|
|
|
and-int/lit16 v1, v1, 0xff |
|
|
|
or-int/2addr v0, v1 |
|
|
|
.line 822 |
|
return v0 |
|
.end method |
|
|
|
.method private bytes2Short([BI)S |
|
.locals 2 |
|
|
|
.prologue |
|
.line 826 |
|
add-int/lit8 v0, p2, 0x1 |
|
|
|
aget-byte v0, p1, v0 |
|
|
|
shl-int/lit8 v0, v0, 0x8 |
|
|
|
const v1, 0xff00 |
|
|
|
and-int/2addr v0, v1 |
|
|
|
aget-byte v1, p1, p2 |
|
|
|
and-int/lit16 v1, v1, 0xff |
|
|
|
or-int/2addr v0, v1 |
|
|
|
int-to-short v0, v0 |
|
|
|
.line 827 |
|
return v0 |
|
.end method |
|
|
|
.method private encodeBitmap(Ljava/lang/String;)Z |
|
.locals 7 |
|
|
|
.prologue |
|
const/4 v0, 0x1 |
|
|
|
const/4 v1, 0x0 |
|
|
|
.line 427 |
|
iget v2, p0, Lcom/viatech/device/VPaiVTPDevice;->mPicW:I |
|
|
|
const/16 v3, 0xf00 |
|
|
|
if-ne v2, v3, :cond_1 |
|
|
|
iget v2, p0, Lcom/viatech/device/VPaiVTPDevice;->mPicH:I |
|
|
|
const/16 v3, 0x780 |
|
|
|
if-ne v2, v3, :cond_1 |
|
|
|
.line 450 |
|
:cond_0 |
|
:goto_0 |
|
return v0 |
|
|
|
.line 430 |
|
:cond_1 |
|
iget v2, p0, Lcom/viatech/device/VPaiVTPDevice;->mPicW:I |
|
|
|
const/16 v3, 0xc00 |
|
|
|
if-ne v2, v3, :cond_2 |
|
|
|
iget v2, p0, Lcom/viatech/device/VPaiVTPDevice;->mPicH:I |
|
|
|
const/16 v3, 0x600 |
|
|
|
if-eq v2, v3, :cond_0 |
|
|
|
.line 433 |
|
:cond_2 |
|
new-instance v2, Ljava/io/File; |
|
|
|
invoke-direct {v2, p1}, Ljava/io/File;-><init>(Ljava/lang/String;)V |
|
|
|
.line 435 |
|
:try_start_0 |
|
invoke-virtual {v2}, Ljava/io/File;->exists()Z |
|
|
|
move-result v3 |
|
|
|
if-nez v3, :cond_3 |
|
|
|
.line 436 |
|
const/4 v0, 0x0 |
|
|
|
invoke-direct {p0, v0}, Lcom/viatech/device/VPaiVTPDevice;->takePicErrorResponse(I)V |
|
|
|
move v0, v1 |
|
|
|
.line 437 |
|
goto :goto_0 |
|
|
|
.line 439 |
|
:cond_3 |
|
invoke-static {p1}, Landroid/graphics/BitmapFactory;->decodeFile(Ljava/lang/String;)Landroid/graphics/Bitmap; |
|
|
|
move-result-object v3 |
|
|
|
.line 440 |
|
iget v4, p0, Lcom/viatech/device/VPaiVTPDevice;->mPicW:I |
|
|
|
iget v5, p0, Lcom/viatech/device/VPaiVTPDevice;->mPicH:I |
|
|
|
const/4 v6, 0x1 |
|
|
|
invoke-static {v3, v4, v5, v6}, Landroid/graphics/Bitmap;->createScaledBitmap(Landroid/graphics/Bitmap;IIZ)Landroid/graphics/Bitmap; |
|
|
|
move-result-object v3 |
|
|
|
.line 441 |
|
new-instance v4, Ljava/io/FileOutputStream; |
|
|
|
invoke-direct {v4, v2}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V |
|
|
|
.line 442 |
|
sget-object v5, Landroid/graphics/Bitmap$CompressFormat;->JPEG:Landroid/graphics/Bitmap$CompressFormat; |
|
|
|
const/16 v6, 0x50 |
|
|
|
invoke-virtual {v3, v5, v6, v4}, Landroid/graphics/Bitmap;->compress(Landroid/graphics/Bitmap$CompressFormat;ILjava/io/OutputStream;)Z |
|
:try_end_0 |
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0 |
|
|
|
goto :goto_0 |
|
|
|
.line 443 |
|
:catch_0 |
|
move-exception v0 |
|
|
|
.line 444 |
|
if-eqz v2, :cond_4 |
|
|
|
invoke-virtual {v2}, Ljava/io/File;->exists()Z |
|
|
|
move-result v0 |
|
|
|
if-eqz v0, :cond_4 |
|
|
|
.line 445 |
|
invoke-virtual {v2}, Ljava/io/File;->delete()Z |
|
|
|
.line 447 |
|
:cond_4 |
|
invoke-direct {p0, v1}, Lcom/viatech/device/VPaiVTPDevice;->takePicErrorResponse(I)V |
|
|
|
move v0, v1 |
|
|
|
.line 448 |
|
goto :goto_0 |
|
.end method |
|
|
|
.method private iniDeviceInfo()V |
|
.locals 2 |
|
|
|
.prologue |
|
.line 567 |
|
new-instance v0, Lcom/viatech/device/DeviceInfo; |
|
|
|
invoke-direct {v0}, Lcom/viatech/device/DeviceInfo;-><init>()V |
|
|
|
iput-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; |
|
|
|
.line 568 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; |
|
|
|
const/4 v1, -0x1 |
|
|
|
iput v1, v0, Lcom/viatech/device/DeviceInfo;->idletime:I |
|
|
|
.line 569 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; |
|
|
|
const-string v1, "720vpai" |
|
|
|
iput-object v1, v0, Lcom/viatech/device/DeviceInfo;->product:Ljava/lang/String; |
|
|
|
.line 570 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; |
|
|
|
const-string v1, "VIA" |
|
|
|
iput-object v1, v0, Lcom/viatech/device/DeviceInfo;->manufactory:Ljava/lang/String; |
|
|
|
.line 571 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; |
|
|
|
const-string v1, "10000" |
|
|
|
iput-object v1, v0, Lcom/viatech/device/DeviceInfo;->deviceid:Ljava/lang/String; |
|
|
|
.line 572 |
|
return-void |
|
.end method |
|
|
|
.method private openVTP()V |
|
.locals 3 |
|
|
|
.prologue |
|
.line 135 |
|
iget-boolean v0, p0, Lcom/viatech/device/VPaiVTPDevice;->Debug:Z |
|
|
|
if-eqz v0, :cond_0 |
|
|
|
.line 136 |
|
const-string v0, "VPaiVTPDevice" |
|
|
|
const-string v1, "openVTP" |
|
|
|
invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I |
|
|
|
.line 137 |
|
:cond_0 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mMediaPortListener:Lcom/viatech/device/MediaPortListener; |
|
|
|
if-eqz v0, :cond_1 |
|
|
|
.line 138 |
|
const/4 v0, 0x1 |
|
|
|
iput-boolean v0, p0, Lcom/viatech/device/VPaiVTPDevice;->isOpened:Z |
|
|
|
.line 139 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mMediaPortListener:Lcom/viatech/device/MediaPortListener; |
|
|
|
invoke-interface {v0}, Lcom/viatech/device/MediaPortListener;->onMediaPortConnectted()I |
|
|
|
.line 140 |
|
iget-boolean v0, p0, Lcom/viatech/device/VPaiVTPDevice;->Debug:Z |
|
|
|
if-eqz v0, :cond_1 |
|
|
|
.line 141 |
|
const-string v0, "VPaiVTPDevice" |
|
|
|
new-instance v1, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v2, "mMediaPortListener = " |
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v1 |
|
|
|
iget-object v2, p0, Lcom/viatech/device/VPaiVTPDevice;->mMediaPortListener:Lcom/viatech/device/MediaPortListener; |
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v1 |
|
|
|
const-string v2, " onMediaPortConnectted" |
|
|
|
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-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I |
|
|
|
.line 143 |
|
:cond_1 |
|
return-void |
|
.end method |
|
|
|
.method private parseDeviceInfo([BI)V |
|
.locals 13 |
|
|
|
.prologue |
|
const/16 v12, 0x8 |
|
|
|
const/4 v2, -0x1 |
|
|
|
.line 721 |
|
if-eqz p2, :cond_1 |
|
|
|
.line 759 |
|
:cond_0 |
|
:goto_0 |
|
return-void |
|
|
|
.line 725 |
|
:cond_1 |
|
const/16 v0, 0x14 |
|
|
|
:try_start_0 |
|
invoke-direct {p0, p1, v0}, Lcom/viatech/device/VPaiVTPDevice;->bytes2Int([BI)I |
|
|
|
move-result v0 |
|
|
|
.line 726 |
|
const/16 v1, 0x18 |
|
|
|
invoke-direct {p0, p1, v1}, Lcom/viatech/device/VPaiVTPDevice;->bytes2Int([BI)I |
|
|
|
move-result v1 |
|
|
|
.line 727 |
|
const/16 v3, 0x1c |
|
|
|
aget-byte v3, p1, v3 |
|
|
|
.line 728 |
|
const/16 v4, 0x1d |
|
|
|
aget-byte v4, p1, v4 |
|
|
|
.line 729 |
|
const/16 v5, 0x20 |
|
|
|
invoke-direct {p0, p1, v5}, Lcom/viatech/device/VPaiVTPDevice;->bytes2Int([BI)I |
|
|
|
move-result v5 |
|
|
|
.line 730 |
|
const/16 v6, 0x24 |
|
|
|
invoke-direct {p0, p1, v6}, Lcom/viatech/device/VPaiVTPDevice;->bytes2Int([BI)I |
|
|
|
move-result v6 |
|
|
|
.line 732 |
|
new-instance v7, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const/16 v8, 0x34 |
|
|
|
aget-byte v8, p1, v8 |
|
|
|
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v7 |
|
|
|
const-string v8, "..." |
|
|
|
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v7 |
|
|
|
const/16 v8, 0x35 |
|
|
|
aget-byte v8, p1, v8 |
|
|
|
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v7 |
|
|
|
const-string v8, "..." |
|
|
|
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v7 |
|
|
|
const/16 v8, 0x36 |
|
|
|
aget-byte v8, p1, v8 |
|
|
|
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v7 |
|
|
|
const-string v8, "..." |
|
|
|
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v7 |
|
|
|
const/16 v8, 0x37 |
|
|
|
aget-byte v8, p1, v8 |
|
|
|
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v7 |
|
|
|
const-string v8, "..." |
|
|
|
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v7 |
|
|
|
const/16 v8, 0x38 |
|
|
|
aget-byte v8, p1, v8 |
|
|
|
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v7 |
|
|
|
const-string v8, "..." |
|
|
|
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v7 |
|
|
|
const/16 v8, 0x39 |
|
|
|
aget-byte v8, p1, v8 |
|
|
|
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v7 |
|
|
|
const-string v8, "..." |
|
|
|
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v7 |
|
|
|
const/16 v8, 0x3a |
|
|
|
aget-byte v8, p1, v8 |
|
|
|
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v7 |
|
|
|
const-string v8, "..." |
|
|
|
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v7 |
|
|
|
const/16 v8, 0x3b |
|
|
|
aget-byte v8, p1, v8 |
|
|
|
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 |
|
|
|
.line 733 |
|
new-instance v8, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v8}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const/16 v9, 0x3c |
|
|
|
aget-byte v9, p1, v9 |
|
|
|
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 |
|
|
|
const/16 v9, 0x3d |
|
|
|
aget-byte v9, p1, v9 |
|
|
|
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 |
|
|
|
const/16 v9, 0x3e |
|
|
|
aget-byte v9, p1, v9 |
|
|
|
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 |
|
|
|
const/16 v9, 0x3f |
|
|
|
aget-byte v9, p1, v9 |
|
|
|
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 |
|
|
|
const/16 v9, 0x40 |
|
|
|
aget-byte v9, p1, v9 |
|
|
|
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 |
|
|
|
const/16 v9, 0x41 |
|
|
|
aget-byte v9, p1, v9 |
|
|
|
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 |
|
|
|
const/16 v9, 0x42 |
|
|
|
aget-byte v9, p1, v9 |
|
|
|
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 |
|
|
|
const/16 v9, 0x43 |
|
|
|
aget-byte v9, p1, v9 |
|
|
|
invoke-virtual {v8, v9}, 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 |
|
|
|
.line 734 |
|
iget-boolean v9, p0, Lcom/viatech/device/VPaiVTPDevice;->Debug:Z |
|
|
|
if-eqz v9, :cond_2 |
|
|
|
.line 735 |
|
const-string v9, "VPaiVTPDevice" |
|
|
|
new-instance v10, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v10}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v11, "parseDeviceInfo:" |
|
|
|
invoke-virtual {v10, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v10 |
|
|
|
invoke-virtual {v10, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
const-string v10, ";" |
|
|
|
invoke-virtual {v0, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
const-string v1, ";" |
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
const-string v1, ";" |
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
const-string v1, ";" |
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0, v5}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
const-string v1, ";" |
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0, v6}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
const-string v1, ";" |
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
const-string v1, ";" |
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
invoke-static {v9, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I |
|
|
|
.line 736 |
|
:cond_2 |
|
const/16 v0, 0x8 |
|
|
|
new-array v3, v0, [C |
|
|
|
.line 738 |
|
const/4 v1, 0x0 |
|
|
|
move v0, v2 |
|
|
|
:goto_1 |
|
if-ge v1, v12, :cond_3 |
|
|
|
.line 739 |
|
add-int/lit8 v4, v1, 0x34 |
|
|
|
aget-byte v4, p1, v4 |
|
|
|
if-nez v4, :cond_4 |
|
|
|
.line 747 |
|
:cond_3 |
|
new-instance v1, Ljava/lang/String; |
|
|
|
invoke-direct {v1, v3}, Ljava/lang/String;-><init>([C)V |
|
|
|
.line 748 |
|
if-eq v0, v2, :cond_6 |
|
|
|
.line 749 |
|
invoke-virtual {v1, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
.line 751 |
|
:goto_2 |
|
iget-object v1, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; |
|
|
|
invoke-static {v0}, Ljava/lang/Integer;->valueOf(Ljava/lang/String;)Ljava/lang/Integer; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I |
|
|
|
move-result v0 |
|
|
|
iput v0, v1, Lcom/viatech/device/DeviceInfo;->version:I |
|
|
|
.line 752 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mConnCallbacks:Ljava/util/List; |
|
|
|
invoke-interface {v0}, Ljava/util/List;->size()I |
|
|
|
move-result v0 |
|
|
|
add-int/lit8 v0, v0, -0x1 |
|
|
|
move v1, v0 |
|
|
|
:goto_3 |
|
if-ltz v1, :cond_0 |
|
|
|
.line 753 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mConnCallbacks:Ljava/util/List; |
|
|
|
invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object; |
|
|
|
move-result-object v0 |
|
|
|
check-cast v0, Lcom/viatech/device/VPaiDeviceConnectionListener; |
|
|
|
.line 754 |
|
iget-object v2, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; |
|
|
|
invoke-interface {v0, v2}, Lcom/viatech/device/VPaiDeviceConnectionListener;->onDeviceInfoChanged(Lcom/viatech/device/DeviceInfo;)V |
|
|
|
.line 752 |
|
add-int/lit8 v0, v1, -0x1 |
|
|
|
move v1, v0 |
|
|
|
goto :goto_3 |
|
|
|
.line 742 |
|
:cond_4 |
|
add-int/lit8 v4, v1, 0x34 |
|
|
|
aget-byte v4, p1, v4 |
|
|
|
int-to-char v4, v4 |
|
|
|
aput-char v4, v3, v1 |
|
|
|
.line 743 |
|
aget-char v4, v3, v1 |
|
:try_end_0 |
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0 |
|
|
|
if-eqz v4, :cond_5 |
|
|
|
if-ne v0, v2, :cond_5 |
|
|
|
move v0, v1 |
|
|
|
.line 738 |
|
:cond_5 |
|
add-int/lit8 v1, v1, 0x1 |
|
|
|
goto :goto_1 |
|
|
|
.line 756 |
|
:catch_0 |
|
move-exception v0 |
|
|
|
goto/16 :goto_0 |
|
|
|
:cond_6 |
|
move-object v0, v1 |
|
|
|
goto :goto_2 |
|
.end method |
|
|
|
.method private parseUbootEnv([BI)V |
|
.locals 7 |
|
|
|
.prologue |
|
const/4 v2, -0x1 |
|
|
|
.line 576 |
|
if-eqz p2, :cond_1 |
|
|
|
.line 650 |
|
:cond_0 |
|
:goto_0 |
|
return-void |
|
|
|
.line 581 |
|
:cond_1 |
|
const/16 v0, 0xc |
|
|
|
:try_start_0 |
|
invoke-direct {p0, p1, v0}, Lcom/viatech/device/VPaiVTPDevice;->bytes2Int([BI)I |
|
|
|
move-result v3 |
|
|
|
.line 582 |
|
if-lez v3, :cond_0 |
|
|
|
.line 583 |
|
new-array v4, v3, [C |
|
|
|
.line 585 |
|
const/16 v0, 0x14 |
|
|
|
move v1, v0 |
|
|
|
move v0, v2 |
|
|
|
:goto_1 |
|
add-int/lit8 v5, v3, 0x14 |
|
|
|
if-ge v1, v5, :cond_5 |
|
|
|
.line 586 |
|
aget-byte v5, p1, v1 |
|
|
|
if-nez v5, :cond_3 |
|
|
|
.line 587 |
|
if-ne v0, v2, :cond_2 |
|
|
|
.line 588 |
|
add-int/lit8 v0, v1, -0x14 |
|
|
|
.line 590 |
|
:cond_2 |
|
add-int/lit8 v5, v1, -0x14 |
|
|
|
const/16 v6, 0x30 |
|
|
|
aput-char v6, v4, v5 |
|
|
|
.line 585 |
|
:goto_2 |
|
add-int/lit8 v1, v1, 0x1 |
|
|
|
goto :goto_1 |
|
|
|
.line 594 |
|
:cond_3 |
|
add-int/lit8 v5, v1, -0x14 |
|
|
|
aget-byte v6, p1, v1 |
|
|
|
int-to-char v6, v6 |
|
|
|
aput-char v6, v4, v5 |
|
:try_end_0 |
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0 |
|
|
|
goto :goto_2 |
|
|
|
.line 645 |
|
:catch_0 |
|
move-exception v0 |
|
|
|
.line 646 |
|
iget-boolean v1, p0, Lcom/viatech/device/VPaiVTPDevice;->Debug:Z |
|
|
|
if-eqz v1, :cond_4 |
|
|
|
.line 647 |
|
const-string v1, "VPaiVTPDevice" |
|
|
|
invoke-virtual {v0}, Ljava/lang/Exception;->toString()Ljava/lang/String; |
|
|
|
move-result-object v2 |
|
|
|
invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I |
|
|
|
.line 648 |
|
:cond_4 |
|
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V |
|
|
|
goto :goto_0 |
|
|
|
.line 597 |
|
:cond_5 |
|
:try_start_1 |
|
new-instance v1, Ljava/lang/String; |
|
|
|
invoke-direct {v1, v4}, Ljava/lang/String;-><init>([C)V |
|
|
|
.line 598 |
|
const/4 v2, 0x0 |
|
|
|
invoke-virtual {v1, v2, v0}, Ljava/lang/String;->substring(II)Ljava/lang/String; |
|
|
|
move-result-object v2 |
|
|
|
.line 599 |
|
add-int/lit8 v3, v0, 0x1 |
|
|
|
invoke-virtual {v1}, Ljava/lang/String;->length()I |
|
|
|
move-result v4 |
|
|
|
add-int/lit8 v4, v4, -0x1 |
|
|
|
invoke-virtual {v1, v3, v4}, Ljava/lang/String;->substring(II)Ljava/lang/String; |
|
|
|
move-result-object v3 |
|
|
|
.line 600 |
|
iget-boolean v4, p0, Lcom/viatech/device/VPaiVTPDevice;->Debug:Z |
|
|
|
if-eqz v4, :cond_6 |
|
|
|
.line 601 |
|
const-string v4, "VPaiVTPDevice" |
|
|
|
new-instance v5, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v6, "env:" |
|
|
|
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v5 |
|
|
|
invoke-virtual {v5, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v1 |
|
|
|
const-string v5, "...index:" |
|
|
|
invoke-virtual {v1, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v1 |
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
const-string v1, "...envName:" |
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
const-string v1, "...envValue:" |
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
invoke-static {v4, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I |
|
|
|
.line 602 |
|
:cond_6 |
|
const-string v0, "via.module" |
|
|
|
invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z |
|
|
|
move-result v0 |
|
|
|
if-eqz v0, :cond_7 |
|
|
|
.line 603 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; |
|
|
|
iput-object v3, v0, Lcom/viatech/device/DeviceInfo;->module:Ljava/lang/String; |
|
|
|
.line 604 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mConnCallbacks:Ljava/util/List; |
|
|
|
invoke-interface {v0}, Ljava/util/List;->size()I |
|
|
|
move-result v0 |
|
|
|
add-int/lit8 v0, v0, -0x1 |
|
|
|
move v1, v0 |
|
|
|
:goto_3 |
|
if-ltz v1, :cond_7 |
|
|
|
.line 605 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mConnCallbacks:Ljava/util/List; |
|
|
|
invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object; |
|
|
|
move-result-object v0 |
|
|
|
check-cast v0, Lcom/viatech/device/VPaiDeviceConnectionListener; |
|
|
|
.line 606 |
|
iget-object v4, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; |
|
|
|
invoke-interface {v0, v4}, Lcom/viatech/device/VPaiDeviceConnectionListener;->onDeviceInfoChanged(Lcom/viatech/device/DeviceInfo;)V |
|
|
|
.line 604 |
|
add-int/lit8 v0, v1, -0x1 |
|
|
|
move v1, v0 |
|
|
|
goto :goto_3 |
|
|
|
.line 609 |
|
:cond_7 |
|
const-string v0, "ethaddr" |
|
|
|
invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z |
|
|
|
move-result v0 |
|
|
|
if-eqz v0, :cond_8 |
|
|
|
.line 610 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; |
|
|
|
iput-object v3, v0, Lcom/viatech/device/DeviceInfo;->mac:Ljava/lang/String; |
|
|
|
.line 611 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mConnCallbacks:Ljava/util/List; |
|
|
|
invoke-interface {v0}, Ljava/util/List;->size()I |
|
|
|
move-result v0 |
|
|
|
add-int/lit8 v0, v0, -0x1 |
|
|
|
move v1, v0 |
|
|
|
:goto_4 |
|
if-ltz v1, :cond_8 |
|
|
|
.line 612 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mConnCallbacks:Ljava/util/List; |
|
|
|
invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object; |
|
|
|
move-result-object v0 |
|
|
|
check-cast v0, Lcom/viatech/device/VPaiDeviceConnectionListener; |
|
|
|
.line 613 |
|
iget-object v4, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; |
|
|
|
invoke-interface {v0, v4}, Lcom/viatech/device/VPaiDeviceConnectionListener;->onDeviceInfoChanged(Lcom/viatech/device/DeviceInfo;)V |
|
|
|
.line 611 |
|
add-int/lit8 v0, v1, -0x1 |
|
|
|
move v1, v0 |
|
|
|
goto :goto_4 |
|
|
|
.line 616 |
|
:cond_8 |
|
const-string v0, "system1addr" |
|
|
|
invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z |
|
|
|
move-result v0 |
|
|
|
if-eqz v0, :cond_9 |
|
|
|
.line 617 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; |
|
|
|
iput-object v3, v0, Lcom/viatech/device/DeviceInfo;->system1addr:Ljava/lang/String; |
|
|
|
.line 618 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mConnCallbacks:Ljava/util/List; |
|
|
|
invoke-interface {v0}, Ljava/util/List;->size()I |
|
|
|
move-result v0 |
|
|
|
add-int/lit8 v0, v0, -0x1 |
|
|
|
move v1, v0 |
|
|
|
:goto_5 |
|
if-ltz v1, :cond_9 |
|
|
|
.line 619 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mConnCallbacks:Ljava/util/List; |
|
|
|
invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object; |
|
|
|
move-result-object v0 |
|
|
|
check-cast v0, Lcom/viatech/device/VPaiDeviceConnectionListener; |
|
|
|
.line 620 |
|
iget-object v4, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; |
|
|
|
invoke-interface {v0, v4}, Lcom/viatech/device/VPaiDeviceConnectionListener;->onDeviceInfoChanged(Lcom/viatech/device/DeviceInfo;)V |
|
|
|
.line 618 |
|
add-int/lit8 v0, v1, -0x1 |
|
|
|
move v1, v0 |
|
|
|
goto :goto_5 |
|
|
|
.line 623 |
|
:cond_9 |
|
const-string v0, "system2addr" |
|
|
|
invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z |
|
|
|
move-result v0 |
|
|
|
if-eqz v0, :cond_a |
|
|
|
.line 624 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; |
|
|
|
iput-object v3, v0, Lcom/viatech/device/DeviceInfo;->system2addr:Ljava/lang/String; |
|
|
|
.line 625 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mConnCallbacks:Ljava/util/List; |
|
|
|
invoke-interface {v0}, Ljava/util/List;->size()I |
|
|
|
move-result v0 |
|
|
|
add-int/lit8 v0, v0, -0x1 |
|
|
|
move v1, v0 |
|
|
|
:goto_6 |
|
if-ltz v1, :cond_a |
|
|
|
.line 626 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mConnCallbacks:Ljava/util/List; |
|
|
|
invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object; |
|
|
|
move-result-object v0 |
|
|
|
check-cast v0, Lcom/viatech/device/VPaiDeviceConnectionListener; |
|
|
|
.line 627 |
|
iget-object v4, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; |
|
|
|
invoke-interface {v0, v4}, Lcom/viatech/device/VPaiDeviceConnectionListener;->onDeviceInfoChanged(Lcom/viatech/device/DeviceInfo;)V |
|
|
|
.line 625 |
|
add-int/lit8 v0, v1, -0x1 |
|
|
|
move v1, v0 |
|
|
|
goto :goto_6 |
|
|
|
.line 630 |
|
:cond_a |
|
const-string v0, "systemflag" |
|
|
|
invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z |
|
|
|
move-result v0 |
|
|
|
if-eqz v0, :cond_b |
|
|
|
.line 631 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; |
|
|
|
iput-object v3, v0, Lcom/viatech/device/DeviceInfo;->systemflag:Ljava/lang/String; |
|
|
|
.line 632 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mConnCallbacks:Ljava/util/List; |
|
|
|
invoke-interface {v0}, Ljava/util/List;->size()I |
|
|
|
move-result v0 |
|
|
|
add-int/lit8 v0, v0, -0x1 |
|
|
|
move v1, v0 |
|
|
|
:goto_7 |
|
if-ltz v1, :cond_b |
|
|
|
.line 633 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mConnCallbacks:Ljava/util/List; |
|
|
|
invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object; |
|
|
|
move-result-object v0 |
|
|
|
check-cast v0, Lcom/viatech/device/VPaiDeviceConnectionListener; |
|
|
|
.line 634 |
|
iget-object v4, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; |
|
|
|
invoke-interface {v0, v4}, Lcom/viatech/device/VPaiDeviceConnectionListener;->onDeviceInfoChanged(Lcom/viatech/device/DeviceInfo;)V |
|
|
|
.line 632 |
|
add-int/lit8 v0, v1, -0x1 |
|
|
|
move v1, v0 |
|
|
|
goto :goto_7 |
|
|
|
.line 637 |
|
:cond_b |
|
const-string v0, "via.deviceid" |
|
|
|
invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z |
|
|
|
move-result v0 |
|
|
|
if-eqz v0, :cond_0 |
|
|
|
.line 638 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; |
|
|
|
iput-object v3, v0, Lcom/viatech/device/DeviceInfo;->deviceid:Ljava/lang/String; |
|
|
|
.line 639 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mConnCallbacks:Ljava/util/List; |
|
|
|
invoke-interface {v0}, Ljava/util/List;->size()I |
|
|
|
move-result v0 |
|
|
|
add-int/lit8 v0, v0, -0x1 |
|
|
|
move v1, v0 |
|
|
|
:goto_8 |
|
if-ltz v1, :cond_0 |
|
|
|
.line 640 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mConnCallbacks:Ljava/util/List; |
|
|
|
invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object; |
|
|
|
move-result-object v0 |
|
|
|
check-cast v0, Lcom/viatech/device/VPaiDeviceConnectionListener; |
|
|
|
.line 641 |
|
iget-object v2, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; |
|
|
|
invoke-interface {v0, v2}, Lcom/viatech/device/VPaiDeviceConnectionListener;->onDeviceInfoChanged(Lcom/viatech/device/DeviceInfo;)V |
|
:try_end_1 |
|
.catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0 |
|
|
|
.line 639 |
|
add-int/lit8 v0, v1, -0x1 |
|
|
|
move v1, v0 |
|
|
|
goto :goto_8 |
|
.end method |
|
|
|
.method private parseVideoEncInfo([BI)V |
|
.locals 7 |
|
|
|
.prologue |
|
const/4 v3, 0x0 |
|
|
|
.line 654 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mSetResolutionCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
if-eqz v0, :cond_0 |
|
|
|
.line 656 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mSetResolutionCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
const-string v1, "startPrv" |
|
|
|
const-string v2, "" |
|
|
|
invoke-direct {p0, v1, v2, v3, v3}, Lcom/viatech/device/VPaiVTPDevice;->buildJsonResponse(Ljava/lang/String;Ljava/lang/String;II)Ljava/lang/String; |
|
|
|
move-result-object v1 |
|
|
|
invoke-interface {v0, v1}, Lcom/viatech/device/DeviceMessage$DeviceMessageCallback;->onMessageResult(Ljava/lang/String;)V |
|
|
|
.line 657 |
|
const/4 v0, 0x0 |
|
|
|
iput-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mSetResolutionCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
.line 659 |
|
:cond_0 |
|
if-eqz p2, :cond_2 |
|
|
|
.line 717 |
|
:cond_1 |
|
return-void |
|
|
|
.line 662 |
|
:cond_2 |
|
const/16 v0, 0x14 |
|
|
|
aget-byte v0, p1, v0 |
|
|
|
.line 663 |
|
const/16 v1, 0x15 |
|
|
|
aget-byte v1, p1, v1 |
|
|
|
.line 664 |
|
const/16 v1, 0x16 |
|
|
|
aget-byte v1, p1, v1 |
|
|
|
.line 665 |
|
iget-boolean v2, p0, Lcom/viatech/device/VPaiVTPDevice;->Debug:Z |
|
|
|
if-eqz v2, :cond_3 |
|
|
|
.line 666 |
|
const-string v2, "VPaiVTPDevice" |
|
|
|
new-instance v3, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v4, "type1:" |
|
|
|
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(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
const-string v3, "...chnid:" |
|
|
|
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
invoke-static {v2, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I |
|
|
|
.line 668 |
|
:cond_3 |
|
const/16 v0, 0x17 |
|
|
|
aget-byte v0, p1, v0 |
|
|
|
.line 669 |
|
const/16 v1, 0x18 |
|
|
|
aget-byte v1, p1, v1 |
|
|
|
.line 670 |
|
const/16 v1, 0x19 |
|
|
|
aget-byte v1, p1, v1 |
|
|
|
.line 671 |
|
iget-boolean v2, p0, Lcom/viatech/device/VPaiVTPDevice;->Debug:Z |
|
|
|
if-eqz v2, :cond_4 |
|
|
|
.line 672 |
|
const-string v2, "VPaiVTPDevice" |
|
|
|
new-instance v3, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v4, "type2:" |
|
|
|
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(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
const-string v3, "...codectype:" |
|
|
|
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
invoke-static {v2, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I |
|
|
|
.line 674 |
|
:cond_4 |
|
const/16 v0, 0x1a |
|
|
|
aget-byte v0, p1, v0 |
|
|
|
.line 675 |
|
const/16 v1, 0x1b |
|
|
|
aget-byte v1, p1, v1 |
|
|
|
.line 676 |
|
const/16 v1, 0x1c |
|
|
|
aget-byte v1, p1, v1 |
|
|
|
.line 677 |
|
iget-boolean v2, p0, Lcom/viatech/device/VPaiVTPDevice;->Debug:Z |
|
|
|
if-eqz v2, :cond_5 |
|
|
|
.line 678 |
|
const-string v2, "VPaiVTPDevice" |
|
|
|
new-instance v3, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v4, "type3:" |
|
|
|
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(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
const-string v3, "...framerate:" |
|
|
|
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
invoke-static {v2, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I |
|
|
|
.line 680 |
|
:cond_5 |
|
const/16 v0, 0x1d |
|
|
|
aget-byte v0, p1, v0 |
|
|
|
.line 681 |
|
const/16 v1, 0x1e |
|
|
|
aget-byte v1, p1, v1 |
|
|
|
.line 682 |
|
const/16 v1, 0x1f |
|
|
|
invoke-direct {p0, p1, v1}, Lcom/viatech/device/VPaiVTPDevice;->bytes2Short([BI)S |
|
|
|
move-result v1 |
|
|
|
.line 683 |
|
iget-boolean v2, p0, Lcom/viatech/device/VPaiVTPDevice;->Debug:Z |
|
|
|
if-eqz v2, :cond_6 |
|
|
|
.line 684 |
|
const-string v2, "VPaiVTPDevice" |
|
|
|
new-instance v3, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v4, "type4:" |
|
|
|
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(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
const-string v3, "...picgroup:" |
|
|
|
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
invoke-static {v2, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I |
|
|
|
.line 686 |
|
:cond_6 |
|
const/16 v0, 0x21 |
|
|
|
aget-byte v0, p1, v0 |
|
|
|
.line 687 |
|
const/16 v1, 0x22 |
|
|
|
aget-byte v1, p1, v1 |
|
|
|
.line 688 |
|
const/16 v1, 0x23 |
|
|
|
invoke-direct {p0, p1, v1}, Lcom/viatech/device/VPaiVTPDevice;->bytes2Int([BI)I |
|
|
|
move-result v1 |
|
|
|
.line 689 |
|
iget-boolean v2, p0, Lcom/viatech/device/VPaiVTPDevice;->Debug:Z |
|
|
|
if-eqz v2, :cond_7 |
|
|
|
.line 690 |
|
const-string v2, "VPaiVTPDevice" |
|
|
|
new-instance v3, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v4, "type7:" |
|
|
|
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(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
const-string v3, "...bitrate:" |
|
|
|
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
invoke-static {v2, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I |
|
|
|
.line 692 |
|
:cond_7 |
|
const/16 v0, 0x27 |
|
|
|
aget-byte v0, p1, v0 |
|
|
|
.line 693 |
|
const/16 v1, 0x28 |
|
|
|
aget-byte v1, p1, v1 |
|
|
|
.line 694 |
|
const/16 v1, 0x29 |
|
|
|
invoke-direct {p0, p1, v1}, Lcom/viatech/device/VPaiVTPDevice;->bytes2Short([BI)S |
|
|
|
move-result v1 |
|
|
|
.line 695 |
|
iget-boolean v2, p0, Lcom/viatech/device/VPaiVTPDevice;->Debug:Z |
|
|
|
if-eqz v2, :cond_8 |
|
|
|
.line 696 |
|
const-string v2, "VPaiVTPDevice" |
|
|
|
new-instance v3, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v4, "type5:" |
|
|
|
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(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
const-string v3, "...videowidth:" |
|
|
|
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
invoke-static {v2, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I |
|
|
|
.line 698 |
|
:cond_8 |
|
const/16 v0, 0x2b |
|
|
|
aget-byte v0, p1, v0 |
|
|
|
.line 699 |
|
const/16 v2, 0x2c |
|
|
|
aget-byte v2, p1, v2 |
|
|
|
.line 700 |
|
const/16 v2, 0x2d |
|
|
|
invoke-direct {p0, p1, v2}, Lcom/viatech/device/VPaiVTPDevice;->bytes2Short([BI)S |
|
|
|
move-result v2 |
|
|
|
.line 701 |
|
iget-boolean v3, p0, Lcom/viatech/device/VPaiVTPDevice;->Debug:Z |
|
|
|
if-eqz v3, :cond_9 |
|
|
|
.line 702 |
|
const-string v3, "VPaiVTPDevice" |
|
|
|
new-instance v4, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v5, "type6:" |
|
|
|
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v4 |
|
|
|
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
const-string v4, "...videoheight:" |
|
|
|
invoke-virtual {v0, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
invoke-static {v3, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I |
|
|
|
.line 704 |
|
:cond_9 |
|
const/16 v0, 0x2f |
|
|
|
aget-byte v0, p1, v0 |
|
|
|
.line 705 |
|
const/16 v3, 0x30 |
|
|
|
aget-byte v3, p1, v3 |
|
|
|
.line 706 |
|
const/16 v3, 0x31 |
|
|
|
aget-byte v3, p1, v3 |
|
|
|
.line 707 |
|
iget-boolean v4, p0, Lcom/viatech/device/VPaiVTPDevice;->Debug:Z |
|
|
|
if-eqz v4, :cond_a |
|
|
|
.line 708 |
|
const-string v4, "VPaiVTPDevice" |
|
|
|
new-instance v5, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v6, "type8:" |
|
|
|
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v5 |
|
|
|
invoke-virtual {v5, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
const-string v5, "...qp:" |
|
|
|
invoke-virtual {v0, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
invoke-static {v4, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I |
|
|
|
.line 709 |
|
:cond_a |
|
if-eqz v2, :cond_1 |
|
|
|
if-eqz v1, :cond_1 |
|
|
|
.line 710 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; |
|
|
|
iput v2, v0, Lcom/viatech/device/DeviceInfo;->videoHeight:I |
|
|
|
.line 711 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; |
|
|
|
iput v1, v0, Lcom/viatech/device/DeviceInfo;->videoWidth:I |
|
|
|
.line 712 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mConnCallbacks:Ljava/util/List; |
|
|
|
invoke-interface {v0}, Ljava/util/List;->size()I |
|
|
|
move-result v0 |
|
|
|
add-int/lit8 v0, v0, -0x1 |
|
|
|
move v1, v0 |
|
|
|
:goto_0 |
|
if-ltz v1, :cond_1 |
|
|
|
.line 713 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mConnCallbacks:Ljava/util/List; |
|
|
|
invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object; |
|
|
|
move-result-object v0 |
|
|
|
check-cast v0, Lcom/viatech/device/VPaiDeviceConnectionListener; |
|
|
|
.line 714 |
|
iget-object v2, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; |
|
|
|
invoke-interface {v0, v2}, Lcom/viatech/device/VPaiDeviceConnectionListener;->onDeviceInfoChanged(Lcom/viatech/device/DeviceInfo;)V |
|
|
|
.line 712 |
|
add-int/lit8 v0, v1, -0x1 |
|
|
|
move v1, v0 |
|
|
|
goto :goto_0 |
|
.end method |
|
|
|
.method private saveJpg([B)V |
|
.locals 7 |
|
|
|
.prologue |
|
const/4 v2, 0x0 |
|
|
|
const/4 v1, 0x0 |
|
|
|
.line 328 |
|
if-eqz p1, :cond_0 |
|
|
|
array-length v0, p1 |
|
|
|
if-gez v0, :cond_2 |
|
|
|
.line 329 |
|
:cond_0 |
|
invoke-direct {p0, v1}, Lcom/viatech/device/VPaiVTPDevice;->takePicErrorResponse(I)V |
|
|
|
.line 377 |
|
:cond_1 |
|
:goto_0 |
|
return-void |
|
|
|
.line 333 |
|
:cond_2 |
|
new-instance v0, Ljava/util/Date; |
|
|
|
invoke-direct {v0}, Ljava/util/Date;-><init>()V |
|
|
|
.line 334 |
|
new-instance v1, Ljava/text/SimpleDateFormat; |
|
|
|
const-string v3, "yyyy_MM_dd_HH_mm_ss" |
|
|
|
invoke-direct {v1, v3}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V |
|
|
|
.line 335 |
|
new-instance v3, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
sget-object v4, Lcom/viatech/Config;->d:Ljava/lang/String; |
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v3 |
|
|
|
const-string v4, "/P" |
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v3 |
|
|
|
invoke-virtual {v1, v0}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
const-string v1, ".jpg" |
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
.line 336 |
|
new-instance v3, Ljava/io/File; |
|
|
|
invoke-direct {v3, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V |
|
|
|
.line 338 |
|
:try_start_0 |
|
new-instance v1, Ljava/io/FileOutputStream; |
|
|
|
const/4 v4, 0x0 |
|
|
|
invoke-direct {v1, v3, v4}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;Z)V |
|
:try_end_0 |
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_6 |
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0 |
|
|
|
.line 339 |
|
:try_start_1 |
|
invoke-virtual {v1, p1}, Ljava/io/FileOutputStream;->write([B)V |
|
|
|
.line 340 |
|
invoke-virtual {v1}, Ljava/io/FileOutputStream;->flush()V |
|
|
|
.line 341 |
|
invoke-direct {p0, v0}, Lcom/viatech/device/VPaiVTPDevice;->encodeBitmap(Ljava/lang/String;)Z |
|
:try_end_1 |
|
.catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_3 |
|
.catchall {:try_start_1 .. :try_end_1} :catchall_1 |
|
|
|
move-result v2 |
|
|
|
if-nez v2, :cond_3 |
|
|
|
.line 370 |
|
if-eqz v1, :cond_1 |
|
|
|
.line 371 |
|
:try_start_2 |
|
invoke-virtual {v1}, Ljava/io/FileOutputStream;->close()V |
|
:try_end_2 |
|
.catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_0 |
|
|
|
goto :goto_0 |
|
|
|
.line 373 |
|
:catch_0 |
|
move-exception v0 |
|
|
|
.line 374 |
|
invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V |
|
|
|
goto :goto_0 |
|
|
|
.line 342 |
|
:cond_3 |
|
:try_start_3 |
|
const-string v2, "takePic" |
|
|
|
const/4 v4, 0x0 |
|
|
|
const/4 v5, 0x0 |
|
|
|
const/4 v6, 0x0 |
|
|
|
invoke-direct {p0, v2, v4, v5, v6}, Lcom/viatech/device/VPaiVTPDevice;->buildJsonResponse(Ljava/lang/String;Ljava/lang/String;II)Ljava/lang/String; |
|
:try_end_3 |
|
.catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_3 |
|
.catchall {:try_start_3 .. :try_end_3} :catchall_1 |
|
|
|
move-result-object v2 |
|
|
|
.line 344 |
|
:try_start_4 |
|
new-instance v4, Lorg/json/JSONObject; |
|
|
|
invoke-direct {v4, v2}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V |
|
|
|
.line 345 |
|
const-string v2, "filename" |
|
|
|
invoke-virtual {v4, v2, v0}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject; |
|
|
|
.line 346 |
|
const-string v0, "flag" |
|
|
|
const/4 v2, 0x1 |
|
|
|
invoke-virtual {v4, v0, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject; |
|
|
|
.line 347 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mUiHandler:Landroid/os/Handler; |
|
|
|
new-instance v2, Lcom/viatech/device/VPaiVTPDevice$3; |
|
|
|
invoke-direct {v2, p0, v4}, Lcom/viatech/device/VPaiVTPDevice$3;-><init>(Lcom/viatech/device/VPaiVTPDevice;Lorg/json/JSONObject;)V |
|
|
|
invoke-virtual {v0, v2}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z |
|
:try_end_4 |
|
.catch Lorg/json/JSONException; {:try_start_4 .. :try_end_4} :catch_2 |
|
.catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_3 |
|
.catchall {:try_start_4 .. :try_end_4} :catchall_1 |
|
|
|
.line 370 |
|
:cond_4 |
|
:goto_1 |
|
if-eqz v1, :cond_1 |
|
|
|
.line 371 |
|
:try_start_5 |
|
invoke-virtual {v1}, Ljava/io/FileOutputStream;->close()V |
|
:try_end_5 |
|
.catch Ljava/io/IOException; {:try_start_5 .. :try_end_5} :catch_1 |
|
|
|
goto :goto_0 |
|
|
|
.line 373 |
|
:catch_1 |
|
move-exception v0 |
|
|
|
.line 374 |
|
invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V |
|
|
|
goto :goto_0 |
|
|
|
.line 356 |
|
:catch_2 |
|
move-exception v0 |
|
|
|
.line 357 |
|
:try_start_6 |
|
iget-boolean v2, p0, Lcom/viatech/device/VPaiVTPDevice;->Debug:Z |
|
|
|
if-eqz v2, :cond_4 |
|
|
|
.line 358 |
|
const-string v2, "VPaiVTPDevice" |
|
|
|
new-instance v4, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v5, "Json Failed: " |
|
|
|
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v4 |
|
|
|
invoke-virtual {v4, 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 {v2, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I |
|
:try_end_6 |
|
.catch Ljava/lang/Exception; {:try_start_6 .. :try_end_6} :catch_3 |
|
.catchall {:try_start_6 .. :try_end_6} :catchall_1 |
|
|
|
goto :goto_1 |
|
|
|
.line 360 |
|
:catch_3 |
|
move-exception v0 |
|
|
|
.line 361 |
|
:goto_2 |
|
:try_start_7 |
|
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V |
|
|
|
.line 362 |
|
if-eqz v3, :cond_5 |
|
|
|
invoke-virtual {v3}, Ljava/io/File;->exists()Z |
|
|
|
move-result v2 |
|
|
|
if-eqz v2, :cond_5 |
|
|
|
.line 363 |
|
invoke-virtual {v3}, Ljava/io/File;->delete()Z |
|
|
|
.line 365 |
|
:cond_5 |
|
iget-boolean v2, p0, Lcom/viatech/device/VPaiVTPDevice;->Debug:Z |
|
|
|
if-eqz v2, :cond_6 |
|
|
|
.line 366 |
|
const-string v2, "VPaiVTPDevice" |
|
|
|
new-instance v3, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v4, "saveJpg : Exception : " |
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v3 |
|
|
|
invoke-virtual {v0}, Ljava/lang/Exception;->toString()Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
invoke-static {v2, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I |
|
|
|
.line 367 |
|
:cond_6 |
|
const/4 v0, 0x0 |
|
|
|
invoke-direct {p0, v0}, Lcom/viatech/device/VPaiVTPDevice;->takePicErrorResponse(I)V |
|
:try_end_7 |
|
.catchall {:try_start_7 .. :try_end_7} :catchall_1 |
|
|
|
.line 370 |
|
if-eqz v1, :cond_1 |
|
|
|
.line 371 |
|
:try_start_8 |
|
invoke-virtual {v1}, Ljava/io/FileOutputStream;->close()V |
|
:try_end_8 |
|
.catch Ljava/io/IOException; {:try_start_8 .. :try_end_8} :catch_4 |
|
|
|
goto/16 :goto_0 |
|
|
|
.line 373 |
|
:catch_4 |
|
move-exception v0 |
|
|
|
.line 374 |
|
invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V |
|
|
|
goto/16 :goto_0 |
|
|
|
.line 369 |
|
:catchall_0 |
|
move-exception v0 |
|
|
|
move-object v1, v2 |
|
|
|
.line 370 |
|
:goto_3 |
|
if-eqz v1, :cond_7 |
|
|
|
.line 371 |
|
:try_start_9 |
|
invoke-virtual {v1}, Ljava/io/FileOutputStream;->close()V |
|
:try_end_9 |
|
.catch Ljava/io/IOException; {:try_start_9 .. :try_end_9} :catch_5 |
|
|
|
.line 376 |
|
:cond_7 |
|
:goto_4 |
|
throw v0 |
|
|
|
.line 373 |
|
:catch_5 |
|
move-exception v1 |
|
|
|
.line 374 |
|
invoke-virtual {v1}, Ljava/io/IOException;->printStackTrace()V |
|
|
|
goto :goto_4 |
|
|
|
.line 369 |
|
:catchall_1 |
|
move-exception v0 |
|
|
|
goto :goto_3 |
|
|
|
.line 360 |
|
:catch_6 |
|
move-exception v0 |
|
|
|
move-object v1, v2 |
|
|
|
goto :goto_2 |
|
.end method |
|
|
|
.method private takePicErrorResponse(I)V |
|
.locals 4 |
|
|
|
.prologue |
|
const/4 v3, 0x0 |
|
|
|
const/4 v2, 0x0 |
|
|
|
.line 382 |
|
const/16 v0, 0x9 |
|
|
|
if-ne p1, v0, :cond_1 |
|
|
|
.line 383 |
|
const-string v0, "takePic" |
|
|
|
const/16 v1, -0x65 |
|
|
|
invoke-direct {p0, v0, v3, v2, v1}, Lcom/viatech/device/VPaiVTPDevice;->buildJsonResponse(Ljava/lang/String;Ljava/lang/String;II)Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
.line 388 |
|
:goto_0 |
|
:try_start_0 |
|
new-instance v1, Lorg/json/JSONObject; |
|
|
|
invoke-direct {v1, v0}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V |
|
|
|
.line 389 |
|
const-string v0, "flag" |
|
|
|
const/4 v2, 0x1 |
|
|
|
invoke-virtual {v1, v0, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject; |
|
|
|
.line 390 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mUiHandler:Landroid/os/Handler; |
|
|
|
new-instance v2, Lcom/viatech/device/VPaiVTPDevice$4; |
|
|
|
invoke-direct {v2, p0, v1}, Lcom/viatech/device/VPaiVTPDevice$4;-><init>(Lcom/viatech/device/VPaiVTPDevice;Lorg/json/JSONObject;)V |
|
|
|
invoke-virtual {v0, v2}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z |
|
:try_end_0 |
|
.catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0 |
|
|
|
.line 403 |
|
:cond_0 |
|
:goto_1 |
|
return-void |
|
|
|
.line 385 |
|
:cond_1 |
|
const-string v0, "takePic" |
|
|
|
const/16 v1, -0x64 |
|
|
|
invoke-direct {p0, v0, v3, v2, v1}, Lcom/viatech/device/VPaiVTPDevice;->buildJsonResponse(Ljava/lang/String;Ljava/lang/String;II)Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
goto :goto_0 |
|
|
|
.line 399 |
|
:catch_0 |
|
move-exception v0 |
|
|
|
.line 400 |
|
iget-boolean v1, p0, Lcom/viatech/device/VPaiVTPDevice;->Debug:Z |
|
|
|
if-eqz v1, :cond_0 |
|
|
|
.line 401 |
|
const-string v1, "VPaiVTPDevice" |
|
|
|
new-instance v2, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v3, "Json Failed: " |
|
|
|
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 |
|
|
|
goto :goto_1 |
|
.end method |
|
|
|
.method private updateErrorResponse()V |
|
.locals 4 |
|
|
|
.prologue |
|
.line 407 |
|
const-string v0, "update" |
|
|
|
const/4 v1, 0x0 |
|
|
|
const/4 v2, 0x0 |
|
|
|
const/16 v3, -0x6e |
|
|
|
invoke-direct {p0, v0, v1, v2, v3}, Lcom/viatech/device/VPaiVTPDevice;->buildJsonResponse(Ljava/lang/String;Ljava/lang/String;II)Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
.line 409 |
|
:try_start_0 |
|
new-instance v1, Lorg/json/JSONObject; |
|
|
|
invoke-direct {v1, v0}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V |
|
|
|
.line 410 |
|
const-string v0, "flag" |
|
|
|
const/4 v2, 0x1 |
|
|
|
invoke-virtual {v1, v0, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject; |
|
|
|
.line 411 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mUiHandler:Landroid/os/Handler; |
|
|
|
new-instance v2, Lcom/viatech/device/VPaiVTPDevice$5; |
|
|
|
invoke-direct {v2, p0, v1}, Lcom/viatech/device/VPaiVTPDevice$5;-><init>(Lcom/viatech/device/VPaiVTPDevice;Lorg/json/JSONObject;)V |
|
|
|
invoke-virtual {v0, v2}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z |
|
:try_end_0 |
|
.catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0 |
|
|
|
.line 424 |
|
:cond_0 |
|
:goto_0 |
|
return-void |
|
|
|
.line 420 |
|
:catch_0 |
|
move-exception v0 |
|
|
|
.line 421 |
|
iget-boolean v1, p0, Lcom/viatech/device/VPaiVTPDevice;->Debug:Z |
|
|
|
if-eqz v1, :cond_0 |
|
|
|
.line 422 |
|
const-string v1, "VPaiVTPDevice" |
|
|
|
new-instance v2, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v3, "Json Failed: " |
|
|
|
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 |
|
|
|
goto :goto_0 |
|
.end method |
|
|
|
|
|
# virtual methods |
|
.method public close()V |
|
.locals 5 |
|
|
|
.prologue |
|
const/4 v3, 0x0 |
|
|
|
.line 71 |
|
invoke-super {p0}, Lcom/viatech/device/VPaiDevice;->close()V |
|
|
|
.line 72 |
|
iget-boolean v0, p0, Lcom/viatech/device/VPaiVTPDevice;->Debug:Z |
|
|
|
if-eqz v0, :cond_0 |
|
|
|
.line 73 |
|
const-string v0, "VPaiVTPDevice" |
|
|
|
new-instance v1, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v2, "close: isOpened:" |
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v1 |
|
|
|
iget-boolean v2, p0, Lcom/viatech/device/VPaiVTPDevice;->isOpened:Z |
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Z)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;->i(Ljava/lang/String;Ljava/lang/String;)I |
|
|
|
.line 74 |
|
:cond_0 |
|
iget-boolean v0, p0, Lcom/viatech/device/VPaiVTPDevice;->isOpened:Z |
|
|
|
if-eqz v0, :cond_4 |
|
|
|
.line 75 |
|
iput-boolean v3, p0, Lcom/viatech/device/VPaiVTPDevice;->isOpened:Z |
|
|
|
.line 76 |
|
iput-boolean v3, p0, Lcom/viatech/device/VPaiVTPDevice;->isStreamOpened:Z |
|
|
|
.line 77 |
|
invoke-virtual {p0, v3}, Lcom/viatech/device/VPaiVTPDevice;->initVTPDevice(Z)Z |
|
|
|
.line 78 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mMediaPortListener:Lcom/viatech/device/MediaPortListener; |
|
|
|
if-eqz v0, :cond_1 |
|
|
|
.line 79 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mMediaPortListener:Lcom/viatech/device/MediaPortListener; |
|
|
|
invoke-interface {v0}, Lcom/viatech/device/MediaPortListener;->onMediaPortDisconnected()I |
|
|
|
.line 80 |
|
iget-boolean v0, p0, Lcom/viatech/device/VPaiVTPDevice;->Debug:Z |
|
|
|
if-eqz v0, :cond_1 |
|
|
|
.line 81 |
|
const-string v0, "VPaiVTPDevice" |
|
|
|
new-instance v1, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v2, "mMediaPortListener = " |
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v1 |
|
|
|
iget-object v2, p0, Lcom/viatech/device/VPaiVTPDevice;->mMediaPortListener:Lcom/viatech/device/MediaPortListener; |
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v1 |
|
|
|
const-string v2, " onMediaPortConnectted" |
|
|
|
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-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I |
|
|
|
.line 83 |
|
:cond_1 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mConnCallbacks:Ljava/util/List; |
|
|
|
invoke-interface {v0}, Ljava/util/List;->size()I |
|
|
|
move-result v0 |
|
|
|
add-int/lit8 v0, v0, -0x1 |
|
|
|
move v1, v0 |
|
|
|
:goto_0 |
|
if-ltz v1, :cond_3 |
|
|
|
.line 84 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mConnCallbacks:Ljava/util/List; |
|
|
|
invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object; |
|
|
|
move-result-object v0 |
|
|
|
check-cast v0, Lcom/viatech/device/VPaiDeviceConnectionListener; |
|
|
|
.line 85 |
|
const/4 v2, 0x0 |
|
|
|
invoke-interface {v0, p0, v2}, Lcom/viatech/device/VPaiDeviceConnectionListener;->onDeviceConnectionChanged(Lcom/viatech/device/VPaiDevice;Lcom/viatech/device/DeviceInfo;)V |
|
|
|
.line 86 |
|
iget-boolean v2, p0, Lcom/viatech/device/VPaiVTPDevice;->Debug:Z |
|
|
|
if-eqz v2, :cond_2 |
|
|
|
.line 87 |
|
const-string v2, "VPaiVTPDevice" |
|
|
|
new-instance v3, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v4, "notify listener = " |
|
|
|
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/Object;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
const-string v3, " device: null" |
|
|
|
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
invoke-static {v2, v0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I |
|
|
|
.line 83 |
|
:cond_2 |
|
add-int/lit8 v0, v1, -0x1 |
|
|
|
move v1, v0 |
|
|
|
goto :goto_0 |
|
|
|
.line 89 |
|
:cond_3 |
|
const v0, 0x7f0700a1 |
|
|
|
invoke-static {v0}, Lcom/viatech/VPaiApplication;->b(I)V |
|
|
|
.line 91 |
|
:cond_4 |
|
return-void |
|
.end method |
|
|
|
.method public connectDevice(Lcom/viatech/device/VPaiDeviceConnectionListener;Lcom/viatech/device/MediaPortListener;Z)V |
|
.locals 4 |
|
|
|
.prologue |
|
const/4 v3, 0x2 |
|
|
|
.line 105 |
|
if-eqz p1, :cond_0 |
|
|
|
.line 106 |
|
invoke-virtual {p0, p1}, Lcom/viatech/device/VPaiVTPDevice;->registerConnCallback(Lcom/viatech/device/VPaiDeviceConnectionListener;)V |
|
|
|
.line 109 |
|
:cond_0 |
|
if-eqz p2, :cond_1 |
|
|
|
.line 110 |
|
iput-object p2, p0, Lcom/viatech/device/VPaiVTPDevice;->mMediaPortListener:Lcom/viatech/device/MediaPortListener; |
|
|
|
.line 112 |
|
:cond_1 |
|
iget-boolean v0, p0, Lcom/viatech/device/VPaiVTPDevice;->Debug:Z |
|
|
|
if-eqz v0, :cond_2 |
|
|
|
.line 113 |
|
const-string v0, "VPaiVTPDevice" |
|
|
|
new-instance v1, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v2, "connect mConnectionListener = " |
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v1 |
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v1 |
|
|
|
const-string v2, " mMediaPortListener = " |
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v1 |
|
|
|
iget-object v2, p0, Lcom/viatech/device/VPaiVTPDevice;->mMediaPortListener:Lcom/viatech/device/MediaPortListener; |
|
|
|
invoke-virtual {v1, v2}, 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 115 |
|
:cond_2 |
|
iput v3, p0, Lcom/viatech/device/VPaiVTPDevice;->ctrlStatus:I |
|
|
|
.line 116 |
|
iput v3, p0, Lcom/viatech/device/VPaiVTPDevice;->mediaStatus:I |
|
|
|
.line 117 |
|
iget-boolean v0, p0, Lcom/viatech/device/VPaiVTPDevice;->isOpened:Z |
|
|
|
if-nez v0, :cond_5 |
|
|
|
iget-boolean v0, p0, Lcom/viatech/device/VPaiVTPDevice;->isStreamOpened:Z |
|
|
|
if-eqz v0, :cond_5 |
|
|
|
.line 118 |
|
invoke-direct {p0}, Lcom/viatech/device/VPaiVTPDevice;->openVTP()V |
|
|
|
.line 119 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; |
|
|
|
if-nez v0, :cond_3 |
|
|
|
.line 120 |
|
invoke-direct {p0}, Lcom/viatech/device/VPaiVTPDevice;->iniDeviceInfo()V |
|
|
|
.line 122 |
|
:cond_3 |
|
iget-object v2, p0, Lcom/viatech/device/VPaiVTPDevice;->mConnCallbacks:Ljava/util/List; |
|
|
|
monitor-enter v2 |
|
|
|
.line 123 |
|
:try_start_0 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mConnCallbacks:Ljava/util/List; |
|
|
|
invoke-interface {v0}, Ljava/util/List;->size()I |
|
|
|
move-result v0 |
|
|
|
add-int/lit8 v0, v0, -0x1 |
|
|
|
move v1, v0 |
|
|
|
:goto_0 |
|
if-ltz v1, :cond_4 |
|
|
|
.line 124 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mConnCallbacks:Ljava/util/List; |
|
|
|
invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object; |
|
|
|
move-result-object v0 |
|
|
|
check-cast v0, Lcom/viatech/device/VPaiDeviceConnectionListener; |
|
|
|
.line 125 |
|
iget-object v3, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; |
|
|
|
invoke-interface {v0, p0, v3}, Lcom/viatech/device/VPaiDeviceConnectionListener;->onDeviceConnectionChanged(Lcom/viatech/device/VPaiDevice;Lcom/viatech/device/DeviceInfo;)V |
|
|
|
.line 123 |
|
add-int/lit8 v0, v1, -0x1 |
|
|
|
move v1, v0 |
|
|
|
goto :goto_0 |
|
|
|
.line 127 |
|
:cond_4 |
|
monitor-exit v2 |
|
|
|
.line 129 |
|
:cond_5 |
|
return-void |
|
|
|
.line 127 |
|
:catchall_0 |
|
move-exception v0 |
|
|
|
monitor-exit v2 |
|
:try_end_0 |
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0 |
|
|
|
throw v0 |
|
.end method |
|
|
|
.method public getDeviceInfo(Lcom/viatech/device/DeviceMessage$DeviceMessageCallback;)V |
|
.locals 2 |
|
|
|
.prologue |
|
.line 161 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mVtpProxy:Lcom/a/f; |
|
|
|
if-eqz v0, :cond_1 |
|
|
|
.line 162 |
|
iget-boolean v0, p0, Lcom/viatech/device/VPaiVTPDevice;->Debug:Z |
|
|
|
if-eqz v0, :cond_0 |
|
|
|
.line 163 |
|
const-string v0, "VPaiVTPDevice" |
|
|
|
const-string v1, "getDeviceInfo" |
|
|
|
invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I |
|
|
|
.line 164 |
|
:cond_0 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mVtpProxy:Lcom/a/f; |
|
|
|
invoke-virtual {v0}, Lcom/a/f;->c()V |
|
|
|
.line 165 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mVtpProxy:Lcom/a/f; |
|
|
|
invoke-virtual {v0}, Lcom/a/f;->h()V |
|
|
|
.line 166 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mVtpProxy:Lcom/a/f; |
|
|
|
invoke-virtual {v0}, Lcom/a/f;->d()V |
|
|
|
.line 168 |
|
:cond_1 |
|
return-void |
|
.end method |
|
|
|
.method public isCtrlConnect()Z |
|
.locals 1 |
|
|
|
.prologue |
|
.line 147 |
|
monitor-enter p0 |
|
|
|
.line 148 |
|
const/4 v0, 0x1 |
|
|
|
:try_start_0 |
|
monitor-exit p0 |
|
|
|
return v0 |
|
|
|
.line 149 |
|
:catchall_0 |
|
move-exception v0 |
|
|
|
monitor-exit p0 |
|
:try_end_0 |
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0 |
|
|
|
throw v0 |
|
.end method |
|
|
|
.method public isMediaConnect()Z |
|
.locals 1 |
|
|
|
.prologue |
|
.line 154 |
|
monitor-enter p0 |
|
|
|
.line 155 |
|
:try_start_0 |
|
iget-boolean v0, p0, Lcom/viatech/device/VPaiVTPDevice;->isOpened:Z |
|
|
|
monitor-exit p0 |
|
|
|
return v0 |
|
|
|
.line 156 |
|
:catchall_0 |
|
move-exception v0 |
|
|
|
monitor-exit p0 |
|
:try_end_0 |
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0 |
|
|
|
throw v0 |
|
.end method |
|
|
|
.method public isOpen()Z |
|
.locals 1 |
|
|
|
.prologue |
|
.line 95 |
|
iget-boolean v0, p0, Lcom/viatech/device/VPaiVTPDevice;->isOpened:Z |
|
|
|
return v0 |
|
.end method |
|
|
|
.method public needConnect()Z |
|
.locals 1 |
|
|
|
.prologue |
|
.line 100 |
|
iget-boolean v0, p0, Lcom/viatech/device/VPaiVTPDevice;->isOpened:Z |
|
|
|
if-nez v0, :cond_0 |
|
|
|
const/4 v0, 0x1 |
|
|
|
:goto_0 |
|
return v0 |
|
|
|
:cond_0 |
|
const/4 v0, 0x0 |
|
|
|
goto :goto_0 |
|
.end method |
|
|
|
.method public onCommandReplyListen(II[B)V |
|
.locals 5 |
|
|
|
.prologue |
|
const/4 v4, 0x0 |
|
|
|
const/4 v3, 0x0 |
|
|
|
.line 456 |
|
const/16 v0, 0x12 |
|
|
|
if-eq p1, v0, :cond_0 |
|
|
|
.line 457 |
|
iget-boolean v0, p0, Lcom/viatech/device/VPaiVTPDevice;->Debug:Z |
|
|
|
if-eqz v0, :cond_0 |
|
|
|
.line 458 |
|
const-string v0, "VPaiVTPDevice" |
|
|
|
new-instance v1, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v2, "onCommandReplyListen cmd: " |
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v1 |
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v1 |
|
|
|
const-string v2, "...ret : " |
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v1 |
|
|
|
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(I)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 460 |
|
:cond_0 |
|
sparse-switch p1, :sswitch_data_0 |
|
|
|
.line 522 |
|
:cond_1 |
|
:goto_0 |
|
return-void |
|
|
|
.line 462 |
|
:sswitch_0 |
|
if-nez p2, :cond_4 |
|
|
|
.line 463 |
|
iget v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceStatus:I |
|
|
|
const/4 v1, 0x1 |
|
|
|
if-ne v0, v1, :cond_3 |
|
|
|
.line 465 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mStartCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
if-eqz v0, :cond_2 |
|
|
|
.line 466 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mStartCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
const-string v1, "startPrv" |
|
|
|
const-string v2, "" |
|
|
|
invoke-direct {p0, v1, v2, v4, v4}, Lcom/viatech/device/VPaiVTPDevice;->buildJsonResponse(Ljava/lang/String;Ljava/lang/String;II)Ljava/lang/String; |
|
|
|
move-result-object v1 |
|
|
|
invoke-interface {v0, v1}, Lcom/viatech/device/DeviceMessage$DeviceMessageCallback;->onMessageResult(Ljava/lang/String;)V |
|
|
|
.line 467 |
|
iput-object v3, p0, Lcom/viatech/device/VPaiVTPDevice;->mStartCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
.line 469 |
|
:cond_2 |
|
invoke-virtual {p0, v3}, Lcom/viatech/device/VPaiVTPDevice;->getDeviceInfo(Lcom/viatech/device/DeviceMessage$DeviceMessageCallback;)V |
|
|
|
goto :goto_0 |
|
|
|
.line 470 |
|
:cond_3 |
|
iget v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceStatus:I |
|
|
|
if-nez v0, :cond_1 |
|
|
|
.line 472 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mStopCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
if-eqz v0, :cond_1 |
|
|
|
.line 473 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mStopCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
const-string v1, "startPrv" |
|
|
|
const-string v2, "" |
|
|
|
invoke-direct {p0, v1, v2, v4, v4}, Lcom/viatech/device/VPaiVTPDevice;->buildJsonResponse(Ljava/lang/String;Ljava/lang/String;II)Ljava/lang/String; |
|
|
|
move-result-object v1 |
|
|
|
invoke-interface {v0, v1}, Lcom/viatech/device/DeviceMessage$DeviceMessageCallback;->onMessageResult(Ljava/lang/String;)V |
|
|
|
.line 474 |
|
iput-object v3, p0, Lcom/viatech/device/VPaiVTPDevice;->mStopCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
goto :goto_0 |
|
|
|
.line 478 |
|
:cond_4 |
|
invoke-virtual {p0, v4}, Lcom/viatech/device/VPaiVTPDevice;->updateDeviceStatus(I)V |
|
|
|
goto :goto_0 |
|
|
|
.line 482 |
|
:sswitch_1 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; |
|
|
|
if-nez v0, :cond_5 |
|
|
|
.line 483 |
|
invoke-direct {p0}, Lcom/viatech/device/VPaiVTPDevice;->iniDeviceInfo()V |
|
|
|
.line 485 |
|
:cond_5 |
|
invoke-direct {p0, p3, p2}, Lcom/viatech/device/VPaiVTPDevice;->parseDeviceInfo([BI)V |
|
|
|
goto :goto_0 |
|
|
|
.line 488 |
|
:sswitch_2 |
|
invoke-direct {p0, p3, p2}, Lcom/viatech/device/VPaiVTPDevice;->parseVideoEncInfo([BI)V |
|
|
|
goto :goto_0 |
|
|
|
.line 491 |
|
:sswitch_3 |
|
invoke-direct {p0, p3, p2}, Lcom/viatech/device/VPaiVTPDevice;->parseUbootEnv([BI)V |
|
|
|
goto :goto_0 |
|
|
|
.line 494 |
|
:sswitch_4 |
|
if-nez p2, :cond_6 |
|
|
|
.line 495 |
|
invoke-direct {p0, p3}, Lcom/viatech/device/VPaiVTPDevice;->saveJpg([B)V |
|
|
|
goto :goto_0 |
|
|
|
.line 497 |
|
:cond_6 |
|
invoke-direct {p0, p2}, Lcom/viatech/device/VPaiVTPDevice;->takePicErrorResponse(I)V |
|
|
|
goto :goto_0 |
|
|
|
.line 501 |
|
:sswitch_5 |
|
iget-boolean v0, p0, Lcom/viatech/device/VPaiVTPDevice;->Debug:Z |
|
|
|
if-eqz v0, :cond_7 |
|
|
|
.line 502 |
|
const-string v0, "VPaiVTPDevice" |
|
|
|
new-instance v1, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v2, "VTP_CMD_SUSPEND : ret=" |
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v1 |
|
|
|
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(I)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 503 |
|
:cond_7 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mSuspendCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
if-eqz v0, :cond_1 |
|
|
|
.line 504 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mSuspendCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
invoke-interface {v0, v3}, Lcom/viatech/device/DeviceMessage$DeviceMessageCallback;->onMessageResult(Ljava/lang/String;)V |
|
|
|
.line 505 |
|
iput-object v3, p0, Lcom/viatech/device/VPaiVTPDevice;->mSuspendCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
goto :goto_0 |
|
|
|
.line 509 |
|
:sswitch_6 |
|
iget-boolean v0, p0, Lcom/viatech/device/VPaiVTPDevice;->Debug:Z |
|
|
|
if-eqz v0, :cond_8 |
|
|
|
.line 510 |
|
const-string v0, "VPaiVTPDevice" |
|
|
|
new-instance v1, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v2, "VTP_CMD_RESUME : ret=" |
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v1 |
|
|
|
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(I)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 511 |
|
:cond_8 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mResumeCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
if-eqz v0, :cond_1 |
|
|
|
.line 512 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mResumeCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
invoke-interface {v0, v3}, Lcom/viatech/device/DeviceMessage$DeviceMessageCallback;->onMessageResult(Ljava/lang/String;)V |
|
|
|
.line 513 |
|
iput-object v3, p0, Lcom/viatech/device/VPaiVTPDevice;->mResumeCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
goto/16 :goto_0 |
|
|
|
.line 460 |
|
:sswitch_data_0 |
|
.sparse-switch |
|
0x1 -> :sswitch_1 |
|
0x21 -> :sswitch_0 |
|
0x22 -> :sswitch_4 |
|
0x30 -> :sswitch_2 |
|
0x70 -> :sswitch_3 |
|
0x72 -> :sswitch_5 |
|
0x73 -> :sswitch_6 |
|
.end sparse-switch |
|
.end method |
|
|
|
.method public onUpdateProgressListen(IZ)V |
|
.locals 4 |
|
|
|
.prologue |
|
const/4 v3, 0x0 |
|
|
|
const/4 v2, 0x0 |
|
|
|
const/4 v1, 0x1 |
|
|
|
.line 527 |
|
if-eqz p2, :cond_1 |
|
|
|
.line 528 |
|
const-string v0, "update" |
|
|
|
const/4 v1, 0x2 |
|
|
|
invoke-direct {p0, v0, v3, v2, v1}, Lcom/viatech/device/VPaiVTPDevice;->buildJsonResponse(Ljava/lang/String;Ljava/lang/String;II)Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
.line 530 |
|
:try_start_0 |
|
new-instance v1, Lorg/json/JSONObject; |
|
|
|
invoke-direct {v1, v0}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V |
|
|
|
.line 531 |
|
const-string v0, "flag" |
|
|
|
const/4 v2, 0x1 |
|
|
|
invoke-virtual {v1, v0, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject; |
|
|
|
.line 532 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mUiHandler:Landroid/os/Handler; |
|
|
|
new-instance v2, Lcom/viatech/device/VPaiVTPDevice$6; |
|
|
|
invoke-direct {v2, p0, v1}, Lcom/viatech/device/VPaiVTPDevice$6;-><init>(Lcom/viatech/device/VPaiVTPDevice;Lorg/json/JSONObject;)V |
|
|
|
invoke-virtual {v0, v2}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z |
|
:try_end_0 |
|
.catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0 |
|
|
|
.line 564 |
|
:cond_0 |
|
:goto_0 |
|
return-void |
|
|
|
.line 541 |
|
:catch_0 |
|
move-exception v0 |
|
|
|
.line 542 |
|
iget-boolean v1, p0, Lcom/viatech/device/VPaiVTPDevice;->Debug:Z |
|
|
|
if-eqz v1, :cond_0 |
|
|
|
.line 543 |
|
const-string v1, "VPaiVTPDevice" |
|
|
|
new-instance v2, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v3, "Json Failed: " |
|
|
|
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 |
|
|
|
goto :goto_0 |
|
|
|
.line 546 |
|
:cond_1 |
|
const-string v0, "update" |
|
|
|
invoke-direct {p0, v0, v3, v2, v1}, Lcom/viatech/device/VPaiVTPDevice;->buildJsonResponse(Ljava/lang/String;Ljava/lang/String;II)Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
.line 548 |
|
:try_start_1 |
|
new-instance v1, Lorg/json/JSONObject; |
|
|
|
invoke-direct {v1, v0}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V |
|
|
|
.line 549 |
|
const-string v0, "flag" |
|
|
|
const/4 v2, 0x1 |
|
|
|
invoke-virtual {v1, v0, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject; |
|
|
|
.line 550 |
|
const-string v0, "progress" |
|
|
|
invoke-virtual {v1, v0, p1}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject; |
|
|
|
.line 551 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mUiHandler:Landroid/os/Handler; |
|
|
|
new-instance v2, Lcom/viatech/device/VPaiVTPDevice$7; |
|
|
|
invoke-direct {v2, p0, v1}, Lcom/viatech/device/VPaiVTPDevice$7;-><init>(Lcom/viatech/device/VPaiVTPDevice;Lorg/json/JSONObject;)V |
|
|
|
invoke-virtual {v0, v2}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z |
|
:try_end_1 |
|
.catch Lorg/json/JSONException; {:try_start_1 .. :try_end_1} :catch_1 |
|
|
|
goto :goto_0 |
|
|
|
.line 559 |
|
:catch_1 |
|
move-exception v0 |
|
|
|
.line 560 |
|
iget-boolean v1, p0, Lcom/viatech/device/VPaiVTPDevice;->Debug:Z |
|
|
|
if-eqz v1, :cond_0 |
|
|
|
.line 561 |
|
const-string v1, "VPaiVTPDevice" |
|
|
|
new-instance v2, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v3, "Json Failed: " |
|
|
|
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 |
|
|
|
goto :goto_0 |
|
.end method |
|
|
|
.method public onVtpStreamListen([BI)V |
|
.locals 11 |
|
|
|
.prologue |
|
const/4 v5, 0x0 |
|
|
|
const/4 v9, 0x7 |
|
|
|
const/4 v8, 0x1 |
|
|
|
const/4 v3, -0x1 |
|
|
|
const/4 v1, 0x0 |
|
|
|
.line 254 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mMediaPortListener:Lcom/viatech/device/MediaPortListener; |
|
|
|
if-nez v0, :cond_1 |
|
|
|
.line 324 |
|
:cond_0 |
|
:goto_0 |
|
return-void |
|
|
|
.line 257 |
|
:cond_1 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mMediaPortListener:Lcom/viatech/device/MediaPortListener; |
|
|
|
if-eqz v0, :cond_0 |
|
|
|
.line 258 |
|
packed-switch p2, :pswitch_data_0 |
|
|
|
goto :goto_0 |
|
|
|
.line 266 |
|
:pswitch_0 |
|
aget-byte v0, p1, v1 |
|
|
|
if-eqz v0, :cond_2 |
|
|
|
aget-byte v0, p1, v8 |
|
|
|
if-eqz v0, :cond_2 |
|
|
|
const/4 v0, 0x2 |
|
|
|
aget-byte v0, p1, v0 |
|
|
|
if-nez v0, :cond_0 |
|
|
|
.line 272 |
|
:cond_2 |
|
const/4 v0, 0x4 |
|
|
|
aget-byte v0, p1, v0 |
|
|
|
and-int/lit8 v0, v0, 0xf |
|
|
|
.line 273 |
|
const/4 v2, 0x6 |
|
|
|
if-eq v0, v2, :cond_3 |
|
|
|
if-ne v0, v9, :cond_8 |
|
|
|
:cond_3 |
|
move v0, v1 |
|
|
|
move v2, v3 |
|
|
|
move v4, v1 |
|
|
|
.line 277 |
|
:goto_1 |
|
array-length v6, p1 |
|
|
|
if-ge v0, v6, :cond_a |
|
|
|
.line 278 |
|
shl-int/lit8 v4, v4, 0x8 |
|
|
|
aget-byte v6, p1, v0 |
|
|
|
or-int/2addr v4, v6 |
|
|
|
.line 279 |
|
if-ne v4, v8, :cond_6 |
|
|
|
.line 280 |
|
add-int/lit8 v6, v0, 0x1 |
|
|
|
aget-byte v6, p1, v6 |
|
|
|
and-int/lit8 v6, v6, 0xf |
|
|
|
.line 281 |
|
if-ne v6, v9, :cond_4 |
|
|
|
.line 282 |
|
add-int/lit8 v2, v0, -0x3 |
|
|
|
.line 286 |
|
:cond_4 |
|
const/4 v7, 0x5 |
|
|
|
if-eq v6, v7, :cond_5 |
|
|
|
if-ne v6, v8, :cond_6 |
|
|
|
.line 289 |
|
:cond_5 |
|
add-int/lit8 v0, v0, -0x3 |
|
|
|
move v4, v2 |
|
|
|
move v2, v0 |
|
|
|
.line 296 |
|
:goto_2 |
|
if-eq v4, v3, :cond_8 |
|
|
|
.line 299 |
|
if-le v2, v4, :cond_7 |
|
|
|
.line 300 |
|
sub-int v0, v2, v4 |
|
|
|
new-array v5, v0, [B |
|
|
|
.line 301 |
|
array-length v0, p1 |
|
|
|
sub-int/2addr v0, v2 |
|
|
|
new-array v0, v0, [B |
|
|
|
.line 305 |
|
:goto_3 |
|
array-length v3, v5 |
|
|
|
invoke-static {p1, v4, v5, v1, v3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V |
|
|
|
.line 306 |
|
invoke-static {v5}, Ljava/nio/ByteBuffer;->wrap([B)Ljava/nio/ByteBuffer; |
|
|
|
move-result-object v3 |
|
|
|
.line 307 |
|
iget-object v4, p0, Lcom/viatech/device/VPaiVTPDevice;->mMediaPortListener:Lcom/viatech/device/MediaPortListener; |
|
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J |
|
|
|
move-result-wide v6 |
|
|
|
long-to-int v5, v6 |
|
|
|
invoke-interface {v4, v3, v1, v1, v5}, Lcom/viatech/device/MediaPortListener;->onVideoDataCallback(Ljava/nio/ByteBuffer;ZII)V |
|
|
|
.line 308 |
|
if-eqz v0, :cond_0 |
|
|
|
array-length v3, v0 |
|
|
|
if-lez v3, :cond_0 |
|
|
|
.line 309 |
|
array-length v3, v0 |
|
|
|
invoke-static {p1, v2, v0, v1, v3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V |
|
|
|
.line 310 |
|
invoke-static {v0}, Ljava/nio/ByteBuffer;->wrap([B)Ljava/nio/ByteBuffer; |
|
|
|
move-result-object v0 |
|
|
|
.line 311 |
|
iget-object v2, p0, Lcom/viatech/device/VPaiVTPDevice;->mMediaPortListener:Lcom/viatech/device/MediaPortListener; |
|
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J |
|
|
|
move-result-wide v4 |
|
|
|
long-to-int v3, v4 |
|
|
|
invoke-interface {v2, v0, v1, v1, v3}, Lcom/viatech/device/MediaPortListener;->onVideoDataCallback(Ljava/nio/ByteBuffer;ZII)V |
|
|
|
goto :goto_0 |
|
|
|
.line 277 |
|
:cond_6 |
|
add-int/lit8 v0, v0, 0x1 |
|
|
|
goto :goto_1 |
|
|
|
.line 302 |
|
:cond_7 |
|
if-ne v2, v3, :cond_9 |
|
|
|
.line 303 |
|
array-length v0, p1 |
|
|
|
new-array v0, v0, [B |
|
|
|
move-object v10, v5 |
|
|
|
move-object v5, v0 |
|
|
|
move-object v0, v10 |
|
|
|
goto :goto_3 |
|
|
|
.line 316 |
|
:cond_8 |
|
invoke-static {p1}, Ljava/nio/ByteBuffer;->wrap([B)Ljava/nio/ByteBuffer; |
|
|
|
move-result-object v0 |
|
|
|
.line 317 |
|
iget-object v2, p0, Lcom/viatech/device/VPaiVTPDevice;->mMediaPortListener:Lcom/viatech/device/MediaPortListener; |
|
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J |
|
|
|
move-result-wide v4 |
|
|
|
long-to-int v3, v4 |
|
|
|
invoke-interface {v2, v0, v1, v1, v3}, Lcom/viatech/device/MediaPortListener;->onVideoDataCallback(Ljava/nio/ByteBuffer;ZII)V |
|
|
|
goto/16 :goto_0 |
|
|
|
:cond_9 |
|
move-object v0, v5 |
|
|
|
goto :goto_3 |
|
|
|
:cond_a |
|
move v4, v2 |
|
|
|
move v2, v3 |
|
|
|
goto :goto_2 |
|
|
|
.line 258 |
|
:pswitch_data_0 |
|
.packed-switch 0x0 |
|
:pswitch_0 |
|
.end packed-switch |
|
.end method |
|
|
|
.method public open()V |
|
.locals 1 |
|
|
|
.prologue |
|
.line 65 |
|
invoke-super {p0}, Lcom/viatech/device/VPaiDevice;->open()V |
|
|
|
.line 66 |
|
const/4 v0, 0x1 |
|
|
|
iput-boolean v0, p0, Lcom/viatech/device/VPaiVTPDevice;->isStreamOpened:Z |
|
|
|
.line 67 |
|
return-void |
|
.end method |
|
|
|
.method public setVtpResolution(IILcom/viatech/device/DeviceMessage$DeviceMessageCallback;)V |
|
.locals 4 |
|
|
|
.prologue |
|
.line 226 |
|
const/16 v0, 0xf |
|
|
|
.line 234 |
|
iget-boolean v1, p0, Lcom/viatech/device/VPaiVTPDevice;->Debug:Z |
|
|
|
if-eqz v1, :cond_0 |
|
|
|
.line 235 |
|
const-string v1, "VPaiVTPDevice" |
|
|
|
new-instance v2, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v3, "setVtpResolution w = " |
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v2 |
|
|
|
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v2 |
|
|
|
const-string v3, " h = " |
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v2 |
|
|
|
invoke-virtual {v2, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v2 |
|
|
|
const-string v3, " fps = " |
|
|
|
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(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 236 |
|
:cond_0 |
|
iget-object v1, p0, Lcom/viatech/device/VPaiVTPDevice;->mVtpProxy:Lcom/a/f; |
|
|
|
invoke-virtual {v1, p1, p2, v0}, Lcom/a/f;->a(III)V |
|
|
|
.line 237 |
|
iput-object p3, p0, Lcom/viatech/device/VPaiVTPDevice;->mSetResolutionCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
.line 238 |
|
return-void |
|
.end method |
|
|
|
.method public setVtpResume(Lcom/viatech/device/DeviceMessage$DeviceMessageCallback;)V |
|
.locals 1 |
|
|
|
.prologue |
|
.line 798 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mVtpProxy:Lcom/a/f; |
|
|
|
invoke-virtual {v0}, Lcom/a/f;->j()V |
|
|
|
.line 799 |
|
if-eqz p1, :cond_0 |
|
|
|
.line 800 |
|
iput-object p1, p0, Lcom/viatech/device/VPaiVTPDevice;->mResumeCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
.line 801 |
|
:cond_0 |
|
return-void |
|
.end method |
|
|
|
.method public setVtpSuspend(Lcom/viatech/device/DeviceMessage$DeviceMessageCallback;)V |
|
.locals 1 |
|
|
|
.prologue |
|
.line 791 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mVtpProxy:Lcom/a/f; |
|
|
|
invoke-virtual {v0}, Lcom/a/f;->i()V |
|
|
|
.line 792 |
|
if-eqz p1, :cond_0 |
|
|
|
.line 793 |
|
iput-object p1, p0, Lcom/viatech/device/VPaiVTPDevice;->mSuspendCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
.line 794 |
|
:cond_0 |
|
return-void |
|
.end method |
|
|
|
.method public startPreview(Lcom/viatech/device/DeviceMessage$DeviceMessageCallback;)V |
|
.locals 2 |
|
|
|
.prologue |
|
.line 763 |
|
iget-boolean v0, p0, Lcom/viatech/device/VPaiVTPDevice;->Debug:Z |
|
|
|
if-eqz v0, :cond_0 |
|
|
|
.line 764 |
|
const-string v0, "VPaiVTPDevice" |
|
|
|
const-string v1, "startPreview" |
|
|
|
invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I |
|
|
|
.line 766 |
|
:cond_0 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mVtpProxy:Lcom/a/f; |
|
|
|
invoke-virtual {v0}, Lcom/a/f;->e()V |
|
|
|
.line 768 |
|
const/4 v0, 0x1 |
|
|
|
invoke-virtual {p0, v0}, Lcom/viatech/device/VPaiVTPDevice;->updateDeviceStatus(I)V |
|
|
|
.line 769 |
|
if-eqz p1, :cond_1 |
|
|
|
.line 770 |
|
iput-object p1, p0, Lcom/viatech/device/VPaiVTPDevice;->mStartCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
.line 773 |
|
:cond_1 |
|
return-void |
|
.end method |
|
|
|
.method public stopPreview(Lcom/viatech/device/DeviceMessage$DeviceMessageCallback;)V |
|
.locals 2 |
|
|
|
.prologue |
|
.line 777 |
|
iget-boolean v0, p0, Lcom/viatech/device/VPaiVTPDevice;->Debug:Z |
|
|
|
if-eqz v0, :cond_0 |
|
|
|
.line 778 |
|
const-string v0, "VPaiVTPDevice" |
|
|
|
const-string v1, "stopPreview" |
|
|
|
invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I |
|
|
|
.line 780 |
|
:cond_0 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mVtpProxy:Lcom/a/f; |
|
|
|
invoke-virtual {v0}, Lcom/a/f;->f()V |
|
|
|
.line 782 |
|
const/4 v0, 0x0 |
|
|
|
invoke-virtual {p0, v0}, Lcom/viatech/device/VPaiVTPDevice;->updateDeviceStatus(I)V |
|
|
|
.line 783 |
|
if-eqz p1, :cond_1 |
|
|
|
.line 784 |
|
iput-object p1, p0, Lcom/viatech/device/VPaiVTPDevice;->mStopCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
.line 787 |
|
:cond_1 |
|
return-void |
|
.end method |
|
|
|
.method public takePicture(IILcom/viatech/device/DeviceMessage$DeviceMessageCallback;)V |
|
.locals 1 |
|
|
|
.prologue |
|
.line 243 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mVtpProxy:Lcom/a/f; |
|
|
|
if-eqz v0, :cond_0 |
|
|
|
.line 244 |
|
iput p1, p0, Lcom/viatech/device/VPaiVTPDevice;->mPicW:I |
|
|
|
.line 245 |
|
iput p2, p0, Lcom/viatech/device/VPaiVTPDevice;->mPicH:I |
|
|
|
.line 246 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mVtpProxy:Lcom/a/f; |
|
|
|
invoke-virtual {v0}, Lcom/a/f;->g()V |
|
|
|
.line 247 |
|
iput-object p3, p0, Lcom/viatech/device/VPaiVTPDevice;->mTakePictureCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
.line 249 |
|
:cond_0 |
|
return-void |
|
.end method |
|
|
|
.method public upgradeVtpDevice(Ljava/lang/String;Lcom/viatech/device/DeviceMessage$DeviceMessageCallback;)V |
|
.locals 6 |
|
|
|
.prologue |
|
const/4 v5, 0x0 |
|
|
|
const/16 v4, 0x10 |
|
|
|
.line 173 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mVtpProxy:Lcom/a/f; |
|
|
|
if-eqz v0, :cond_1 |
|
|
|
.line 174 |
|
iput-object p2, p0, Lcom/viatech/device/VPaiVTPDevice;->mUpgradeCB:Lcom/viatech/device/DeviceMessage$DeviceMessageCallback; |
|
|
|
.line 175 |
|
new-instance v1, Ljava/io/File; |
|
|
|
invoke-direct {v1, p1}, Ljava/io/File;-><init>(Ljava/lang/String;)V |
|
|
|
.line 176 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; |
|
|
|
iget-object v0, v0, Lcom/viatech/device/DeviceInfo;->system2addr:Ljava/lang/String; |
|
|
|
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z |
|
|
|
move-result v0 |
|
|
|
if-nez v0, :cond_0 |
|
|
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; |
|
|
|
iget-object v0, v0, Lcom/viatech/device/DeviceInfo;->systemflag:Ljava/lang/String; |
|
|
|
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z |
|
|
|
move-result v0 |
|
|
|
if-nez v0, :cond_0 |
|
|
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; |
|
|
|
iget-object v0, v0, Lcom/viatech/device/DeviceInfo;->system1addr:Ljava/lang/String; |
|
|
|
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z |
|
|
|
move-result v0 |
|
|
|
if-eqz v0, :cond_2 |
|
|
|
.line 177 |
|
:cond_0 |
|
invoke-direct {p0}, Lcom/viatech/device/VPaiVTPDevice;->updateErrorResponse()V |
|
|
|
.line 221 |
|
:cond_1 |
|
:goto_0 |
|
return-void |
|
|
|
.line 181 |
|
:cond_2 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; |
|
|
|
iget-object v0, v0, Lcom/viatech/device/DeviceInfo;->systemflag:Ljava/lang/String; |
|
|
|
const-string v2, "1" |
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z |
|
|
|
move-result v0 |
|
|
|
if-eqz v0, :cond_5 |
|
|
|
.line 182 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; |
|
|
|
iget-object v0, v0, Lcom/viatech/device/DeviceInfo;->system2addr:Ljava/lang/String; |
|
|
|
const-string v2, "0x" |
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z |
|
|
|
move-result v0 |
|
|
|
if-eqz v0, :cond_4 |
|
|
|
.line 183 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; |
|
|
|
iget-object v0, v0, Lcom/viatech/device/DeviceInfo;->system2addr:Ljava/lang/String; |
|
|
|
const-string v2, "0x" |
|
|
|
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 |
|
|
|
invoke-static {v0, v4}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;I)I |
|
|
|
move-result v0 |
|
|
|
.line 197 |
|
:goto_1 |
|
const/4 v2, -0x1 |
|
|
|
if-eq v0, v2, :cond_8 |
|
|
|
.line 198 |
|
iget-object v2, p0, Lcom/viatech/device/VPaiVTPDevice;->mVtpProxy:Lcom/a/f; |
|
|
|
invoke-virtual {v2, v1, v0}, Lcom/a/f;->a(Ljava/io/File;I)V |
|
|
|
.line 199 |
|
iget-boolean v1, p0, Lcom/viatech/device/VPaiVTPDevice;->Debug:Z |
|
|
|
if-eqz v1, :cond_3 |
|
|
|
.line 200 |
|
const-string v1, "VPaiVTPDevice" |
|
|
|
new-instance v2, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v3, "upgradeDevice:filePath:" |
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v2 |
|
|
|
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v2 |
|
|
|
const-string v3, "...updateAddr:" |
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v2 |
|
|
|
invoke-static {v0}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)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;->d(Ljava/lang/String;Ljava/lang/String;)I |
|
|
|
.line 201 |
|
:cond_3 |
|
const-string v0, "update" |
|
|
|
const/4 v1, 0x0 |
|
|
|
invoke-direct {p0, v0, v1, v5, v5}, Lcom/viatech/device/VPaiVTPDevice;->buildJsonResponse(Ljava/lang/String;Ljava/lang/String;II)Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
.line 203 |
|
:try_start_0 |
|
new-instance v1, Lorg/json/JSONObject; |
|
|
|
invoke-direct {v1, v0}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V |
|
|
|
.line 204 |
|
const-string v0, "flag" |
|
|
|
const/4 v2, 0x1 |
|
|
|
invoke-virtual {v1, v0, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject; |
|
|
|
.line 205 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mUiHandler:Landroid/os/Handler; |
|
|
|
new-instance v2, Lcom/viatech/device/VPaiVTPDevice$2; |
|
|
|
invoke-direct {v2, p0, v1}, Lcom/viatech/device/VPaiVTPDevice$2;-><init>(Lcom/viatech/device/VPaiVTPDevice;Lorg/json/JSONObject;)V |
|
|
|
invoke-virtual {v0, v2}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z |
|
:try_end_0 |
|
.catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0 |
|
|
|
goto :goto_0 |
|
|
|
.line 213 |
|
:catch_0 |
|
move-exception v0 |
|
|
|
.line 214 |
|
iget-boolean v1, p0, Lcom/viatech/device/VPaiVTPDevice;->Debug:Z |
|
|
|
if-eqz v1, :cond_1 |
|
|
|
.line 215 |
|
const-string v1, "VPaiVTPDevice" |
|
|
|
new-instance v2, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v3, "Json Failed: " |
|
|
|
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 |
|
|
|
goto/16 :goto_0 |
|
|
|
.line 185 |
|
:cond_4 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; |
|
|
|
iget-object v0, v0, Lcom/viatech/device/DeviceInfo;->system2addr:Ljava/lang/String; |
|
|
|
invoke-static {v0, v4}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;I)I |
|
|
|
move-result v0 |
|
|
|
goto :goto_1 |
|
|
|
.line 187 |
|
:cond_5 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; |
|
|
|
iget-object v0, v0, Lcom/viatech/device/DeviceInfo;->systemflag:Ljava/lang/String; |
|
|
|
const-string v2, "2" |
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z |
|
|
|
move-result v0 |
|
|
|
if-eqz v0, :cond_7 |
|
|
|
.line 188 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; |
|
|
|
iget-object v0, v0, Lcom/viatech/device/DeviceInfo;->system1addr:Ljava/lang/String; |
|
|
|
const-string v2, "0x" |
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z |
|
|
|
move-result v0 |
|
|
|
if-eqz v0, :cond_6 |
|
|
|
.line 189 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; |
|
|
|
iget-object v0, v0, Lcom/viatech/device/DeviceInfo;->system1addr:Ljava/lang/String; |
|
|
|
const-string v2, "0x" |
|
|
|
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 |
|
|
|
invoke-static {v0, v4}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;I)I |
|
|
|
move-result v0 |
|
|
|
goto/16 :goto_1 |
|
|
|
.line 191 |
|
:cond_6 |
|
iget-object v0, p0, Lcom/viatech/device/VPaiVTPDevice;->mDeviceInfo:Lcom/viatech/device/DeviceInfo; |
|
|
|
iget-object v0, v0, Lcom/viatech/device/DeviceInfo;->system1addr:Ljava/lang/String; |
|
|
|
invoke-static {v0, v4}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;I)I |
|
|
|
move-result v0 |
|
|
|
goto/16 :goto_1 |
|
|
|
.line 194 |
|
:cond_7 |
|
invoke-direct {p0}, Lcom/viatech/device/VPaiVTPDevice;->updateErrorResponse()V |
|
|
|
goto/16 :goto_0 |
|
|
|
.line 218 |
|
:cond_8 |
|
invoke-direct {p0}, Lcom/viatech/device/VPaiVTPDevice;->updateErrorResponse()V |
|
|
|
goto/16 :goto_0 |
|
.end method
|
|
|