277 lines
11 KiB
Java
277 lines
11 KiB
Java
|
package com.facetec.sdk;
|
||
|
|
||
|
import android.hardware.Camera;
|
||
|
import android.util.Size;
|
||
|
import com.facetec.sdk.FaceTecSDK;
|
||
|
import java.util.Arrays;
|
||
|
import java.util.List;
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* loaded from: classes.dex */
|
||
|
public final class m {
|
||
|
private static final List<String> c = Arrays.asList("ro_kernel", "ro_product", "ro_boot", "ro_hardware", "ro_build");
|
||
|
static int d = 1;
|
||
|
private static String e = "";
|
||
|
private static String i = "";
|
||
|
private static String h = "";
|
||
|
private static String f = "";
|
||
|
static String b = "";
|
||
|
private static StringBuilder g = new StringBuilder();
|
||
|
static boolean a = false;
|
||
|
|
||
|
m() {
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public static void c() {
|
||
|
cg.H(ak.X, a ? 1 : 0);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public static void b() {
|
||
|
cg.F(ak.X, a ? 1 : 0);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public static void d() {
|
||
|
cg.C(ak.G, String.valueOf(aw.b("BT")));
|
||
|
cg.C(ak.N, String.valueOf(aw.b("RWT")));
|
||
|
cg.C(ak.I, String.valueOf(aw.b("CTOT")));
|
||
|
cg.C(ak.M, String.valueOf(aw.b("CLOT")));
|
||
|
cg.C(ak.L, String.valueOf(aw.b("CTCPT")));
|
||
|
cg.C(ak.S, String.valueOf(aw.b("CLCPT")));
|
||
|
cg.C(ak.P, String.valueOf(aw.b("CTCCST")));
|
||
|
cg.C(ak.Q, String.valueOf(aw.b("CTPRT")));
|
||
|
cg.C(ak.O, String.valueOf(aw.b("CTFFT")));
|
||
|
cg.C(ak.R, String.valueOf(aw.b("CLFFT")));
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public static void a() {
|
||
|
cg.H(ak.v, d);
|
||
|
cg.C(ak.u, e);
|
||
|
cg.C(ak.z, i);
|
||
|
cg.C(ak.D, h);
|
||
|
cg.C(ak.A, f);
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:30:0x0096, code lost:
|
||
|
|
||
|
if (r2 != null) goto L29;
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:32:0x00b4, code lost:
|
||
|
|
||
|
if (r1.length() == 0) goto L33;
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:33:0x00b6, code lost:
|
||
|
|
||
|
com.facetec.sdk.m.b = r1.toString();
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:34:0x00bc, code lost:
|
||
|
|
||
|
com.facetec.sdk.cg.L(com.facetec.sdk.ak.V, com.facetec.sdk.m.g.toString());
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:35:0x00c7, code lost:
|
||
|
|
||
|
return;
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:37:0x00ad, code lost:
|
||
|
|
||
|
r2.destroy();
|
||
|
*/
|
||
|
/* JADX WARN: Code restructure failed: missing block: B:46:0x00ab, code lost:
|
||
|
|
||
|
if (r2 == null) goto L30;
|
||
|
*/
|
||
|
/*
|
||
|
Code decompiled incorrectly, please refer to instructions dump.
|
||
|
To view partially-correct add '--show-bad-code' argument
|
||
|
*/
|
||
|
public static void a(android.content.Context r9) {
|
||
|
/*
|
||
|
java.lang.String r0 = ""
|
||
|
java.lang.StringBuilder r1 = new java.lang.StringBuilder
|
||
|
r1.<init>()
|
||
|
r2 = 0
|
||
|
java.lang.Runtime r3 = java.lang.Runtime.getRuntime() // Catch: java.lang.Throwable -> L99 java.io.IOException -> L9b
|
||
|
java.lang.String r4 = "getprop"
|
||
|
java.lang.Process r2 = r3.exec(r4) // Catch: java.lang.Throwable -> L99 java.io.IOException -> L9b
|
||
|
java.io.BufferedReader r3 = new java.io.BufferedReader // Catch: java.lang.Throwable -> L99 java.io.IOException -> L9b
|
||
|
java.io.InputStreamReader r4 = new java.io.InputStreamReader // Catch: java.lang.Throwable -> L99 java.io.IOException -> L9b
|
||
|
java.io.InputStream r5 = r2.getInputStream() // Catch: java.lang.Throwable -> L99 java.io.IOException -> L9b
|
||
|
r4.<init>(r5) // Catch: java.lang.Throwable -> L99 java.io.IOException -> L9b
|
||
|
r3.<init>(r4) // Catch: java.lang.Throwable -> L99 java.io.IOException -> L9b
|
||
|
java.lang.String r4 = r3.readLine() // Catch: java.lang.Throwable -> L99 java.io.IOException -> L9b
|
||
|
L24:
|
||
|
if (r4 == 0) goto L96
|
||
|
boolean r5 = r4.isEmpty() // Catch: java.lang.Throwable -> L99 java.io.IOException -> L9b
|
||
|
if (r5 != 0) goto L96
|
||
|
java.lang.String r5 = "]: \\["
|
||
|
java.lang.String[] r5 = r4.split(r5) // Catch: java.lang.Throwable -> L99 java.io.IOException -> L9b
|
||
|
int r6 = r5.length // Catch: java.lang.Throwable -> L99 java.io.IOException -> L9b
|
||
|
r7 = 2
|
||
|
if (r6 == r7) goto L3c
|
||
|
java.lang.String r5 = ":"
|
||
|
java.lang.String[] r5 = r4.split(r5) // Catch: java.lang.Throwable -> L99 java.io.IOException -> L9b
|
||
|
L3c:
|
||
|
int r6 = r5.length // Catch: java.lang.Throwable -> L99 java.io.IOException -> L9b
|
||
|
if (r6 < r7) goto L89
|
||
|
r6 = 0
|
||
|
r6 = r5[r6] // Catch: java.lang.Throwable -> L99 java.io.IOException -> L9b
|
||
|
java.lang.String r7 = "."
|
||
|
java.lang.String r8 = "_"
|
||
|
java.lang.String r6 = r6.replace(r7, r8) // Catch: java.lang.Throwable -> L99 java.io.IOException -> L9b
|
||
|
java.lang.String r7 = "["
|
||
|
java.lang.String r6 = r6.replace(r7, r0) // Catch: java.lang.Throwable -> L99 java.io.IOException -> L9b
|
||
|
r7 = 1
|
||
|
r5 = r5[r7] // Catch: java.lang.Throwable -> L99 java.io.IOException -> L9b
|
||
|
java.lang.String r7 = "]"
|
||
|
java.lang.String r5 = r5.replace(r7, r0) // Catch: java.lang.Throwable -> L99 java.io.IOException -> L9b
|
||
|
java.util.List<java.lang.String> r7 = com.facetec.sdk.m.c // Catch: java.lang.Throwable -> L99 java.io.IOException -> L9b
|
||
|
java.util.Iterator r7 = r7.iterator() // Catch: java.lang.Throwable -> L99 java.io.IOException -> L9b
|
||
|
L5f:
|
||
|
boolean r8 = r7.hasNext() // Catch: java.lang.Throwable -> L99 java.io.IOException -> L9b
|
||
|
if (r8 == 0) goto L89
|
||
|
java.lang.Object r8 = r7.next() // Catch: java.lang.Throwable -> L99 java.io.IOException -> L9b
|
||
|
java.lang.String r8 = (java.lang.String) r8 // Catch: java.lang.Throwable -> L99 java.io.IOException -> L9b
|
||
|
boolean r8 = r6.contains(r8) // Catch: java.lang.Throwable -> L99 java.io.IOException -> L9b
|
||
|
if (r8 == 0) goto L5f
|
||
|
boolean r8 = r5.isEmpty() // Catch: java.lang.Throwable -> L99 java.io.IOException -> L9b
|
||
|
if (r8 != 0) goto L5f
|
||
|
java.lang.StringBuilder r7 = com.facetec.sdk.m.g // Catch: java.lang.Throwable -> L99 java.io.IOException -> L9b
|
||
|
r7.append(r6) // Catch: java.lang.Throwable -> L99 java.io.IOException -> L9b
|
||
|
java.lang.String r6 = ": "
|
||
|
r7.append(r6) // Catch: java.lang.Throwable -> L99 java.io.IOException -> L9b
|
||
|
r7.append(r5) // Catch: java.lang.Throwable -> L99 java.io.IOException -> L9b
|
||
|
java.lang.String r5 = ", "
|
||
|
r7.append(r5) // Catch: java.lang.Throwable -> L99 java.io.IOException -> L9b
|
||
|
L89:
|
||
|
r1.append(r4) // Catch: java.lang.Throwable -> L99 java.io.IOException -> L9b
|
||
|
java.lang.String r4 = "\n"
|
||
|
r1.append(r4) // Catch: java.lang.Throwable -> L99 java.io.IOException -> L9b
|
||
|
java.lang.String r4 = r3.readLine() // Catch: java.lang.Throwable -> L99 java.io.IOException -> L9b
|
||
|
goto L24
|
||
|
L96:
|
||
|
if (r2 == 0) goto Lb0
|
||
|
goto Lad
|
||
|
L99:
|
||
|
r9 = move-exception
|
||
|
goto Lc8
|
||
|
L9b:
|
||
|
r0 = move-exception
|
||
|
com.facetec.sdk.d r3 = com.facetec.sdk.d.DEVICE_SYSTEM_PROPERTY_ANNOTATION_ERROR // Catch: java.lang.Throwable -> L99
|
||
|
java.lang.String r4 = "Error getting device system property: "
|
||
|
java.lang.String r0 = java.lang.String.valueOf(r0) // Catch: java.lang.Throwable -> L99
|
||
|
java.lang.String r0 = r4.concat(r0) // Catch: java.lang.Throwable -> L99
|
||
|
com.facetec.sdk.t.a(r9, r3, r0) // Catch: java.lang.Throwable -> L99
|
||
|
if (r2 == 0) goto Lb0
|
||
|
Lad:
|
||
|
r2.destroy()
|
||
|
Lb0:
|
||
|
int r9 = r1.length()
|
||
|
if (r9 == 0) goto Lbc
|
||
|
java.lang.String r9 = r1.toString()
|
||
|
com.facetec.sdk.m.b = r9
|
||
|
Lbc:
|
||
|
java.lang.StringBuilder r9 = com.facetec.sdk.m.g
|
||
|
java.lang.String r9 = r9.toString()
|
||
|
java.lang.String r0 = com.facetec.sdk.ak.V
|
||
|
com.facetec.sdk.cg.L(r0, r9)
|
||
|
return
|
||
|
Lc8:
|
||
|
if (r2 == 0) goto Lcd
|
||
|
r2.destroy()
|
||
|
Lcd:
|
||
|
throw r9
|
||
|
*/
|
||
|
throw new UnsupportedOperationException("Method not decompiled: com.facetec.sdk.m.a(android.content.Context):void");
|
||
|
}
|
||
|
|
||
|
/* renamed from: com.facetec.sdk.m$1, reason: invalid class name */
|
||
|
/* loaded from: classes.dex */
|
||
|
static final /* synthetic */ class AnonymousClass1 {
|
||
|
static final int[] d;
|
||
|
|
||
|
static {
|
||
|
int[] iArr = new int[FaceTecSDK.e.values().length];
|
||
|
d = iArr;
|
||
|
try {
|
||
|
iArr[FaceTecSDK.e.NORMAL.ordinal()] = 1;
|
||
|
} catch (NoSuchFieldError unused) {
|
||
|
}
|
||
|
try {
|
||
|
d[FaceTecSDK.e.BRIGHT_LIGHT.ordinal()] = 2;
|
||
|
} catch (NoSuchFieldError unused2) {
|
||
|
}
|
||
|
try {
|
||
|
d[FaceTecSDK.e.LOW_LIGHT.ordinal()] = 3;
|
||
|
} catch (NoSuchFieldError unused3) {
|
||
|
}
|
||
|
try {
|
||
|
d[FaceTecSDK.e.LOW_LIGHT_FROM_SENSOR.ordinal()] = 4;
|
||
|
} catch (NoSuchFieldError unused4) {
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public static void e() {
|
||
|
int i2 = AnonymousClass1.d[FaceTecSDK.d.ordinal()];
|
||
|
if (i2 == 3 || i2 == 4) {
|
||
|
boolean d2 = new cv().d();
|
||
|
cg.H(ak.W, d2 ? 1 : 0);
|
||
|
cg.F(ak.W, d2 ? 1 : 0);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public static void e(List<Camera.Size> list) {
|
||
|
if (e.isEmpty() && bf.e()) {
|
||
|
StringBuilder sb = new StringBuilder();
|
||
|
for (Camera.Size size : list) {
|
||
|
sb.append(size.width);
|
||
|
sb.append("x");
|
||
|
sb.append(size.height);
|
||
|
sb.append(",");
|
||
|
}
|
||
|
e = sb.toString();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public static void c(Size[] sizeArr) {
|
||
|
if (h.isEmpty() && bf.e()) {
|
||
|
StringBuilder sb = new StringBuilder();
|
||
|
for (Size size : sizeArr) {
|
||
|
sb.append(size.getWidth());
|
||
|
sb.append("x");
|
||
|
sb.append(size.getHeight());
|
||
|
sb.append(",");
|
||
|
}
|
||
|
h = sb.toString();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public static void i() {
|
||
|
int i2 = AnonymousClass1.d[FaceTecSDK.d.ordinal()];
|
||
|
if (i2 == 1) {
|
||
|
a(0);
|
||
|
return;
|
||
|
}
|
||
|
if (i2 == 2) {
|
||
|
a(3);
|
||
|
} else if (i2 == 3) {
|
||
|
a(1);
|
||
|
} else if (i2 == 4) {
|
||
|
a(2);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
private static void a(int i2) {
|
||
|
cg.H("dlm", i2);
|
||
|
cg.F("dlm", i2);
|
||
|
}
|
||
|
}
|