VideoPusher$6.smali
.class Lcom/alivc/component/capture/VideoPusher$6;
.super Ljava/lang/Object;
.source "VideoPusher.java"
# interfaces
.implements Landroid/hardware/SensorEventListener;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/alivc/component/capture/VideoPusher;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = null
.end annotation
# instance fields
.field final synthetic this$0:Lcom/alivc/component/capture/VideoPusher;
# direct methods
.method static constructor <clinit>()V
.registers 1
return-void
.end method
.method constructor <init>(Lcom/alivc/component/capture/VideoPusher;)V
.registers 2
.param p1, "this$0" # Lcom/alivc/component/capture/VideoPusher;
.line 1153
iput-object p1, p0, Lcom/alivc/component/capture/VideoPusher$6;->this$0:Lcom/alivc/component/capture/VideoPusher;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method private cameraAutoFocus()V
.registers 3
.line 1211
iget-object v0, p0, Lcom/alivc/component/capture/VideoPusher$6;->this$0:Lcom/alivc/component/capture/VideoPusher;
const/4 v1, 0x1
# setter for: Lcom/alivc/component/capture/VideoPusher;->mAutoFocusing:Z
invoke-static {v0, v1}, Lcom/alivc/component/capture/VideoPusher;->access$1602(Lcom/alivc/component/capture/VideoPusher;Z)Z
.line 1212
iget-object v0, p0, Lcom/alivc/component/capture/VideoPusher$6;->this$0:Lcom/alivc/component/capture/VideoPusher;
# getter for: Lcom/alivc/component/capture/VideoPusher;->mCamera:Landroid/hardware/Camera;
invoke-static {v0}, Lcom/alivc/component/capture/VideoPusher;->access$2000(Lcom/alivc/component/capture/VideoPusher;)Landroid/hardware/Camera;
move-result-object v0
invoke-virtual {v0}, Landroid/hardware/Camera;->getParameters()Landroid/hardware/Camera$Parameters;
move-result-object v0
invoke-virtual {v0}, Landroid/hardware/Camera$Parameters;->getFocusMode()Ljava/lang/String;
move-result-object v0
const-string v1, "continuous-video"
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-nez v0, :cond_58
.line 1213
iget-object v0, p0, Lcom/alivc/component/capture/VideoPusher$6;->this$0:Lcom/alivc/component/capture/VideoPusher;
# getter for: Lcom/alivc/component/capture/VideoPusher;->mCamera:Landroid/hardware/Camera;
invoke-static {v0}, Lcom/alivc/component/capture/VideoPusher;->access$2000(Lcom/alivc/component/capture/VideoPusher;)Landroid/hardware/Camera;
move-result-object v0
invoke-virtual {v0}, Landroid/hardware/Camera;->getParameters()Landroid/hardware/Camera$Parameters;
move-result-object v0
invoke-virtual {v0}, Landroid/hardware/Camera$Parameters;->getFocusMode()Ljava/lang/String;
move-result-object v0
const-string v1, "auto"
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-nez v0, :cond_4a
.line 1215
:try_start_32
iget-object v0, p0, Lcom/alivc/component/capture/VideoPusher$6;->this$0:Lcom/alivc/component/capture/VideoPusher;
# getter for: Lcom/alivc/component/capture/VideoPusher;->mCamera:Landroid/hardware/Camera;
invoke-static {v0}, Lcom/alivc/component/capture/VideoPusher;->access$2000(Lcom/alivc/component/capture/VideoPusher;)Landroid/hardware/Camera;
move-result-object v0
invoke-virtual {v0}, Landroid/hardware/Camera;->getParameters()Landroid/hardware/Camera$Parameters;
move-result-object v0
.line 1216
.local v0, "parameters":Landroid/hardware/Camera$Parameters;
invoke-virtual {v0, v1}, Landroid/hardware/Camera$Parameters;->setFocusMode(Ljava/lang/String;)V
.line 1217
iget-object v1, p0, Lcom/alivc/component/capture/VideoPusher$6;->this$0:Lcom/alivc/component/capture/VideoPusher;
# getter for: Lcom/alivc/component/capture/VideoPusher;->mCamera:Landroid/hardware/Camera;
invoke-static {v1}, Lcom/alivc/component/capture/VideoPusher;->access$2000(Lcom/alivc/component/capture/VideoPusher;)Landroid/hardware/Camera;
move-result-object v1
invoke-virtual {v1, v0}, Landroid/hardware/Camera;->setParameters(Landroid/hardware/Camera$Parameters;)V
:try_end_48
.catch Ljava/lang/Exception; {:try_start_32 .. :try_end_48} :catch_49
.line 1220
.end local v0 # "parameters":Landroid/hardware/Camera$Parameters;
goto :goto_4a
.line 1218
:catch_49
move-exception v0
.line 1222
:cond_4a
:goto_4a
iget-object v0, p0, Lcom/alivc/component/capture/VideoPusher$6;->this$0:Lcom/alivc/component/capture/VideoPusher;
# getter for: Lcom/alivc/component/capture/VideoPusher;->mCamera:Landroid/hardware/Camera;
invoke-static {v0}, Lcom/alivc/component/capture/VideoPusher;->access$2000(Lcom/alivc/component/capture/VideoPusher;)Landroid/hardware/Camera;
move-result-object v0
new-instance v1, Lcom/alivc/component/capture/VideoPusher$6$1;
invoke-direct {v1, p0}, Lcom/alivc/component/capture/VideoPusher$6$1;-><init>(Lcom/alivc/component/capture/VideoPusher$6;)V
invoke-virtual {v0, v1}, Landroid/hardware/Camera;->autoFocus(Landroid/hardware/Camera$AutoFocusCallback;)V
.line 1229
:cond_58
return-void
.end method
# virtual methods
.method public onAccuracyChanged(Landroid/hardware/Sensor;I)V
.registers 3
.param p1, "sensor" # Landroid/hardware/Sensor;
.param p2, "accuracy" # I
.line 1208
return-void
.end method
.method public onSensorChanged(Landroid/hardware/SensorEvent;)V
.registers 13
.param p1, "event" # Landroid/hardware/SensorEvent;
.line 1156
iget-object v0, p0, Lcom/alivc/component/capture/VideoPusher$6;->this$0:Lcom/alivc/component/capture/VideoPusher;
invoke-virtual {v0}, Lcom/alivc/component/capture/VideoPusher;->isPreviewRunning()Z
move-result v0
if-eqz v0, :cond_178
iget-object v0, p0, Lcom/alivc/component/capture/VideoPusher$6;->this$0:Lcom/alivc/component/capture/VideoPusher;
# getter for: Lcom/alivc/component/capture/VideoPusher;->mParam:Lcom/alivc/component/capture/VideoParam;
invoke-static {v0}, Lcom/alivc/component/capture/VideoPusher;->access$300(Lcom/alivc/component/capture/VideoPusher;)Lcom/alivc/component/capture/VideoParam;
move-result-object v0
invoke-virtual {v0}, Lcom/alivc/component/capture/VideoParam;->getCameraId()I
move-result v0
if-eqz v0, :cond_16
goto/16 :goto_178
.line 1159
:cond_16
iget-object v0, p1, Landroid/hardware/SensorEvent;->sensor:Landroid/hardware/Sensor;
invoke-virtual {v0}, Landroid/hardware/Sensor;->getType()I
move-result v0
const/high16 v1, -0x40800000 # -1.0f
const/4 v2, 0x0
const/4 v3, 0x1
const/4 v4, 0x2
if-ne v0, v4, :cond_aa
.line 1160
iget-object v0, p0, Lcom/alivc/component/capture/VideoPusher$6;->this$0:Lcom/alivc/component/capture/VideoPusher;
# getter for: Lcom/alivc/component/capture/VideoPusher;->mLastXMag:F
invoke-static {v0}, Lcom/alivc/component/capture/VideoPusher;->access$1300(Lcom/alivc/component/capture/VideoPusher;)F
move-result v0
cmpl-float v0, v0, v1
if-nez v0, :cond_49
.line 1161
iget-object v0, p0, Lcom/alivc/component/capture/VideoPusher$6;->this$0:Lcom/alivc/component/capture/VideoPusher;
iget-object v1, p1, Landroid/hardware/SensorEvent;->values:[F
aget v1, v1, v2
# setter for: Lcom/alivc/component/capture/VideoPusher;->mLastXMag:F
invoke-static {v0, v1}, Lcom/alivc/component/capture/VideoPusher;->access$1302(Lcom/alivc/component/capture/VideoPusher;F)F
.line 1162
iget-object v0, p0, Lcom/alivc/component/capture/VideoPusher$6;->this$0:Lcom/alivc/component/capture/VideoPusher;
iget-object v1, p1, Landroid/hardware/SensorEvent;->values:[F
aget v1, v1, v3
# setter for: Lcom/alivc/component/capture/VideoPusher;->mLastYMag:F
invoke-static {v0, v1}, Lcom/alivc/component/capture/VideoPusher;->access$1402(Lcom/alivc/component/capture/VideoPusher;F)F
.line 1163
iget-object v0, p0, Lcom/alivc/component/capture/VideoPusher$6;->this$0:Lcom/alivc/component/capture/VideoPusher;
iget-object v1, p1, Landroid/hardware/SensorEvent;->values:[F
aget v1, v1, v4
# setter for: Lcom/alivc/component/capture/VideoPusher;->mLastZMag:F
invoke-static {v0, v1}, Lcom/alivc/component/capture/VideoPusher;->access$1502(Lcom/alivc/component/capture/VideoPusher;F)F
.line 1164
return-void
.line 1166
:cond_49
iget-object v0, p0, Lcom/alivc/component/capture/VideoPusher$6;->this$0:Lcom/alivc/component/capture/VideoPusher;
# getter for: Lcom/alivc/component/capture/VideoPusher;->mLastXMag:F
invoke-static {v0}, Lcom/alivc/component/capture/VideoPusher;->access$1300(Lcom/alivc/component/capture/VideoPusher;)F
move-result v0
iget-object v5, p1, Landroid/hardware/SensorEvent;->values:[F
aget v5, v5, v2
sub-float/2addr v0, v5
invoke-static {v0}, Ljava/lang/Math;->abs(F)F
move-result v0
.line 1167
.local v0, "deltaX":F
iget-object v5, p0, Lcom/alivc/component/capture/VideoPusher$6;->this$0:Lcom/alivc/component/capture/VideoPusher;
# getter for: Lcom/alivc/component/capture/VideoPusher;->mLastYMag:F
invoke-static {v5}, Lcom/alivc/component/capture/VideoPusher;->access$1400(Lcom/alivc/component/capture/VideoPusher;)F
move-result v5
iget-object v6, p1, Landroid/hardware/SensorEvent;->values:[F
aget v6, v6, v3
sub-float/2addr v5, v6
invoke-static {v5}, Ljava/lang/Math;->abs(F)F
move-result v5
.line 1168
.local v5, "deltaY":F
iget-object v6, p0, Lcom/alivc/component/capture/VideoPusher$6;->this$0:Lcom/alivc/component/capture/VideoPusher;
# getter for: Lcom/alivc/component/capture/VideoPusher;->mLastZMag:F
invoke-static {v6}, Lcom/alivc/component/capture/VideoPusher;->access$1500(Lcom/alivc/component/capture/VideoPusher;)F
move-result v6
iget-object v7, p1, Landroid/hardware/SensorEvent;->values:[F
aget v7, v7, v4
sub-float/2addr v6, v7
invoke-static {v6}, Ljava/lang/Math;->abs(F)F
move-result v6
.line 1169
.local v6, "deltaZ":F
const/high16 v7, 0x40a00000 # 5.0f
cmpl-float v8, v0, v7
if-gtz v8, :cond_84
cmpl-float v8, v5, v7
if-gtz v8, :cond_84
cmpl-float v7, v6, v7
if-lez v7, :cond_aa
:cond_84
iget-object v7, p0, Lcom/alivc/component/capture/VideoPusher$6;->this$0:Lcom/alivc/component/capture/VideoPusher;
# getter for: Lcom/alivc/component/capture/VideoPusher;->mAutoFocusing:Z
invoke-static {v7}, Lcom/alivc/component/capture/VideoPusher;->access$1600(Lcom/alivc/component/capture/VideoPusher;)Z
move-result v7
if-nez v7, :cond_aa
.line 1170
invoke-direct {p0}, Lcom/alivc/component/capture/VideoPusher$6;->cameraAutoFocus()V
.line 1171
iget-object v7, p0, Lcom/alivc/component/capture/VideoPusher$6;->this$0:Lcom/alivc/component/capture/VideoPusher;
iget-object v8, p1, Landroid/hardware/SensorEvent;->values:[F
aget v8, v8, v2
# setter for: Lcom/alivc/component/capture/VideoPusher;->mLastXMag:F
invoke-static {v7, v8}, Lcom/alivc/component/capture/VideoPusher;->access$1302(Lcom/alivc/component/capture/VideoPusher;F)F
.line 1172
iget-object v7, p0, Lcom/alivc/component/capture/VideoPusher$6;->this$0:Lcom/alivc/component/capture/VideoPusher;
iget-object v8, p1, Landroid/hardware/SensorEvent;->values:[F
aget v8, v8, v3
# setter for: Lcom/alivc/component/capture/VideoPusher;->mLastYMag:F
invoke-static {v7, v8}, Lcom/alivc/component/capture/VideoPusher;->access$1402(Lcom/alivc/component/capture/VideoPusher;F)F
.line 1173
iget-object v7, p0, Lcom/alivc/component/capture/VideoPusher$6;->this$0:Lcom/alivc/component/capture/VideoPusher;
iget-object v8, p1, Landroid/hardware/SensorEvent;->values:[F
aget v8, v8, v4
# setter for: Lcom/alivc/component/capture/VideoPusher;->mLastZMag:F
invoke-static {v7, v8}, Lcom/alivc/component/capture/VideoPusher;->access$1502(Lcom/alivc/component/capture/VideoPusher;F)F
.line 1176
.end local v0 # "deltaX":F
.end local v5 # "deltaY":F
.end local v6 # "deltaZ":F
:cond_aa
iget-object v0, p1, Landroid/hardware/SensorEvent;->sensor:Landroid/hardware/Sensor;
invoke-virtual {v0}, Landroid/hardware/Sensor;->getType()I
move-result v0
if-ne v0, v3, :cond_177
.line 1177
iget-object v0, p0, Lcom/alivc/component/capture/VideoPusher$6;->this$0:Lcom/alivc/component/capture/VideoPusher;
# getter for: Lcom/alivc/component/capture/VideoPusher;->mLastXAccel:F
invoke-static {v0}, Lcom/alivc/component/capture/VideoPusher;->access$1700(Lcom/alivc/component/capture/VideoPusher;)F
move-result v0
cmpl-float v0, v0, v1
if-nez v0, :cond_d8
.line 1178
iget-object v0, p0, Lcom/alivc/component/capture/VideoPusher$6;->this$0:Lcom/alivc/component/capture/VideoPusher;
iget-object v1, p1, Landroid/hardware/SensorEvent;->values:[F
aget v1, v1, v2
# setter for: Lcom/alivc/component/capture/VideoPusher;->mLastXAccel:F
invoke-static {v0, v1}, Lcom/alivc/component/capture/VideoPusher;->access$1702(Lcom/alivc/component/capture/VideoPusher;F)F
.line 1179
iget-object v0, p0, Lcom/alivc/component/capture/VideoPusher$6;->this$0:Lcom/alivc/component/capture/VideoPusher;
iget-object v1, p1, Landroid/hardware/SensorEvent;->values:[F
aget v1, v1, v3
# setter for: Lcom/alivc/component/capture/VideoPusher;->mLastYAccel:F
invoke-static {v0, v1}, Lcom/alivc/component/capture/VideoPusher;->access$1802(Lcom/alivc/component/capture/VideoPusher;F)F
.line 1180
iget-object v0, p0, Lcom/alivc/component/capture/VideoPusher$6;->this$0:Lcom/alivc/component/capture/VideoPusher;
iget-object v1, p1, Landroid/hardware/SensorEvent;->values:[F
aget v1, v1, v4
# setter for: Lcom/alivc/component/capture/VideoPusher;->mLastZAccel:F
invoke-static {v0, v1}, Lcom/alivc/component/capture/VideoPusher;->access$1902(Lcom/alivc/component/capture/VideoPusher;F)F
.line 1181
return-void
.line 1183
:cond_d8
iget-object v0, p0, Lcom/alivc/component/capture/VideoPusher$6;->this$0:Lcom/alivc/component/capture/VideoPusher;
# getter for: Lcom/alivc/component/capture/VideoPusher;->mLastXAccel:F
invoke-static {v0}, Lcom/alivc/component/capture/VideoPusher;->access$1700(Lcom/alivc/component/capture/VideoPusher;)F
move-result v0
iget-object v1, p1, Landroid/hardware/SensorEvent;->values:[F
aget v1, v1, v2
sub-float/2addr v0, v1
invoke-static {v0}, Ljava/lang/Math;->abs(F)F
move-result v0
.line 1184
.restart local v0 # "deltaX":F
iget-object v1, p0, Lcom/alivc/component/capture/VideoPusher$6;->this$0:Lcom/alivc/component/capture/VideoPusher;
# getter for: Lcom/alivc/component/capture/VideoPusher;->mLastYAccel:F
invoke-static {v1}, Lcom/alivc/component/capture/VideoPusher;->access$1800(Lcom/alivc/component/capture/VideoPusher;)F
move-result v1
iget-object v5, p1, Landroid/hardware/SensorEvent;->values:[F
aget v5, v5, v3
sub-float/2addr v1, v5
invoke-static {v1}, Ljava/lang/Math;->abs(F)F
move-result v1
.line 1185
.local v1, "deltaY":F
iget-object v5, p0, Lcom/alivc/component/capture/VideoPusher$6;->this$0:Lcom/alivc/component/capture/VideoPusher;
# getter for: Lcom/alivc/component/capture/VideoPusher;->mLastZAccel:F
invoke-static {v5}, Lcom/alivc/component/capture/VideoPusher;->access$1900(Lcom/alivc/component/capture/VideoPusher;)F
move-result v5
iget-object v6, p1, Landroid/hardware/SensorEvent;->values:[F
aget v6, v6, v4
sub-float/2addr v5, v6
invoke-static {v5}, Ljava/lang/Math;->abs(F)F
move-result v5
.line 1187
.local v5, "deltaZ":F
mul-float v6, v0, v0
mul-float v7, v1, v1
add-float/2addr v6, v7
mul-float v7, v5, v5
add-float/2addr v6, v7
float-to-double v6, v6
invoke-static {v6, v7}, Ljava/lang/Math;->sqrt(D)D
move-result-wide v6
.line 1188
.local v6, "value":D
const-wide v8, 0x3ff6666660000000L # 1.399999976158142
cmpl-double v10, v6, v8
if-lez v10, :cond_142
iget-object v8, p0, Lcom/alivc/component/capture/VideoPusher$6;->this$0:Lcom/alivc/component/capture/VideoPusher;
# getter for: Lcom/alivc/component/capture/VideoPusher;->mAutoFocusing:Z
invoke-static {v8}, Lcom/alivc/component/capture/VideoPusher;->access$1600(Lcom/alivc/component/capture/VideoPusher;)Z
move-result v8
if-nez v8, :cond_142
.line 1189
invoke-direct {p0}, Lcom/alivc/component/capture/VideoPusher$6;->cameraAutoFocus()V
.line 1190
iget-object v8, p0, Lcom/alivc/component/capture/VideoPusher$6;->this$0:Lcom/alivc/component/capture/VideoPusher;
iget-object v9, p1, Landroid/hardware/SensorEvent;->values:[F
aget v2, v9, v2
# setter for: Lcom/alivc/component/capture/VideoPusher;->mLastXAccel:F
invoke-static {v8, v2}, Lcom/alivc/component/capture/VideoPusher;->access$1702(Lcom/alivc/component/capture/VideoPusher;F)F
.line 1191
iget-object v2, p0, Lcom/alivc/component/capture/VideoPusher$6;->this$0:Lcom/alivc/component/capture/VideoPusher;
iget-object v8, p1, Landroid/hardware/SensorEvent;->values:[F
aget v3, v8, v3
# setter for: Lcom/alivc/component/capture/VideoPusher;->mLastYAccel:F
invoke-static {v2, v3}, Lcom/alivc/component/capture/VideoPusher;->access$1802(Lcom/alivc/component/capture/VideoPusher;F)F
.line 1192
iget-object v2, p0, Lcom/alivc/component/capture/VideoPusher$6;->this$0:Lcom/alivc/component/capture/VideoPusher;
iget-object v3, p1, Landroid/hardware/SensorEvent;->values:[F
aget v3, v3, v4
# setter for: Lcom/alivc/component/capture/VideoPusher;->mLastZAccel:F
invoke-static {v2, v3}, Lcom/alivc/component/capture/VideoPusher;->access$1902(Lcom/alivc/component/capture/VideoPusher;F)F
.line 1193
return-void
.line 1196
:cond_142
const v8, 0x3f19999a # 0.6f
cmpl-float v9, v0, v8
if-gtz v9, :cond_151
cmpl-float v9, v1, v8
if-gtz v9, :cond_151
cmpl-float v8, v5, v8
if-lez v8, :cond_177
:cond_151
iget-object v8, p0, Lcom/alivc/component/capture/VideoPusher$6;->this$0:Lcom/alivc/component/capture/VideoPusher;
# getter for: Lcom/alivc/component/capture/VideoPusher;->mAutoFocusing:Z
invoke-static {v8}, Lcom/alivc/component/capture/VideoPusher;->access$1600(Lcom/alivc/component/capture/VideoPusher;)Z
move-result v8
if-nez v8, :cond_177
.line 1197
invoke-direct {p0}, Lcom/alivc/component/capture/VideoPusher$6;->cameraAutoFocus()V
.line 1198
iget-object v8, p0, Lcom/alivc/component/capture/VideoPusher$6;->this$0:Lcom/alivc/component/capture/VideoPusher;
iget-object v9, p1, Landroid/hardware/SensorEvent;->values:[F
aget v2, v9, v2
# setter for: Lcom/alivc/component/capture/VideoPusher;->mLastXAccel:F
invoke-static {v8, v2}, Lcom/alivc/component/capture/VideoPusher;->access$1702(Lcom/alivc/component/capture/VideoPusher;F)F
.line 1199
iget-object v2, p0, Lcom/alivc/component/capture/VideoPusher$6;->this$0:Lcom/alivc/component/capture/VideoPusher;
iget-object v8, p1, Landroid/hardware/SensorEvent;->values:[F
aget v3, v8, v3
# setter for: Lcom/alivc/component/capture/VideoPusher;->mLastYAccel:F
invoke-static {v2, v3}, Lcom/alivc/component/capture/VideoPusher;->access$1802(Lcom/alivc/component/capture/VideoPusher;F)F
.line 1200
iget-object v2, p0, Lcom/alivc/component/capture/VideoPusher$6;->this$0:Lcom/alivc/component/capture/VideoPusher;
iget-object v3, p1, Landroid/hardware/SensorEvent;->values:[F
aget v3, v3, v4
# setter for: Lcom/alivc/component/capture/VideoPusher;->mLastZAccel:F
invoke-static {v2, v3}, Lcom/alivc/component/capture/VideoPusher;->access$1902(Lcom/alivc/component/capture/VideoPusher;F)F
.line 1203
.end local v0 # "deltaX":F
.end local v1 # "deltaY":F
.end local v5 # "deltaZ":F
.end local v6 # "value":D
:cond_177
return-void
.line 1157
:cond_178
:goto_178
return-void
.end method