2020-05-17 12:40:10 +00:00
|
|
|
.class public Lcom/camerakit/CameraKitView;
|
2020-07-08 16:44:49 +00:00
|
|
|
.super Lf/f/p;
|
2020-05-17 12:40:10 +00:00
|
|
|
.source "CameraKitView.java"
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
|
|
value = {
|
2020-07-08 16:44:49 +00:00
|
|
|
Lcom/camerakit/CameraKitView$CameraException;,
|
|
|
|
Lcom/camerakit/CameraKitView$b;,
|
|
|
|
Lcom/camerakit/CameraKitView$d;,
|
2020-05-17 12:40:10 +00:00
|
|
|
Lcom/camerakit/CameraKitView$e;,
|
2020-07-08 16:44:49 +00:00
|
|
|
Lcom/camerakit/CameraKitView$c;,
|
2020-05-17 12:40:10 +00:00
|
|
|
Lcom/camerakit/CameraKitView$ErrorListener;,
|
2020-07-08 16:44:49 +00:00
|
|
|
Lcom/camerakit/CameraKitView$f;,
|
|
|
|
Lcom/camerakit/CameraKitView$a;
|
2020-05-17 12:40:10 +00:00
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
2020-07-08 16:44:49 +00:00
|
|
|
.field public static x:Lf/f/s/a;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.field public static y:Lf/f/s/b;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public h:Z
|
|
|
|
|
|
|
|
.field public i:F
|
|
|
|
|
|
|
|
.field public j:I
|
|
|
|
|
|
|
|
.field public k:I
|
|
|
|
|
|
|
|
.field public l:I
|
|
|
|
|
|
|
|
.field public m:F
|
|
|
|
|
|
|
|
.field public n:I
|
|
|
|
|
|
|
|
.field public o:I
|
|
|
|
|
|
|
|
.field public p:I
|
|
|
|
|
|
|
|
.field public q:F
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.field public r:Lcom/camerakit/CameraKitView$c;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.field public s:Lcom/camerakit/CameraKitView$a;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.field public t:Lcom/camerakit/CameraKitView$f;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.field public u:Lcom/camerakit/CameraKitView$ErrorListener;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.field public v:Lcom/camerakit/CameraKitView$e;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.field public w:Lf/f/i;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
# direct methods
|
2020-05-17 12:40:10 +00:00
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
|
|
.locals 3
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct {p0, p1, p2}, Lf/f/p;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
sget-object v0, Lcom/camerakit/R$a;->CameraKitView:[I
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2, v0}, Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[I)Landroid/content/res/TypedArray;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
sget p2, Lcom/camerakit/R$a;->CameraKitView_android_adjustViewBounds:I
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2, v0}, Landroid/content/res/TypedArray;->getBoolean(IZ)Z
|
|
|
|
|
|
|
|
move-result p2
|
|
|
|
|
|
|
|
iput-boolean p2, p0, Lcom/camerakit/CameraKitView;->h:Z
|
|
|
|
|
|
|
|
sget p2, Lcom/camerakit/R$a;->CameraKitView_camera_aspectRatio:I
|
|
|
|
|
|
|
|
const/high16 v1, -0x40800000 # -1.0f
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2, v1}, Landroid/content/res/TypedArray;->getFloat(IF)F
|
|
|
|
|
|
|
|
move-result p2
|
|
|
|
|
|
|
|
iput p2, p0, Lcom/camerakit/CameraKitView;->i:F
|
|
|
|
|
|
|
|
sget p2, Lcom/camerakit/R$a;->CameraKitView_camera_facing:I
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2, v0}, Landroid/content/res/TypedArray;->getInteger(II)I
|
|
|
|
|
|
|
|
move-result p2
|
|
|
|
|
|
|
|
iput p2, p0, Lcom/camerakit/CameraKitView;->j:I
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
sget-object p2, Lcom/camerakit/CameraKitView;->x:Lf/f/s/a;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
sget-object v1, Lf/f/s/a;->e:Lf/f/s/a;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 v2, 0x1
|
|
|
|
|
|
|
|
if-ne p2, v1, :cond_0
|
|
|
|
|
|
|
|
iput v2, p0, Lcom/camerakit/CameraKitView;->j:I
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
sget p2, Lcom/camerakit/R$a;->CameraKitView_camera_flash:I
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2, v0}, Landroid/content/res/TypedArray;->getInteger(II)I
|
|
|
|
|
|
|
|
move-result p2
|
|
|
|
|
|
|
|
iput p2, p0, Lcom/camerakit/CameraKitView;->k:I
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
sget-object p2, Lcom/camerakit/CameraKitView;->y:Lf/f/s/b;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
sget-object v0, Lf/f/s/b;->e:Lf/f/s/b;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
if-ne p2, v0, :cond_1
|
|
|
|
|
|
|
|
iput v2, p0, Lcom/camerakit/CameraKitView;->k:I
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
sget p2, Lcom/camerakit/R$a;->CameraKitView_camera_focus:I
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2, v2}, Landroid/content/res/TypedArray;->getInteger(II)I
|
|
|
|
|
|
|
|
move-result p2
|
|
|
|
|
|
|
|
iput p2, p0, Lcom/camerakit/CameraKitView;->l:I
|
|
|
|
|
|
|
|
sget p2, Lcom/camerakit/R$a;->CameraKitView_camera_zoomFactor:I
|
|
|
|
|
|
|
|
const/high16 v0, 0x3f800000 # 1.0f
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2, v0}, Landroid/content/res/TypedArray;->getFloat(IF)F
|
|
|
|
|
|
|
|
move-result p2
|
|
|
|
|
|
|
|
iput p2, p0, Lcom/camerakit/CameraKitView;->m:F
|
|
|
|
|
|
|
|
sget p2, Lcom/camerakit/R$a;->CameraKitView_camera_permissions:I
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2, v2}, Landroid/content/res/TypedArray;->getInteger(II)I
|
|
|
|
|
|
|
|
move-result p2
|
|
|
|
|
|
|
|
iput p2, p0, Lcom/camerakit/CameraKitView;->p:I
|
|
|
|
|
|
|
|
sget p2, Lcom/camerakit/R$a;->CameraKitView_camera_imageMegaPixels:I
|
|
|
|
|
|
|
|
const/high16 v0, 0x40000000 # 2.0f
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2, v0}, Landroid/content/res/TypedArray;->getFloat(IF)F
|
|
|
|
|
|
|
|
move-result p2
|
|
|
|
|
|
|
|
iput p2, p0, Lcom/camerakit/CameraKitView;->q:F
|
|
|
|
|
|
|
|
sget p2, Lcom/camerakit/R$a;->CameraKitView_camera_imageJpegQuality:I
|
|
|
|
|
|
|
|
const/16 v0, 0x64
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2, v0}, Landroid/content/res/TypedArray;->getInteger(II)I
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroid/content/res/TypedArray;->recycle()V
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
new-instance p1, Lf/f/i;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroid/widget/FrameLayout;->getContext()Landroid/content/Context;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct {p1, p2}, Lf/f/i;-><init>(Landroid/content/Context;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iput-object p1, p0, Lcom/camerakit/CameraKitView;->w:Lf/f/i;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p0, p1}, Landroid/widget/FrameLayout;->addView(Landroid/view/View;)V
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object p1, p0, Lcom/camerakit/CameraKitView;->w:Lf/f/i;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
new-instance p2, Lf/f/e;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct {p2, p0}, Lf/f/e;-><init>(Lcom/camerakit/CameraKitView;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p1, p2}, Lf/f/i;->setListener(Lf/f/i$c;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.method private getMissingPermissions()Ljava/util/List;
|
|
|
|
.locals 4
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
new-instance v0, Ljava/util/ArrayList;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
sget v1, Landroid/os/Build$VERSION;->SDK_INT:I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const/16 v2, 0x17
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
if-ge v1, v2, :cond_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
return-object v0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
:cond_0
|
|
|
|
iget v1, p0, Lcom/camerakit/CameraKitView;->p:I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
or-int/lit8 v2, v1, 0x1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const/4 v3, -0x1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
if-ne v2, v1, :cond_1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const-string v1, "android.permission.CAMERA"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p0}, Landroid/widget/FrameLayout;->getContext()Landroid/content/Context;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-object v2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v2, v1}, Landroid/content/Context;->checkSelfPermission(Ljava/lang/String;)I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result v2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
if-ne v2, v3, :cond_1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
iget v1, p0, Lcom/camerakit/CameraKitView;->p:I
|
|
|
|
|
|
|
|
or-int/lit8 v2, v1, 0x2
|
|
|
|
|
|
|
|
if-ne v2, v1, :cond_2
|
|
|
|
|
|
|
|
const-string v1, "android.permission.RECORD_AUDIO"
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroid/widget/FrameLayout;->getContext()Landroid/content/Context;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-virtual {v2, v1}, Landroid/content/Context;->checkSelfPermission(Ljava/lang/String;)I
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
if-ne v2, v3, :cond_2
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
iget v1, p0, Lcom/camerakit/CameraKitView;->p:I
|
|
|
|
|
|
|
|
or-int/lit8 v2, v1, 0x4
|
|
|
|
|
|
|
|
if-ne v2, v1, :cond_3
|
|
|
|
|
|
|
|
const-string v1, "android.permission.WRITE_EXTERNAL_STORAGE"
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroid/widget/FrameLayout;->getContext()Landroid/content/Context;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-virtual {v2, v1}, Landroid/content/Context;->checkSelfPermission(Ljava/lang/String;)I
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
if-ne v2, v3, :cond_3
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
iget v1, p0, Lcom/camerakit/CameraKitView;->p:I
|
|
|
|
|
|
|
|
or-int/lit8 v2, v1, 0x8
|
|
|
|
|
|
|
|
if-ne v2, v1, :cond_4
|
|
|
|
|
|
|
|
const-string v1, "android.permission.ACCESS_FINE_LOCATION"
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroid/widget/FrameLayout;->getContext()Landroid/content/Context;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-virtual {v2, v1}, Landroid/content/Context;->checkSelfPermission(Ljava/lang/String;)I
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
if-ne v2, v3, :cond_4
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
return-object v0
|
2020-05-17 12:40:10 +00:00
|
|
|
.end method
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public a()V
|
|
|
|
.locals 7
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroid/widget/FrameLayout;->isInEditMode()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object v0, p0, Lcom/camerakit/CameraKitView;->w:Lf/f/i;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
sget-object v1, Lk0/a/v0;->d:Lk0/a/v0;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object v2, v0, Lf/f/i;->t:Lk0/a/x;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
new-instance v4, Lf/f/m;
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
invoke-direct {v4, v0, v3}, Lf/f/m;-><init>(Lf/f/i;Lkotlin/coroutines/Continuation;)V
|
|
|
|
|
|
|
|
const/4 v5, 0x2
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
invoke-static/range {v1 .. v6}, Lj0/i/u;->F(Lkotlinx/coroutines/CoroutineScope;Lkotlin/coroutines/CoroutineContext;Lk0/a/b0;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.method public b()V
|
|
|
|
.locals 10
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroid/widget/FrameLayout;->isInEditMode()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-direct {p0}, Lcom/camerakit/CameraKitView;->getMissingPermissions()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
sget v1, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
|
|
|
|
const/16 v2, 0x17
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const/4 v3, 0x0
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
if-lt v1, v2, :cond_7
|
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->size()I
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-lez v1, :cond_7
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroid/widget/FrameLayout;->getContext()Landroid/content/Context;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-object v1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:goto_0
|
2020-07-08 16:44:49 +00:00
|
|
|
instance-of v2, v1, Landroid/content/ContextWrapper;
|
|
|
|
|
|
|
|
if-eqz v2, :cond_2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
instance-of v2, v1, Landroid/app/Activity;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
if-eqz v2, :cond_1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-object v2, v1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
check-cast v2, Landroid/app/Activity;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-object v3, v2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_1
|
2020-07-08 16:44:49 +00:00
|
|
|
check-cast v1, Landroid/content/ContextWrapper;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v1}, Landroid/content/ContextWrapper;->getBaseContext()Landroid/content/Context;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-object v1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_2
|
2020-07-08 16:44:49 +00:00
|
|
|
if-eqz v3, :cond_6
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
new-instance v1, Ljava/util/ArrayList;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
new-instance v2, Ljava/util/ArrayList;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v4
|
|
|
|
|
|
|
|
if-eqz v4, :cond_4
|
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
check-cast v4, Ljava/lang/String;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v3, v4}, Landroid/app/Activity;->shouldShowRequestPermissionRationale(Ljava/lang/String;)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result v5
|
|
|
|
|
|
|
|
if-nez v5, :cond_3
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v1, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_3
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v2, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_4
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v1}, Ljava/util/ArrayList;->size()I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-lez v0, :cond_5
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v1}, Ljava/util/ArrayList;->size()I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
new-array v0, v0, [Ljava/lang/String;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v1, v0}, Ljava/util/ArrayList;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, [Ljava/lang/String;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const v1, 0x18323
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v3, v0, v1}, Landroid/app/Activity;->requestPermissions([Ljava/lang/String;I)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_5
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v2}, Ljava/util/ArrayList;->size()I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
if-lez v0, :cond_6
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/camerakit/CameraKitView;->v:Lcom/camerakit/CameraKitView$e;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_6
|
|
|
|
|
|
|
|
invoke-interface {v0}, Lcom/camerakit/CameraKitView$e;->b()V
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
:cond_6
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_7
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object v0, p0, Lcom/camerakit/CameraKitView;->v:Lcom/camerakit/CameraKitView$e;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_8
|
|
|
|
|
|
|
|
invoke-interface {v0}, Lcom/camerakit/CameraKitView$e;->a()V
|
|
|
|
|
|
|
|
:cond_8
|
2020-05-17 12:40:10 +00:00
|
|
|
iget v0, p0, Lcom/camerakit/CameraKitView;->k:I
|
|
|
|
|
|
|
|
invoke-virtual {p0, v0}, Lcom/camerakit/CameraKitView;->setFlash(I)V
|
|
|
|
|
|
|
|
iget v0, p0, Lcom/camerakit/CameraKitView;->q:F
|
|
|
|
|
|
|
|
invoke-virtual {p0, v0}, Lcom/camerakit/CameraKitView;->setImageMegaPixels(F)V
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/camerakit/CameraKitView;->getFacing()I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
if-nez v0, :cond_9
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
sget-object v0, Lf/f/s/a;->d:Lf/f/s/a;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
:cond_9
|
|
|
|
sget-object v0, Lf/f/s/a;->e:Lf/f/s/a;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:goto_2
|
2020-07-08 16:44:49 +00:00
|
|
|
sput-object v0, Lcom/camerakit/CameraKitView;->x:Lf/f/s/a;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object v1, p0, Lcom/camerakit/CameraKitView;->w:Lf/f/i;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
if-eqz v0, :cond_a
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
sget-object v4, Lk0/a/v0;->d:Lk0/a/v0;
|
|
|
|
|
|
|
|
iget-object v5, v1, Lf/f/i;->t:Lk0/a/x;
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
new-instance v7, Lf/f/n;
|
|
|
|
|
|
|
|
invoke-direct {v7, v1, v0, v3}, Lf/f/n;-><init>(Lf/f/i;Lf/f/s/a;Lkotlin/coroutines/Continuation;)V
|
|
|
|
|
|
|
|
const/4 v8, 0x2
|
|
|
|
|
|
|
|
const/4 v9, 0x0
|
|
|
|
|
|
|
|
invoke-static/range {v4 .. v9}, Lj0/i/u;->F(Lkotlinx/coroutines/CoroutineScope;Lkotlin/coroutines/CoroutineContext;Lk0/a/b0;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
:cond_a
|
|
|
|
const-string v0, "facing"
|
|
|
|
|
|
|
|
invoke-static {v0}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw v3
|
2020-05-17 12:40:10 +00:00
|
|
|
.end method
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.method public c()V
|
|
|
|
.locals 7
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroid/widget/FrameLayout;->isInEditMode()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object v0, p0, Lcom/camerakit/CameraKitView;->w:Lf/f/i;
|
|
|
|
|
|
|
|
sget-object v1, Lk0/a/v0;->d:Lk0/a/v0;
|
|
|
|
|
|
|
|
iget-object v2, v0, Lf/f/i;->t:Lk0/a/x;
|
|
|
|
|
|
|
|
new-instance v4, Lf/f/o;
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
invoke-direct {v4, v0, v3}, Lf/f/o;-><init>(Lf/f/i;Lkotlin/coroutines/Continuation;)V
|
|
|
|
|
|
|
|
const/4 v5, 0x2
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-static/range {v1 .. v6}, Lj0/i/u;->F(Lkotlinx/coroutines/CoroutineScope;Lkotlin/coroutines/CoroutineContext;Lk0/a/b0;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lkotlinx/coroutines/Job;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public getAdjustViewBounds()Z
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget-boolean v0, p0, Lcom/camerakit/CameraKitView;->h:Z
|
|
|
|
|
|
|
|
return v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public getAspectRatio()F
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget v0, p0, Lcom/camerakit/CameraKitView;->i:F
|
|
|
|
|
|
|
|
return v0
|
|
|
|
.end method
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.method public getCameraListener()Lcom/camerakit/CameraKitView$a;
|
2020-05-17 12:40:10 +00:00
|
|
|
.locals 1
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object v0, p0, Lcom/camerakit/CameraKitView;->s:Lcom/camerakit/CameraKitView$a;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public getErrorListener()Lcom/camerakit/CameraKitView$ErrorListener;
|
|
|
|
.locals 1
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object v0, p0, Lcom/camerakit/CameraKitView;->u:Lcom/camerakit/CameraKitView$ErrorListener;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public getFacing()I
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget v0, p0, Lcom/camerakit/CameraKitView;->j:I
|
|
|
|
|
|
|
|
return v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public getFlash()I
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget v0, p0, Lcom/camerakit/CameraKitView;->k:I
|
|
|
|
|
|
|
|
return v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public getFocus()I
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget v0, p0, Lcom/camerakit/CameraKitView;->l:I
|
|
|
|
|
|
|
|
return v0
|
|
|
|
.end method
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.method public getGestureListener()Lcom/camerakit/CameraKitView$c;
|
2020-05-17 12:40:10 +00:00
|
|
|
.locals 1
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object v0, p0, Lcom/camerakit/CameraKitView;->r:Lcom/camerakit/CameraKitView$c;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public getImageMegaPixels()F
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget v0, p0, Lcom/camerakit/CameraKitView;->q:F
|
|
|
|
|
|
|
|
return v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public getPermissions()I
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget v0, p0, Lcom/camerakit/CameraKitView;->p:I
|
|
|
|
|
|
|
|
return v0
|
|
|
|
.end method
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.method public getPhotoResolution()Lf/f/s/c;
|
2020-05-17 12:40:10 +00:00
|
|
|
.locals 1
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object v0, p0, Lcom/camerakit/CameraKitView;->w:Lf/f/i;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v0}, Lf/f/i;->getPhotoSize()Lf/f/s/c;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v0}, Lf/f/s/c;->f()I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
|
|
|
|
:cond_0
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object v0, p0, Lcom/camerakit/CameraKitView;->w:Lf/f/i;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v0}, Lf/f/i;->getPhotoSize()Lf/f/s/c;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public getPreviewEffect()I
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget v0, p0, Lcom/camerakit/CameraKitView;->o:I
|
|
|
|
|
|
|
|
return v0
|
|
|
|
.end method
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.method public getPreviewListener()Lcom/camerakit/CameraKitView$f;
|
2020-05-17 12:40:10 +00:00
|
|
|
.locals 1
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object v0, p0, Lcom/camerakit/CameraKitView;->t:Lcom/camerakit/CameraKitView$f;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.method public getPreviewResolution()Lf/f/s/c;
|
2020-05-17 12:40:10 +00:00
|
|
|
.locals 1
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object v0, p0, Lcom/camerakit/CameraKitView;->w:Lf/f/i;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v0}, Lf/f/i;->getPreviewSize()Lf/f/s/c;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v0}, Lf/f/s/c;->f()I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
|
|
|
|
:cond_0
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object v0, p0, Lcom/camerakit/CameraKitView;->w:Lf/f/i;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v0}, Lf/f/i;->getPreviewSize()Lf/f/s/c;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public getSensorPreset()I
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget v0, p0, Lcom/camerakit/CameraKitView;->n:I
|
|
|
|
|
|
|
|
return v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public getZoomFactor()F
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget v0, p0, Lcom/camerakit/CameraKitView;->m:F
|
|
|
|
|
|
|
|
return v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public onMeasure(II)V
|
|
|
|
.locals 5
|
|
|
|
|
|
|
|
iget-boolean v0, p0, Lcom/camerakit/CameraKitView;->h:Z
|
|
|
|
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroid/widget/FrameLayout;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
iget v1, v0, Landroid/view/ViewGroup$LayoutParams;->width:I
|
|
|
|
|
|
|
|
const/4 v2, -0x2
|
|
|
|
|
|
|
|
if-ne v1, v2, :cond_1
|
|
|
|
|
|
|
|
iget v1, v0, Landroid/view/ViewGroup$LayoutParams;->height:I
|
|
|
|
|
|
|
|
if-eq v1, v2, :cond_0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
2020-07-08 16:44:49 +00:00
|
|
|
new-instance p1, Lcom/camerakit/CameraKitView$CameraException;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const-string p2, "android:adjustViewBounds=true while both layout_width and layout_height are setView to wrap_content - only 1 is allowed."
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct {p1, p2}, Lcom/camerakit/CameraKitView$CameraException;-><init>(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
throw p1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
:goto_0
|
|
|
|
iget v1, v0, Landroid/view/ViewGroup$LayoutParams;->width:I
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
const/high16 v4, 0x40000000 # 2.0f
|
|
|
|
|
|
|
|
if-ne v1, v2, :cond_3
|
|
|
|
|
|
|
|
invoke-static {p2}, Landroid/view/View$MeasureSpec;->getSize(I)I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
iget v1, p0, Lcom/camerakit/CameraKitView;->i:F
|
|
|
|
|
|
|
|
cmpl-float v2, v1, v3
|
|
|
|
|
|
|
|
if-lez v2, :cond_2
|
|
|
|
|
|
|
|
int-to-float p1, v0
|
|
|
|
|
|
|
|
mul-float p1, p1, v1
|
|
|
|
|
|
|
|
float-to-int p1, p1
|
|
|
|
|
|
|
|
invoke-static {p1, v4}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_2
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object v1, p0, Lcom/camerakit/CameraKitView;->w:Lf/f/i;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
if-eqz v1, :cond_5
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v1}, Lf/f/i;->getSurfaceSize()Lf/f/s/c;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v1}, Lf/f/s/c;->f()I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-lez v1, :cond_5
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object p1, p0, Lcom/camerakit/CameraKitView;->w:Lf/f/i;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p1}, Lf/f/i;->getSurfaceSize()Lf/f/s/c;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
int-to-float v0, v0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget v1, p1, Lf/f/s/c;->e:I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
int-to-float v1, v1
|
|
|
|
|
|
|
|
div-float/2addr v0, v1
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget p1, p1, Lf/f/s/c;->d:I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
int-to-float p1, p1
|
|
|
|
|
|
|
|
mul-float v0, v0, p1
|
|
|
|
|
|
|
|
float-to-int p1, v0
|
|
|
|
|
|
|
|
invoke-static {p1, v4}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
iget v0, v0, Landroid/view/ViewGroup$LayoutParams;->height:I
|
|
|
|
|
|
|
|
if-ne v0, v2, :cond_5
|
|
|
|
|
|
|
|
invoke-static {p1}, Landroid/view/View$MeasureSpec;->getSize(I)I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
iget v1, p0, Lcom/camerakit/CameraKitView;->i:F
|
|
|
|
|
|
|
|
cmpl-float v2, v1, v3
|
|
|
|
|
|
|
|
if-lez v2, :cond_4
|
|
|
|
|
|
|
|
int-to-float p2, v0
|
|
|
|
|
|
|
|
mul-float p2, p2, v1
|
|
|
|
|
|
|
|
float-to-int p2, p2
|
|
|
|
|
|
|
|
invoke-static {p2, v4}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
|
|
|
|
|
|
|
|
move-result p2
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_4
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object v1, p0, Lcom/camerakit/CameraKitView;->w:Lf/f/i;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
if-eqz v1, :cond_5
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v1}, Lf/f/i;->getSurfaceSize()Lf/f/s/c;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v1}, Lf/f/s/c;->f()I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-lez v1, :cond_5
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object p2, p0, Lcom/camerakit/CameraKitView;->w:Lf/f/i;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p2}, Lf/f/i;->getSurfaceSize()Lf/f/s/c;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
int-to-float v0, v0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget v1, p2, Lf/f/s/c;->d:I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
int-to-float v1, v1
|
|
|
|
|
|
|
|
div-float/2addr v0, v1
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget p2, p2, Lf/f/s/c;->e:I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
int-to-float p2, p2
|
|
|
|
|
|
|
|
mul-float v0, v0, p2
|
|
|
|
|
|
|
|
float-to-int p2, v0
|
|
|
|
|
|
|
|
invoke-static {p2, v4}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I
|
|
|
|
|
|
|
|
move-result p2
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
:goto_1
|
|
|
|
invoke-super {p0, p1, p2}, Landroid/widget/FrameLayout;->onMeasure(II)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public setAdjustViewBounds(Z)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iput-boolean p1, p0, Lcom/camerakit/CameraKitView;->h:Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public setAspectRatio(F)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iput p1, p0, Lcom/camerakit/CameraKitView;->i:F
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.method public setCameraListener(Lcom/camerakit/CameraKitView$a;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
.locals 0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iput-object p1, p0, Lcom/camerakit/CameraKitView;->s:Lcom/camerakit/CameraKitView$a;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public setErrorListener(Lcom/camerakit/CameraKitView$ErrorListener;)V
|
|
|
|
.locals 0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iput-object p1, p0, Lcom/camerakit/CameraKitView;->u:Lcom/camerakit/CameraKitView$ErrorListener;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public setFacing(I)V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iput p1, p0, Lcom/camerakit/CameraKitView;->j:I
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object p1, p0, Lcom/camerakit/CameraKitView;->w:Lf/f/i;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p1}, Lf/f/i;->getLifecycleState()Lf/f/i$b;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
|
|
|
if-eq p1, v0, :cond_0
|
|
|
|
|
|
|
|
const/4 v0, 0x2
|
|
|
|
|
|
|
|
if-eq p1, v0, :cond_1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p0}, Lcom/camerakit/CameraKitView;->c()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p0}, Lcom/camerakit/CameraKitView;->b()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p0}, Lcom/camerakit/CameraKitView;->a()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p0}, Lcom/camerakit/CameraKitView;->c()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p0}, Lcom/camerakit/CameraKitView;->b()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:goto_0
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public setFlash(I)V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iput p1, p0, Lcom/camerakit/CameraKitView;->k:I
|
|
|
|
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
|
|
|
if-eq p1, v0, :cond_2
|
|
|
|
|
|
|
|
const/4 v0, 0x2
|
|
|
|
|
|
|
|
if-eq p1, v0, :cond_1
|
|
|
|
|
|
|
|
const/4 v0, 0x3
|
|
|
|
|
|
|
|
if-eq p1, v0, :cond_0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
:try_start_0
|
2020-07-08 16:44:49 +00:00
|
|
|
new-instance p1, Lcom/camerakit/CameraKitView$CameraException;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const-string v0, "FLASH_TORCH is not supported in this version of CameraKit."
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct {p1, v0}, Lcom/camerakit/CameraKitView$CameraException;-><init>(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
throw p1
|
|
|
|
|
|
|
|
:cond_1
|
2020-07-08 16:44:49 +00:00
|
|
|
new-instance p1, Lcom/camerakit/CameraKitView$CameraException;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const-string v0, "FLASH_AUTO is not supported in this version of CameraKit."
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct {p1, v0}, Lcom/camerakit/CameraKitView$CameraException;-><init>(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
throw p1
|
|
|
|
|
|
|
|
:cond_2
|
2020-07-08 16:44:49 +00:00
|
|
|
sget-object p1, Lf/f/s/b;->e:Lf/f/s/b;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
sput-object p1, Lcom/camerakit/CameraKitView;->y:Lf/f/s/b;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_3
|
2020-07-08 16:44:49 +00:00
|
|
|
sget-object p1, Lf/f/s/b;->d:Lf/f/s/b;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
sput-object p1, Lcom/camerakit/CameraKitView;->y:Lf/f/s/b;
|
2020-05-17 12:40:10 +00:00
|
|
|
:try_end_0
|
2020-07-08 16:44:49 +00:00
|
|
|
.catch Lcom/camerakit/CameraKitView$CameraException; {:try_start_0 .. :try_end_0} :catch_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:goto_0
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object p1, p0, Lcom/camerakit/CameraKitView;->w:Lf/f/i;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
sget-object v0, Lcom/camerakit/CameraKitView;->y:Lf/f/s/b;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p1, v0}, Lf/f/i;->setFlash(Lf/f/s/b;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:catch_0
|
|
|
|
move-exception p1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Ljava/lang/RuntimeException;->getMessage()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string v0, "CameraException: Flash"
|
|
|
|
|
|
|
|
invoke-static {v0, p1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public setFocus(I)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iput p1, p0, Lcom/camerakit/CameraKitView;->l:I
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.method public setFrameCallback(Lcom/camerakit/CameraKitView$b;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
.locals 0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.method public setGestureListener(Lcom/camerakit/CameraKitView$c;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
.locals 0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iput-object p1, p0, Lcom/camerakit/CameraKitView;->r:Lcom/camerakit/CameraKitView$c;
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public setImageMegaPixels(F)V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iput p1, p0, Lcom/camerakit/CameraKitView;->q:F
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object v0, p0, Lcom/camerakit/CameraKitView;->w:Lf/f/i;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v0, p1}, Lf/f/i;->setImageMegaPixels(F)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public setPermissions(I)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iput p1, p0, Lcom/camerakit/CameraKitView;->p:I
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.method public setPermissionsListener(Lcom/camerakit/CameraKitView$e;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
.locals 0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iput-object p1, p0, Lcom/camerakit/CameraKitView;->v:Lcom/camerakit/CameraKitView$e;
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public setPreviewEffect(I)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iput p1, p0, Lcom/camerakit/CameraKitView;->o:I
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.method public setPreviewListener(Lcom/camerakit/CameraKitView$f;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
.locals 0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iput-object p1, p0, Lcom/camerakit/CameraKitView;->t:Lcom/camerakit/CameraKitView$f;
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public setSensorPreset(I)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iput p1, p0, Lcom/camerakit/CameraKitView;->n:I
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public setZoomFactor(F)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iput p1, p0, Lcom/camerakit/CameraKitView;->m:F
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|