正在查看: CashVia v1.6.02 应用的 LivenessActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: CashVia v1.6.02 应用的 LivenessActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package aai.liveness.activity;
import E0.g;
import Q2.h;
import a3d20241011.AbstractC0035k;
import a3d20241011.AbstractC0036l;
import a3d20241011.C0027c;
import a3d20241011.K;
import a3d20241011.M;
import a3d20241011.o0oOOOOOooooo;
import aai.liveness.LivenessView;
import ai.advance.core.PermissionActivity;
import android.app.ProgressDialog;
import android.graphics.drawable.AnimationDrawable;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.os.Bundle;
import android.os.Handler;
import android.util.SparseArray;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.appcompat.app.AlertDialog;
import androidx.core.app.ActivityCompat;
import b.EnumC0045b;
import b.d;
import c.ViewOnClickListenerC0047a;
import c.b;
import c.c;
import d.InterfaceC0196a;
import java.util.ArrayList;
import java.util.Iterator;
public class LivenessActivity extends PermissionActivity implements InterfaceC0196a {
public static final int u = 0;
public SparseArray f1345a;
public LivenessView f1346b;
public ImageView f1347c;
public TextView f1348d;
public TextView f1349e;
public CheckBox f1350f;
public View f1351g;
public ProgressDialog f1352i;
public View f1353t;
@Override
public final void a() {
ProgressDialog progressDialog = this.f1352i;
if (progressDialog != null) {
progressDialog.dismiss();
}
ProgressDialog progressDialog2 = new ProgressDialog(this);
this.f1352i = progressDialog2;
progressDialog2.setMessage(getString(2131820784));
this.f1352i.setCanceledOnTouchOutside(false);
this.f1352i.show();
}
@Override
public final void c(EnumC0045b enumC0045b) {
String string;
int f2 = M.f(1);
if (f2 == 1) {
r(2131820827);
return;
}
if (f2 == 2) {
r(2131820825);
return;
}
int f3 = M.f(1);
if (f3 != 0) {
string = null;
if (f3 == 3) {
int ordinal = enumC0045b.ordinal();
if (ordinal == 1 || ordinal == 2) {
string = getString(2131820799);
} else if (ordinal == 3) {
string = getString(2131820800);
}
} else if (f3 == 4) {
string = getString(2131820802);
} else if (f3 == 5) {
string = getString(2131820801);
}
} else {
string = getString(2131820803);
}
AbstractC0036l.h(string);
setResult(-1);
finish();
}
@Override
public final void e() {
LivenessView livenessView = this.f1346b;
g gVar = new g(this, 7);
livenessView.getClass();
C0027c c0027c = new C0027c(gVar, 5);
o0oOOOOOooooo o0ooooooooooo = livenessView.f1249a;
if (o0ooooooooooo.A()) {
c0027c.h();
new Thread(new K(o0ooooooooooo, c0027c, 0)).start();
}
}
@Override
public final void h(long j2) {
int i2 = (int) (j2 / 1000);
this.f1349e.setText(i2 + "s");
}
@Override
public final void i(d dVar) {
u(dVar);
}
@Override
public final void k(String str, String str2, boolean z2) {
ProgressDialog progressDialog = this.f1352i;
if (progressDialog != null) {
progressDialog.dismiss();
}
if (z2) {
u(null);
return;
}
if ("NO_RESPONSE".equals(str)) {
str2 = getString(2131820797);
}
new AlertDialog.Builder(this).setMessage(str2).setPositiveButton(2131820816, new c(this, str2)).create().show();
}
@Override
public final void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(2131492898);
Window window = getWindow();
WindowManager.LayoutParams attributes = window.getAttributes();
attributes.screenBrightness = 255 / 255.0f;
window.setAttributes(attributes);
this.f1346b = (LivenessView) findViewById(2131296594);
this.f1347c = (ImageView) findViewById(2131297000);
this.f1348d = (TextView) findViewById(2131297001);
this.f1349e = (TextView) findViewById(2131296999);
this.f1351g = findViewById(2131296809);
this.f1350f = (CheckBox) findViewById(2131297187);
View findViewById = findViewById(2131296353);
this.f1353t = findViewById(2131296991);
findViewById.setOnClickListener(new ViewOnClickListenerC0047a(this, 0));
this.f1350f.setChecked(this.f1346b.f1249a.f1358E);
this.f1350f.setOnCheckedChangeListener(new b(this));
this.f1345a = new SparseArray();
this.f1346b.setLivenssCallback(this);
if (!AbstractC0035k.f1232b || o() || o()) {
return;
}
ActivityCompat.requestPermissions(this, p(), 1991);
}
@Override
public final void onDestroy() {
SensorManager sensorManager;
LivenessView livenessView = this.f1346b;
o0oOOOOOooooo o0ooooooooooo = livenessView.f1249a;
synchronized (o0ooooooooooo) {
try {
o0ooooooooooo.f1260O = null;
o0ooooooooooo.G();
o0ooooooooooo.B();
Handler handler = o0ooooooooooo.f1261P;
if (handler != null) {
handler.removeCallbacksAndMessages(null);
o0ooooooooooo.f1261P = null;
}
ArrayList arrayList = o0ooooooooooo.H;
if (arrayList != null && !arrayList.isEmpty()) {
Iterator it = o0ooooooooooo.H.iterator();
while (it.hasNext()) {
SensorEventListener sensorEventListener = (h) it.next();
sensorEventListener.getClass();
try {
if (((h) sensorEventListener).c != null && (sensorManager = ((h) sensorEventListener).b) != null) {
sensorManager.unregisterListener(sensorEventListener);
}
} catch (Exception unused) {
}
((h) sensorEventListener).f = new StringBuilder();
((h) sensorEventListener).g = null;
}
}
ArrayList arrayList2 = o0ooooooooooo.f1262Q;
if (arrayList2 != null) {
arrayList2.clear();
}
} catch (Throwable th) {
throw th;
}
}
livenessView.a("destroy");
this.f1345a.clear();
super.onDestroy();
}
@Override
public final void onPause() {
ProgressDialog progressDialog = this.f1352i;
if (progressDialog != null) {
progressDialog.dismiss();
}
this.f1346b.b();
super.onPause();
}
@Override
public final void onResume() {
int i2 = 0;
this.f1346b.setVisibility(0);
this.f1348d.setVisibility(0);
this.f1347c.setVisibility(0);
this.f1349e.setText("");
this.f1349e.setBackgroundResource(0);
this.f1349e.setVisibility(0);
this.f1350f.setVisibility(4);
this.f1347c.setImageDrawable(null);
this.f1351g.setVisibility(4);
this.f1353t.setVisibility(4);
if (o()) {
o0oOOOOOooooo o0ooooooooooo = this.f1346b.f1249a;
o0ooooooooooo.f1255J = false;
ArrayList arrayList = o0ooooooooooo.f1262Q;
if (arrayList == null) {
InterfaceC0196a interfaceC0196a = o0ooooooooooo.f1260O;
synchronized (o0ooooooooooo) {
try {
ArrayList arrayList2 = AbstractC0035k.f1234d;
if (arrayList2 == null || arrayList2.isEmpty()) {
o0ooooooooooo.D(interfaceC0196a, EnumC0045b.BLINK, EnumC0045b.POS_YAW);
} else {
EnumC0045b[] enumC0045bArr = new EnumC0045b[arrayList2.size()];
while (true) {
ArrayList arrayList3 = AbstractC0035k.f1234d;
if (i2 >= arrayList3.size()) {
break;
}
enumC0045bArr[i2] = (EnumC0045b) arrayList3.get(i2);
i2++;
}
o0ooooooooooo.D(interfaceC0196a, enumC0045bArr);
}
} catch (Throwable th) {
throw th;
}
}
} else {
EnumC0045b[] enumC0045bArr2 = new EnumC0045b[arrayList.size()];
o0ooooooooooo.f1262Q.toArray(enumC0045bArr2);
o0ooooooooooo.D(o0ooooooooooo.f1260O, enumC0045bArr2);
}
o0ooooooooooo.y();
}
super.onResume();
}
@Override
public final String[] p() {
return new String[]{"android.permission.CAMERA"};
}
@Override
public final void q() {
new AlertDialog.Builder(this).setMessage(getString(2131820811)).setPositiveButton(getString(2131820816), new c.d(this)).create().show();
}
public final void r(int i2) {
this.f1348d.setText(i2);
}
public final void s() {
throw new UnsupportedOperationException("Method not decompiled: aai.liveness.activity.LivenessActivity.s():void");
}
public final void t() {
EnumC0045b currentDetectionType = this.f1346b.getCurrentDetectionType();
if (currentDetectionType != null) {
int ordinal = currentDetectionType.ordinal();
r(ordinal != 1 ? ordinal != 2 ? ordinal != 3 ? 0 : 2131820817 : 2131820808 : 2131820785);
int ordinal2 = currentDetectionType.ordinal();
int i2 = ordinal2 != 1 ? ordinal2 != 2 ? ordinal2 != 3 ? -1 : 2131230845 : 2131230844 : 2131230843;
AnimationDrawable animationDrawable = (AnimationDrawable) this.f1345a.get(i2);
if (animationDrawable == null) {
animationDrawable = (AnimationDrawable) getResources().getDrawable(i2);
this.f1345a.put(i2, animationDrawable);
}
this.f1347c.setImageDrawable(animationDrawable);
animationDrawable.start();
}
}
public final void u(d dVar) {
this.f1346b.f1249a.getClass();
if (dVar != null) {
int ordinal = dVar.ordinal();
if (ordinal == 0) {
r(2131820812);
return;
}
if (ordinal == 1) {
r(2131820822);
return;
}
if (ordinal == 2) {
r(2131820821);
return;
}
if (ordinal == 3) {
r(2131820809);
return;
}
if (ordinal == 4) {
r(2131820804);
return;
}
if (ordinal != 5) {
if (ordinal == 19) {
r(2131820806);
return;
}
if (ordinal == 28) {
r(2131820785);
return;
}
switch (ordinal) {
case 7:
r(2131820810);
break;
case 8:
r(2131820815);
break;
case 9:
r(2131820795);
break;
case 10:
break;
case 11:
t();
break;
default:
switch (ordinal) {
case 21:
case 22:
case 23:
case 24:
r(2131820790);
break;
case 25:
r(2131820827);
break;
case 26:
r(2131820825);
break;
}
}
return;
}
r(2131820819);
}
}
}