2021-12-21 23:37:30 +00:00
|
|
|
package b.o.a.n;
|
2021-06-27 20:44:35 +00:00
|
|
|
|
|
|
|
import android.location.Location;
|
|
|
|
import androidx.annotation.NonNull;
|
|
|
|
import androidx.annotation.Nullable;
|
2021-08-09 22:50:01 +00:00
|
|
|
import androidx.recyclerview.widget.RecyclerView;
|
2021-12-21 23:37:30 +00:00
|
|
|
import b.o.a.l;
|
|
|
|
import b.o.a.m.e;
|
|
|
|
import b.o.a.m.f;
|
|
|
|
import b.o.a.m.h;
|
|
|
|
import b.o.a.m.i;
|
|
|
|
import b.o.a.m.j;
|
|
|
|
import b.o.a.m.l;
|
|
|
|
import b.o.a.m.m;
|
|
|
|
import b.o.a.n.i;
|
2021-06-27 20:44:35 +00:00
|
|
|
import com.otaliastudios.cameraview.CameraException;
|
|
|
|
import com.otaliastudios.cameraview.CameraView;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.Collections;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Set;
|
|
|
|
/* compiled from: CameraBaseEngine */
|
|
|
|
public abstract class g extends i {
|
2021-12-17 22:03:14 +00:00
|
|
|
public h A;
|
|
|
|
public j B;
|
|
|
|
public Location C;
|
2021-06-27 20:44:35 +00:00
|
|
|
public float D;
|
2021-12-17 22:03:14 +00:00
|
|
|
public float E;
|
2021-06-27 20:44:35 +00:00
|
|
|
public boolean F;
|
|
|
|
public boolean G;
|
2021-12-17 22:03:14 +00:00
|
|
|
public boolean H;
|
|
|
|
public float I;
|
|
|
|
public boolean J;
|
2021-12-21 23:37:30 +00:00
|
|
|
public b.o.a.p.c K;
|
|
|
|
public final b.o.a.n.t.a L = new b.o.a.n.t.a();
|
2021-06-27 20:44:35 +00:00
|
|
|
@Nullable
|
2021-12-21 23:37:30 +00:00
|
|
|
public b.o.a.x.c M;
|
|
|
|
public b.o.a.x.c N;
|
|
|
|
public b.o.a.x.c O;
|
2021-12-17 22:03:14 +00:00
|
|
|
public e P;
|
|
|
|
public i Q;
|
2021-12-21 23:37:30 +00:00
|
|
|
public b.o.a.m.a R;
|
2021-12-17 22:03:14 +00:00
|
|
|
public long S;
|
2021-06-27 20:44:35 +00:00
|
|
|
public int T;
|
|
|
|
public int U;
|
2021-12-17 22:03:14 +00:00
|
|
|
public int V;
|
|
|
|
public long W;
|
2021-06-27 20:44:35 +00:00
|
|
|
public int X;
|
|
|
|
public int Y;
|
|
|
|
public int Z;
|
|
|
|
|
|
|
|
/* renamed from: a0 reason: collision with root package name */
|
2021-12-21 23:37:30 +00:00
|
|
|
public int f1913a0;
|
2021-06-27 20:44:35 +00:00
|
|
|
|
|
|
|
/* renamed from: b0 reason: collision with root package name */
|
2021-12-21 23:37:30 +00:00
|
|
|
public int f1914b0;
|
2021-12-17 22:03:14 +00:00
|
|
|
|
|
|
|
/* renamed from: c0 reason: collision with root package name */
|
2021-12-21 23:37:30 +00:00
|
|
|
public b.o.a.u.a f1915c0;
|
|
|
|
public b.o.a.w.a o;
|
|
|
|
public b.o.a.c p;
|
|
|
|
public b.o.a.v.d q;
|
|
|
|
public b.o.a.x.b r;
|
2021-06-27 20:44:35 +00:00
|
|
|
|
2021-11-08 18:25:28 +00:00
|
|
|
/* renamed from: s reason: collision with root package name */
|
2021-12-21 23:37:30 +00:00
|
|
|
public b.o.a.x.b f1916s;
|
|
|
|
public b.o.a.x.b t;
|
2021-12-17 22:03:14 +00:00
|
|
|
public int u;
|
|
|
|
public boolean v;
|
|
|
|
public f w;
|
2021-06-27 20:44:35 +00:00
|
|
|
|
|
|
|
/* renamed from: x reason: collision with root package name */
|
2021-12-21 23:37:30 +00:00
|
|
|
public m f1917x;
|
2021-06-27 20:44:35 +00:00
|
|
|
|
|
|
|
/* renamed from: y reason: collision with root package name */
|
2021-12-21 23:37:30 +00:00
|
|
|
public l f1918y;
|
2021-06-27 20:44:35 +00:00
|
|
|
|
|
|
|
/* renamed from: z reason: collision with root package name */
|
2021-12-21 23:37:30 +00:00
|
|
|
public b.o.a.m.b f1919z;
|
2021-06-27 20:44:35 +00:00
|
|
|
|
|
|
|
/* compiled from: CameraBaseEngine */
|
|
|
|
public class a implements Runnable {
|
|
|
|
public final /* synthetic */ e j;
|
2021-12-17 22:03:14 +00:00
|
|
|
public final /* synthetic */ e k;
|
2021-06-27 20:44:35 +00:00
|
|
|
|
|
|
|
public a(e eVar, e eVar2) {
|
2021-12-17 22:03:14 +00:00
|
|
|
this.j = eVar;
|
|
|
|
this.k = eVar2;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // java.lang.Runnable
|
|
|
|
public void run() {
|
2021-12-17 22:03:14 +00:00
|
|
|
if (g.this.c(this.j)) {
|
2021-06-27 20:44:35 +00:00
|
|
|
g.this.X();
|
|
|
|
return;
|
|
|
|
}
|
2021-12-17 22:03:14 +00:00
|
|
|
g.this.P = this.k;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* compiled from: CameraBaseEngine */
|
|
|
|
public class b implements Runnable {
|
|
|
|
public b() {
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // java.lang.Runnable
|
|
|
|
public void run() {
|
|
|
|
g.this.X();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* compiled from: CameraBaseEngine */
|
|
|
|
public class c implements Runnable {
|
2021-12-17 22:03:14 +00:00
|
|
|
public final /* synthetic */ l.a j;
|
|
|
|
public final /* synthetic */ boolean k;
|
2021-06-27 20:44:35 +00:00
|
|
|
|
|
|
|
public c(l.a aVar, boolean z2) {
|
2021-12-17 22:03:14 +00:00
|
|
|
this.j = aVar;
|
|
|
|
this.k = z2;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // java.lang.Runnable
|
|
|
|
public void run() {
|
2021-12-17 22:03:14 +00:00
|
|
|
i.j.a(1, "takePicture:", "running. isTakingPicture:", Boolean.valueOf(g.this.W0()));
|
2021-06-27 20:44:35 +00:00
|
|
|
if (!g.this.W0()) {
|
|
|
|
g gVar = g.this;
|
2021-12-17 22:03:14 +00:00
|
|
|
if (gVar.Q != i.VIDEO) {
|
|
|
|
l.a aVar = this.j;
|
2021-06-27 20:44:35 +00:00
|
|
|
aVar.a = false;
|
2021-12-21 23:37:30 +00:00
|
|
|
aVar.f1897b = gVar.C;
|
2021-12-17 22:03:14 +00:00
|
|
|
aVar.e = gVar.P;
|
|
|
|
aVar.g = gVar.B;
|
|
|
|
gVar.Y0(aVar, this.k);
|
2021-06-27 20:44:35 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
throw new IllegalStateException("Can't take hq pictures while in VIDEO mode");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* compiled from: CameraBaseEngine */
|
|
|
|
public class d implements Runnable {
|
2021-12-17 22:03:14 +00:00
|
|
|
public final /* synthetic */ l.a j;
|
|
|
|
public final /* synthetic */ boolean k;
|
2021-06-27 20:44:35 +00:00
|
|
|
|
|
|
|
public d(l.a aVar, boolean z2) {
|
2021-12-17 22:03:14 +00:00
|
|
|
this.j = aVar;
|
|
|
|
this.k = z2;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // java.lang.Runnable
|
|
|
|
public void run() {
|
2021-12-17 22:03:14 +00:00
|
|
|
i.j.a(1, "takePictureSnapshot:", "running. isTakingPicture:", Boolean.valueOf(g.this.W0()));
|
2021-06-27 20:44:35 +00:00
|
|
|
if (!g.this.W0()) {
|
2021-12-17 22:03:14 +00:00
|
|
|
l.a aVar = this.j;
|
2021-06-27 20:44:35 +00:00
|
|
|
g gVar = g.this;
|
2021-12-21 23:37:30 +00:00
|
|
|
aVar.f1897b = gVar.C;
|
2021-06-27 20:44:35 +00:00
|
|
|
aVar.a = true;
|
2021-12-17 22:03:14 +00:00
|
|
|
aVar.e = gVar.P;
|
2021-06-27 20:44:35 +00:00
|
|
|
aVar.g = j.JPEG;
|
2021-12-21 23:37:30 +00:00
|
|
|
g.this.Z0(this.j, b.o.a.x.a.g(gVar.U0(b.o.a.n.t.b.OUTPUT)), this.k);
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public g(@NonNull i.g gVar) {
|
|
|
|
super(gVar);
|
2021-12-21 23:37:30 +00:00
|
|
|
b.i.a.f.e.o.f.Y(null);
|
|
|
|
b.i.a.f.e.o.f.Y(null);
|
|
|
|
b.i.a.f.e.o.f.Y(null);
|
|
|
|
b.i.a.f.e.o.f.Y(null);
|
|
|
|
b.i.a.f.e.o.f.Y(null);
|
|
|
|
b.i.a.f.e.o.f.Y(null);
|
|
|
|
b.i.a.f.e.o.f.Y(null);
|
|
|
|
b.i.a.f.e.o.f.Y(null);
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
public final float A() {
|
2021-12-17 22:03:14 +00:00
|
|
|
return this.I;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
public final void A0(int i) {
|
2021-12-17 22:03:14 +00:00
|
|
|
this.U = i;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
public final boolean B() {
|
2021-12-17 22:03:14 +00:00
|
|
|
return this.J;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
|
|
|
public final void B0(@NonNull b.o.a.m.l lVar) {
|
|
|
|
this.f1918y = lVar;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
@Nullable
|
2021-12-21 23:37:30 +00:00
|
|
|
public final b.o.a.x.b C(@NonNull b.o.a.n.t.b bVar) {
|
|
|
|
b.o.a.x.b bVar2 = this.f1916s;
|
2021-06-27 20:44:35 +00:00
|
|
|
if (bVar2 == null) {
|
|
|
|
return null;
|
|
|
|
}
|
2021-12-21 23:37:30 +00:00
|
|
|
return this.L.b(b.o.a.n.t.b.SENSOR, bVar) ? bVar2.f() : bVar2;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
public final void C0(int i) {
|
2021-12-17 22:03:14 +00:00
|
|
|
this.T = i;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
public final int D() {
|
2021-12-17 22:03:14 +00:00
|
|
|
return this.Y;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
public final void D0(long j) {
|
2021-12-17 22:03:14 +00:00
|
|
|
this.S = j;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
public final int E() {
|
2021-12-17 22:03:14 +00:00
|
|
|
return this.X;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
|
|
|
public final void E0(@NonNull b.o.a.x.c cVar) {
|
2021-12-17 22:03:14 +00:00
|
|
|
this.O = cVar;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
@Nullable
|
2021-12-21 23:37:30 +00:00
|
|
|
public final b.o.a.x.b F(@NonNull b.o.a.n.t.b bVar) {
|
|
|
|
b.o.a.x.b C = C(bVar);
|
2021-06-27 20:44:35 +00:00
|
|
|
if (C == null) {
|
|
|
|
return null;
|
|
|
|
}
|
2021-12-21 23:37:30 +00:00
|
|
|
boolean b2 = this.L.b(bVar, b.o.a.n.t.b.VIEW);
|
2021-12-17 22:03:14 +00:00
|
|
|
int i = b2 ? this.Y : this.X;
|
|
|
|
int i2 = b2 ? this.X : this.Y;
|
2021-06-27 20:44:35 +00:00
|
|
|
if (i <= 0) {
|
|
|
|
i = Integer.MAX_VALUE;
|
|
|
|
}
|
|
|
|
if (i2 <= 0) {
|
|
|
|
i2 = Integer.MAX_VALUE;
|
|
|
|
}
|
2021-12-21 23:37:30 +00:00
|
|
|
HashMap<String, b.o.a.x.a> hashMap = b.o.a.x.a.j;
|
|
|
|
float i3 = b.o.a.x.a.f(C.j, C.k).i();
|
|
|
|
if (b.o.a.x.a.f(i, i2).i() >= i3) {
|
2021-12-17 22:03:14 +00:00
|
|
|
int min = Math.min(C.k, i2);
|
2021-12-21 23:37:30 +00:00
|
|
|
return new b.o.a.x.b((int) Math.floor((double) (((float) min) * i3)), min);
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
2021-12-17 22:03:14 +00:00
|
|
|
int min2 = Math.min(C.j, i);
|
2021-12-21 23:37:30 +00:00
|
|
|
return new b.o.a.x.b(min2, (int) Math.floor((double) (((float) min2) / i3)));
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
public final int G() {
|
2021-12-17 22:03:14 +00:00
|
|
|
return this.U;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
@NonNull
|
2021-12-21 23:37:30 +00:00
|
|
|
public final b.o.a.m.l H() {
|
|
|
|
return this.f1918y;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
public final int I() {
|
2021-12-17 22:03:14 +00:00
|
|
|
return this.T;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
public final long J() {
|
2021-12-17 22:03:14 +00:00
|
|
|
return this.S;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
@Nullable
|
2021-12-21 23:37:30 +00:00
|
|
|
public final b.o.a.x.b K(@NonNull b.o.a.n.t.b bVar) {
|
|
|
|
b.o.a.x.b bVar2 = this.r;
|
|
|
|
if (bVar2 == null || this.Q == b.o.a.m.i.PICTURE) {
|
2021-06-27 20:44:35 +00:00
|
|
|
return null;
|
|
|
|
}
|
2021-12-21 23:37:30 +00:00
|
|
|
return this.L.b(b.o.a.n.t.b.SENSOR, bVar) ? bVar2.f() : bVar2;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
@NonNull
|
2021-12-21 23:37:30 +00:00
|
|
|
public final b.o.a.x.c L() {
|
2021-12-17 22:03:14 +00:00
|
|
|
return this.O;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
@NonNull
|
|
|
|
public final m M() {
|
2021-12-21 23:37:30 +00:00
|
|
|
return this.f1917x;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
public final float N() {
|
2021-12-17 22:03:14 +00:00
|
|
|
return this.D;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
public void O0(@NonNull l.a aVar) {
|
2021-12-17 22:03:14 +00:00
|
|
|
boolean z2 = this.G;
|
2021-12-21 23:37:30 +00:00
|
|
|
b.o.a.n.v.f fVar = this.n;
|
|
|
|
fVar.b("take picture", true, new b.o.a.n.v.h(fVar, b.o.a.n.v.e.BIND, new c(aVar, z2)));
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
public void P0(@NonNull l.a aVar) {
|
2021-12-17 22:03:14 +00:00
|
|
|
boolean z2 = this.H;
|
2021-12-21 23:37:30 +00:00
|
|
|
b.o.a.n.v.f fVar = this.n;
|
|
|
|
fVar.b("take picture snapshot", true, new b.o.a.n.v.h(fVar, b.o.a.n.v.e.BIND, new d(aVar, z2)));
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@NonNull
|
2021-12-21 23:37:30 +00:00
|
|
|
public final b.o.a.x.b Q0(@NonNull b.o.a.m.i iVar) {
|
2021-06-27 20:44:35 +00:00
|
|
|
Set set;
|
2021-12-21 23:37:30 +00:00
|
|
|
b.o.a.x.c cVar;
|
|
|
|
boolean b2 = this.L.b(b.o.a.n.t.b.SENSOR, b.o.a.n.t.b.VIEW);
|
|
|
|
if (iVar == b.o.a.m.i.PICTURE) {
|
2021-06-27 20:44:35 +00:00
|
|
|
cVar = this.N;
|
2021-12-17 22:03:14 +00:00
|
|
|
set = Collections.unmodifiableSet(this.p.e);
|
|
|
|
} else {
|
|
|
|
cVar = this.O;
|
|
|
|
set = Collections.unmodifiableSet(this.p.f);
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
2021-12-21 23:37:30 +00:00
|
|
|
b.o.a.x.c O0 = b.i.a.f.e.o.f.O0(cVar, new b.o.a.x.e());
|
2021-06-27 20:44:35 +00:00
|
|
|
ArrayList arrayList = new ArrayList(set);
|
2021-12-21 23:37:30 +00:00
|
|
|
b.o.a.x.b bVar = ((b.o.a.x.l) O0).a(arrayList).get(0);
|
2021-06-27 20:44:35 +00:00
|
|
|
if (arrayList.contains(bVar)) {
|
2021-12-17 22:03:14 +00:00
|
|
|
i.j.a(1, "computeCaptureSize:", "result:", bVar, "flip:", Boolean.valueOf(b2), "mode:", iVar);
|
2021-06-27 20:44:35 +00:00
|
|
|
return b2 ? bVar.f() : bVar;
|
|
|
|
}
|
|
|
|
throw new RuntimeException("SizeSelectors must not return Sizes other than those in the input list.");
|
|
|
|
}
|
|
|
|
|
|
|
|
@NonNull
|
2021-12-21 23:37:30 +00:00
|
|
|
public final b.o.a.x.b R0() {
|
|
|
|
b.o.a.n.t.b bVar = b.o.a.n.t.b.VIEW;
|
|
|
|
List<b.o.a.x.b> T0 = T0();
|
|
|
|
boolean b2 = this.L.b(b.o.a.n.t.b.SENSOR, bVar);
|
2021-06-27 20:44:35 +00:00
|
|
|
ArrayList arrayList = new ArrayList(T0.size());
|
2021-12-21 23:37:30 +00:00
|
|
|
for (b.o.a.x.b bVar2 : T0) {
|
2021-06-27 20:44:35 +00:00
|
|
|
if (b2) {
|
|
|
|
bVar2 = bVar2.f();
|
|
|
|
}
|
|
|
|
arrayList.add(bVar2);
|
|
|
|
}
|
2021-12-21 23:37:30 +00:00
|
|
|
b.o.a.x.b U0 = U0(bVar);
|
2021-06-27 20:44:35 +00:00
|
|
|
if (U0 != null) {
|
2021-12-21 23:37:30 +00:00
|
|
|
b.o.a.x.b bVar3 = this.r;
|
|
|
|
b.o.a.x.a f = b.o.a.x.a.f(bVar3.j, bVar3.k);
|
2021-06-27 20:44:35 +00:00
|
|
|
if (b2) {
|
2021-12-21 23:37:30 +00:00
|
|
|
f = b.o.a.x.a.f(f.l, f.k);
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
2021-12-21 23:37:30 +00:00
|
|
|
b.o.a.b bVar4 = i.j;
|
2021-06-27 20:44:35 +00:00
|
|
|
bVar4.a(1, "computePreviewStreamSize:", "targetRatio:", f, "targetMinSize:", U0);
|
2021-12-21 23:37:30 +00:00
|
|
|
b.o.a.x.c f2 = b.i.a.f.e.o.f.f(b.i.a.f.e.o.f.u1(new b.o.a.x.d(f.i(), 0.0f)), new b.o.a.x.e());
|
|
|
|
b.o.a.x.c f3 = b.i.a.f.e.o.f.f(b.i.a.f.e.o.f.K0(U0.k), b.i.a.f.e.o.f.L0(U0.j), new b.o.a.x.f());
|
|
|
|
b.o.a.x.c O0 = b.i.a.f.e.o.f.O0(b.i.a.f.e.o.f.f(f2, f3), f3, f2, new b.o.a.x.e());
|
|
|
|
b.o.a.x.c cVar = this.M;
|
2021-06-27 20:44:35 +00:00
|
|
|
if (cVar != null) {
|
2021-12-21 23:37:30 +00:00
|
|
|
O0 = b.i.a.f.e.o.f.O0(cVar, O0);
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
2021-12-21 23:37:30 +00:00
|
|
|
b.o.a.x.b bVar5 = ((b.o.a.x.l) O0).a(arrayList).get(0);
|
2021-06-27 20:44:35 +00:00
|
|
|
if (arrayList.contains(bVar5)) {
|
|
|
|
if (b2) {
|
|
|
|
bVar5 = bVar5.f();
|
|
|
|
}
|
|
|
|
bVar4.a(1, "computePreviewStreamSize:", "result:", bVar5, "flip:", Boolean.valueOf(b2));
|
|
|
|
return bVar5;
|
|
|
|
}
|
|
|
|
throw new RuntimeException("SizeSelectors must not return Sizes other than those in the input list.");
|
|
|
|
}
|
|
|
|
throw new IllegalStateException("targetMinSize should not be null here.");
|
|
|
|
}
|
|
|
|
|
|
|
|
@NonNull
|
2021-12-21 23:37:30 +00:00
|
|
|
public b.o.a.p.c S0() {
|
2021-12-17 22:03:14 +00:00
|
|
|
if (this.K == null) {
|
2021-12-21 23:37:30 +00:00
|
|
|
this.K = V0(this.f1914b0);
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
2021-12-17 22:03:14 +00:00
|
|
|
return this.K;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@NonNull
|
2021-12-21 23:37:30 +00:00
|
|
|
public abstract List<b.o.a.x.b> T0();
|
2021-06-27 20:44:35 +00:00
|
|
|
|
|
|
|
@Nullable
|
2021-12-21 23:37:30 +00:00
|
|
|
public final b.o.a.x.b U0(@NonNull b.o.a.n.t.b bVar) {
|
|
|
|
b.o.a.w.a aVar = this.o;
|
2021-06-27 20:44:35 +00:00
|
|
|
if (aVar == null) {
|
|
|
|
return null;
|
|
|
|
}
|
2021-12-21 23:37:30 +00:00
|
|
|
return this.L.b(b.o.a.n.t.b.VIEW, bVar) ? aVar.l().f() : aVar.l();
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@NonNull
|
2021-12-21 23:37:30 +00:00
|
|
|
public abstract b.o.a.p.c V0(int i);
|
2021-06-27 20:44:35 +00:00
|
|
|
|
|
|
|
public final boolean W0() {
|
2021-12-17 22:03:14 +00:00
|
|
|
return this.q != null;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public abstract void X0();
|
|
|
|
|
|
|
|
public abstract void Y0(@NonNull l.a aVar, boolean z2);
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
|
|
|
public final void Z(@NonNull b.o.a.m.a aVar) {
|
2021-12-17 22:03:14 +00:00
|
|
|
if (this.R != aVar) {
|
|
|
|
this.R = aVar;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
public abstract void Z0(@NonNull l.a aVar, @NonNull b.o.a.x.a aVar2, boolean z2);
|
2021-06-27 20:44:35 +00:00
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.v.d.a
|
2021-06-27 20:44:35 +00:00
|
|
|
public void a(@Nullable l.a aVar, @Nullable Exception exc) {
|
2021-12-17 22:03:14 +00:00
|
|
|
this.q = null;
|
2021-06-27 20:44:35 +00:00
|
|
|
if (aVar != null) {
|
2021-12-17 22:03:14 +00:00
|
|
|
CameraView.b bVar = (CameraView.b) this.m;
|
2022-01-11 22:19:46 +00:00
|
|
|
bVar.f3137b.a(1, "dispatchOnPictureTaken", aVar);
|
2021-12-21 23:37:30 +00:00
|
|
|
CameraView.this.t.post(new b.o.a.i(bVar, aVar));
|
2021-06-27 20:44:35 +00:00
|
|
|
return;
|
|
|
|
}
|
2021-12-17 22:03:14 +00:00
|
|
|
i.j.a(3, "onPictureResult", "result is null: something went wrong.", exc);
|
|
|
|
((CameraView.b) this.m).a(new CameraException(exc, 4));
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
public final void a0(int i) {
|
2021-12-17 22:03:14 +00:00
|
|
|
this.V = i;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public final boolean a1() {
|
2021-12-17 22:03:14 +00:00
|
|
|
long j = this.W;
|
2021-08-09 22:50:01 +00:00
|
|
|
return j > 0 && j != RecyclerView.FOREVER_NS;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
|
|
|
public final void b0(@NonNull b.o.a.m.b bVar) {
|
|
|
|
this.f1919z = bVar;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
public final void c0(long j) {
|
2021-12-17 22:03:14 +00:00
|
|
|
this.W = j;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
@NonNull
|
2021-12-21 23:37:30 +00:00
|
|
|
public final b.o.a.n.t.a e() {
|
2021-12-17 22:03:14 +00:00
|
|
|
return this.L;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
public final void e0(@NonNull e eVar) {
|
2021-12-17 22:03:14 +00:00
|
|
|
e eVar2 = this.P;
|
2021-06-27 20:44:35 +00:00
|
|
|
if (eVar != eVar2) {
|
2021-12-17 22:03:14 +00:00
|
|
|
this.P = eVar;
|
2021-12-21 23:37:30 +00:00
|
|
|
b.o.a.n.v.f fVar = this.n;
|
|
|
|
fVar.b("facing", true, new b.o.a.n.v.h(fVar, b.o.a.n.v.e.ENGINE, new a(eVar, eVar2)));
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
@NonNull
|
2021-12-21 23:37:30 +00:00
|
|
|
public final b.o.a.m.a f() {
|
2021-12-17 22:03:14 +00:00
|
|
|
return this.R;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
public final int g() {
|
2021-12-17 22:03:14 +00:00
|
|
|
return this.V;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
@NonNull
|
2021-12-21 23:37:30 +00:00
|
|
|
public final b.o.a.m.b h() {
|
|
|
|
return this.f1919z;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
public final void h0(int i) {
|
2021-12-21 23:37:30 +00:00
|
|
|
this.f1913a0 = i;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
public final long i() {
|
2021-12-17 22:03:14 +00:00
|
|
|
return this.W;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
public final void i0(int i) {
|
2021-12-17 22:03:14 +00:00
|
|
|
this.Z = i;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
@Nullable
|
2021-12-21 23:37:30 +00:00
|
|
|
public final b.o.a.c j() {
|
2021-12-17 22:03:14 +00:00
|
|
|
return this.p;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
public final void j0(int i) {
|
2021-12-21 23:37:30 +00:00
|
|
|
this.f1914b0 = i;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
public final float k() {
|
2021-12-17 22:03:14 +00:00
|
|
|
return this.E;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
@NonNull
|
|
|
|
public final e l() {
|
2021-12-17 22:03:14 +00:00
|
|
|
return this.P;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
@NonNull
|
|
|
|
public final f m() {
|
2021-12-17 22:03:14 +00:00
|
|
|
return this.w;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
public final int n() {
|
2021-12-17 22:03:14 +00:00
|
|
|
return this.u;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
|
|
|
public final void n0(@NonNull b.o.a.m.i iVar) {
|
2021-12-17 22:03:14 +00:00
|
|
|
if (iVar != this.Q) {
|
|
|
|
this.Q = iVar;
|
2021-12-21 23:37:30 +00:00
|
|
|
b.o.a.n.v.f fVar = this.n;
|
|
|
|
fVar.b("mode", true, new b.o.a.n.v.h(fVar, b.o.a.n.v.e.ENGINE, new b()));
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
public final int o() {
|
2021-12-21 23:37:30 +00:00
|
|
|
return this.f1913a0;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
|
|
|
public final void o0(@Nullable b.o.a.u.a aVar) {
|
|
|
|
this.f1915c0 = aVar;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
public final int p() {
|
2021-12-17 22:03:14 +00:00
|
|
|
return this.Z;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
public final int q() {
|
2021-12-21 23:37:30 +00:00
|
|
|
return this.f1914b0;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
public final void q0(boolean z2) {
|
2021-12-17 22:03:14 +00:00
|
|
|
this.G = z2;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
@NonNull
|
|
|
|
public final h r() {
|
2021-12-17 22:03:14 +00:00
|
|
|
return this.A;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
|
|
|
public final void r0(@NonNull b.o.a.x.c cVar) {
|
2021-12-17 22:03:14 +00:00
|
|
|
this.N = cVar;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
@Nullable
|
|
|
|
public final Location s() {
|
2021-12-17 22:03:14 +00:00
|
|
|
return this.C;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
public final void s0(boolean z2) {
|
2021-12-17 22:03:14 +00:00
|
|
|
this.H = z2;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
@NonNull
|
2021-12-21 23:37:30 +00:00
|
|
|
public final b.o.a.m.i t() {
|
2021-12-17 22:03:14 +00:00
|
|
|
return this.Q;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
@NonNull
|
|
|
|
public final j u() {
|
2021-12-17 22:03:14 +00:00
|
|
|
return this.B;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
|
|
|
public final void u0(@NonNull b.o.a.w.a aVar) {
|
|
|
|
b.o.a.w.a aVar2 = this.o;
|
2021-06-27 20:44:35 +00:00
|
|
|
if (aVar2 != null) {
|
|
|
|
aVar2.t(null);
|
|
|
|
}
|
2021-12-17 22:03:14 +00:00
|
|
|
this.o = aVar;
|
2021-06-27 20:44:35 +00:00
|
|
|
aVar.t(this);
|
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
public final boolean v() {
|
2021-12-17 22:03:14 +00:00
|
|
|
return this.G;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
@Nullable
|
2021-12-21 23:37:30 +00:00
|
|
|
public final b.o.a.x.b w(@NonNull b.o.a.n.t.b bVar) {
|
|
|
|
b.o.a.x.b bVar2 = this.r;
|
|
|
|
if (bVar2 == null || this.Q == b.o.a.m.i.VIDEO) {
|
2021-06-27 20:44:35 +00:00
|
|
|
return null;
|
|
|
|
}
|
2021-12-21 23:37:30 +00:00
|
|
|
return this.L.b(b.o.a.n.t.b.SENSOR, bVar) ? bVar2.f() : bVar2;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
public final void w0(boolean z2) {
|
2021-12-17 22:03:14 +00:00
|
|
|
this.J = z2;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
@NonNull
|
2021-12-21 23:37:30 +00:00
|
|
|
public final b.o.a.x.c x() {
|
2021-12-17 22:03:14 +00:00
|
|
|
return this.N;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
|
|
|
public final void x0(@Nullable b.o.a.x.c cVar) {
|
2021-12-17 22:03:14 +00:00
|
|
|
this.M = cVar;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
public final boolean y() {
|
2021-12-17 22:03:14 +00:00
|
|
|
return this.H;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
public final void y0(int i) {
|
2021-12-17 22:03:14 +00:00
|
|
|
this.Y = i;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
@NonNull
|
2021-12-21 23:37:30 +00:00
|
|
|
public final b.o.a.w.a z() {
|
2021-12-17 22:03:14 +00:00
|
|
|
return this.o;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
2021-12-21 23:37:30 +00:00
|
|
|
@Override // b.o.a.n.i
|
2021-06-27 20:44:35 +00:00
|
|
|
public final void z0(int i) {
|
2021-12-17 22:03:14 +00:00
|
|
|
this.X = i;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
}
|