正在查看: Mabilis Cash v1.19.4 应用的 ActionFlashLivenessActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Mabilis Cash v1.19.4 应用的 ActionFlashLivenessActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.face.csg.lv5.sdk.detect.actionflash;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.ColorStateList;
import android.content.res.Resources;
import android.graphics.Color;
import android.graphics.SurfaceTexture;
import android.graphics.drawable.AnimationDrawable;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.view.accessibility.AccessibilityManager;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextSwitcher;
import android.widget.TextView;
import android.widget.ViewSwitcher;
import androidx.constraintlayout.core.motion.utils.TypedValues;
import androidx.core.graphics.drawable.DrawableCompat;
import androidx.core.view.PointerIconCompat;
import com.face.csg.lv5.sdk.R;
import com.face.csg.lv5.sdk.base.DetectBaseActivity;
import com.face.csg.lv5.sdk.view.CameraGLSurfaceView;
import com.face.csg.lv5.sdk.view.HorizontalMarqueeView;
import com.face.csg.lv5.sdk.view.HorizontalStepView;
import com.face.csg.lv5.sdk.view.LoadingCoverView;
import com.face.csg.lv5.sdk.view.RadarView;
import com.megvii.lv5.a0;
import com.megvii.lv5.a5;
import com.megvii.lv5.b5;
import com.megvii.lv5.c;
import com.megvii.lv5.c0;
import com.megvii.lv5.e3;
import com.megvii.lv5.e4;
import com.megvii.lv5.f1;
import com.megvii.lv5.h4;
import com.megvii.lv5.i4;
import com.megvii.lv5.j;
import com.megvii.lv5.j3;
import com.megvii.lv5.k3;
import com.megvii.lv5.k4;
import com.megvii.lv5.l0;
import com.megvii.lv5.l3;
import com.megvii.lv5.l5;
import com.megvii.lv5.m4;
import com.megvii.lv5.m5;
import com.megvii.lv5.n4;
import com.megvii.lv5.q4;
import com.megvii.lv5.t4;
import com.megvii.lv5.u4;
import com.megvii.lv5.v;
import com.megvii.lv5.w2;
import com.megvii.lv5.w4;
import com.megvii.lv5.y4;
import com.sensorsdata.analytics.android.autotrack.aop.SensorsDataAutoTrackHelper;
import com.sensorsdata.analytics.android.sdk.SensorsDataInstrumented;
import java.lang.ref.WeakReference;
import java.util.HashMap;
public class ActionFlashLivenessActivity extends DetectBaseActivity implements View.OnClickListener, l5, l3.c, e3, k3, m5 {
public static final int S0 = 0;
public View.OnClickListener F0;
public Animation G0;
public Animation H0;
public int I0;
public int J0;
public String O;
public int O0;
public HashMap<String, byte[]> P0;
public String R0;
public int T;
public int U;
public SurfaceTexture V;
public LoadingCoverView Y;
public i4 a0;
public t4 b0;
public CameraGLSurfaceView d0;
public ImageView e0;
public ImageView f0;
public RadarView g0;
public ImageView h0;
public ImageView i0;
public ImageView j0;
public TextView k0;
public ImageView l0;
public HorizontalMarqueeView m0;
public ViewGroup n0;
public LinearLayout o0;
public ImageView p0;
public TextView q0;
public TextView r0;
public TextView s0;
public TextView t0;
public TextView u0;
public HorizontalStepView v0;
public TextSwitcher w0;
public l0 x0;
public int[] z0;
public int P = 1;
public String Q = "";
public boolean R = false;
public volatile boolean S = false;
public int W = 0;
public int X = 0;
public AnimationDrawable Z = null;
public n4 c0 = null;
public boolean y0 = false;
public boolean A0 = false;
public boolean B0 = true;
public boolean C0 = false;
public boolean D0 = false;
public boolean E0 = false;
public volatile boolean K0 = false;
public int L0 = 0;
public volatile g M0 = g.INITIAL;
public Handler N0 = new a(Looper.getMainLooper());
public boolean Q0 = false;
public class a extends Handler {
public class RunnableC0033a implements Runnable {
public RunnableC0033a() {
}
@Override
public void run() {
ActionFlashLivenessActivity.this.s0.setVisibility(0);
}
}
public a(Looper looper) {
super(looper);
}
@Override
@android.annotation.SuppressLint({"HandlerLeak"})
public void handleMessage(android.os.Message r22) {
throw new UnsupportedOperationException("Method not decompiled: com.face.csg.lv5.sdk.detect.actionflash.ActionFlashLivenessActivity.a.handleMessage(android.os.Message):void");
}
}
public class b implements ViewSwitcher.ViewFactory {
public b() {
}
@Override
public View makeView() {
TextView textView = new TextView(ActionFlashLivenessActivity.this);
Resources resources = ActionFlashLivenessActivity.this.getResources();
ActionFlashLivenessActivity actionFlashLivenessActivity = ActionFlashLivenessActivity.this;
int i2 = ActionFlashLivenessActivity.S0;
textView.setTextSize(0, resources.getDimension(actionFlashLivenessActivity.f1911m));
textView.setTextColor(ActionFlashLivenessActivity.this.getResources().getColor(ActionFlashLivenessActivity.this.f1905g));
textView.setGravity(17);
if (com.megvii.lv5.b.b) {
textView.setMaxLines(3);
textView.setEllipsize(TextUtils.TruncateAt.END);
textView.setLineSpacing(8, 1.0f);
}
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(-2, -2);
layoutParams.gravity = 1;
textView.setLayoutParams(layoutParams);
return textView;
}
}
public class c implements ViewTreeObserver.OnGlobalLayoutListener {
public c() {
}
@Override
public void onGlobalLayout() {
ActionFlashLivenessActivity actionFlashLivenessActivity;
int min;
ActionFlashLivenessActivity.this.d0.getViewTreeObserver().removeOnGlobalLayoutListener(this);
if (!m4.f(ActionFlashLivenessActivity.this.K).I2) {
ActionFlashLivenessActivity actionFlashLivenessActivity2 = ActionFlashLivenessActivity.this;
if (actionFlashLivenessActivity2.L != w4.c) {
actionFlashLivenessActivity2.J0 = Math.min(actionFlashLivenessActivity2.d0.getMeasuredWidth(), ActionFlashLivenessActivity.this.d0.getMeasuredHeight());
actionFlashLivenessActivity = ActionFlashLivenessActivity.this;
min = Math.max(actionFlashLivenessActivity.d0.getMeasuredWidth(), ActionFlashLivenessActivity.this.d0.getMeasuredHeight());
actionFlashLivenessActivity.I0 = min;
ActionFlashLivenessActivity actionFlashLivenessActivity3 = ActionFlashLivenessActivity.this;
int i2 = actionFlashLivenessActivity3.J0;
int i3 = actionFlashLivenessActivity3.I0;
actionFlashLivenessActivity3.Y.setForegroundColor(actionFlashLivenessActivity3.getResources().getColor(ActionFlashLivenessActivity.this.f1910l));
}
}
ActionFlashLivenessActivity actionFlashLivenessActivity4 = ActionFlashLivenessActivity.this;
actionFlashLivenessActivity4.J0 = Math.max(actionFlashLivenessActivity4.d0.getMeasuredWidth(), ActionFlashLivenessActivity.this.d0.getMeasuredHeight());
actionFlashLivenessActivity = ActionFlashLivenessActivity.this;
min = Math.min(actionFlashLivenessActivity.d0.getMeasuredWidth(), ActionFlashLivenessActivity.this.d0.getMeasuredHeight());
actionFlashLivenessActivity.I0 = min;
ActionFlashLivenessActivity actionFlashLivenessActivity32 = ActionFlashLivenessActivity.this;
int i22 = actionFlashLivenessActivity32.J0;
int i32 = actionFlashLivenessActivity32.I0;
actionFlashLivenessActivity32.Y.setForegroundColor(actionFlashLivenessActivity32.getResources().getColor(ActionFlashLivenessActivity.this.f1910l));
}
}
public class e implements Runnable {
public e() {
}
@Override
public void run() {
ActionFlashLivenessActivity.this.D0 = true;
}
}
public class f implements DialogInterface.OnClickListener {
public f() {
}
@Override
@SensorsDataInstrumented
public void onClick(DialogInterface dialogInterface, int i2) {
ActionFlashLivenessActivity.this.G = false;
dialogInterface.dismiss();
ActionFlashLivenessActivity actionFlashLivenessActivity = ActionFlashLivenessActivity.this;
actionFlashLivenessActivity.a(q4.J, actionFlashLivenessActivity.O);
SensorsDataAutoTrackHelper.trackDialog(dialogInterface, i2);
}
}
public enum g {
INITIAL,
FIRST_ATTEMPT,
RETRY
}
public static class h implements View.OnClickListener {
public WeakReference<ActionFlashLivenessActivity> f1940a;
public h(ActionFlashLivenessActivity actionFlashLivenessActivity) {
this.f1940a = new WeakReference<>(actionFlashLivenessActivity);
}
@Override
@SensorsDataInstrumented
public void onClick(View view) {
ActionFlashLivenessActivity actionFlashLivenessActivity = this.f1940a.get();
if (actionFlashLivenessActivity != null) {
if (actionFlashLivenessActivity.isFinishing()) {
SensorsDataAutoTrackHelper.trackViewOnClick(view);
return;
}
if (view.getId() == R.id.ll_detect_close) {
int i2 = ActionFlashLivenessActivity.S0;
actionFlashLivenessActivity.g();
} else if (view.getId() == R.id.tv_face_dialog_left) {
AlertDialog alertDialog = actionFlashLivenessActivity.f1899a;
if (alertDialog != null) {
alertDialog.dismiss();
}
com.megvii.lv5.c.a = actionFlashLivenessActivity.Q;
b5.a(c.a.a.a("click_cancel_quit", actionFlashLivenessActivity.O, actionFlashLivenessActivity.P));
actionFlashLivenessActivity.M0 = g.INITIAL;
i4 i4Var = actionFlashLivenessActivity.a0;
((Activity) i4Var.b).runOnUiThread(new k4(i4Var));
actionFlashLivenessActivity.W++;
actionFlashLivenessActivity.z0 = actionFlashLivenessActivity.x0.w2;
actionFlashLivenessActivity.k();
com.megvii.lv5.d.a(actionFlashLivenessActivity.z0, false);
j3.a.a.a(actionFlashLivenessActivity.V);
com.megvii.lv5.d.b(actionFlashLivenessActivity);
} else if (view.getId() == R.id.tv_face_dialog_right) {
actionFlashLivenessActivity.b();
}
}
SensorsDataAutoTrackHelper.trackViewOnClick(view);
}
}
public void a() {
}
public void b(int i2) {
this.U = this.T;
this.T = i2;
if (i2 == 16 || i2 == 17) {
this.S = true;
}
Bundle bundle = new Bundle();
bundle.putInt("curStep", i2);
a(115, bundle);
}
@Override
public int c() {
return R.layout.activity_action_flash_liveness_ex;
}
@Override
public void e() {
this.A0 = com.megvii.lv5.b.a;
boolean z = f1.v;
f1 f1Var = f1.j.a;
synchronized (f1Var) {
Thread.currentThread().getName();
f1Var.k = this;
}
this.O = m4.a(getApplicationContext());
this.x0 = m4.f(this);
this.y0 = k() != 1;
this.P = this.x0.a;
this.p0.setImageDrawable(getResources().getDrawable(this.f1917s));
AnimationDrawable animationDrawable = new AnimationDrawable();
this.Z = animationDrawable;
animationDrawable.addFrame(getResources().getDrawable(R.drawable.face_live5_audio_horns_0), 500);
this.Z.addFrame(getResources().getDrawable(R.drawable.face_live5_audio_horns_1), 500);
this.Z.addFrame(getResources().getDrawable(R.drawable.face_live5_audio_horns_2), 500);
this.Z.setOneShot(false);
if (k() > 1 && com.megvii.lv5.b.b) {
this.G0 = AnimationUtils.loadAnimation(this, R.anim.text_swicher_alpha_out);
this.H0 = AnimationUtils.loadAnimation(this, R.anim.text_swicher_alpha_in);
}
DrawableCompat.setTintList(this.Z, ColorStateList.valueOf(getResources().getColor(y4.a(this).a(getString(R.string.key_liveness_liveness_custom_prompt_color)))));
this.q0.setTextSize(0, getResources().getDimension(this.f1911m));
this.s0.setTextSize(0, getResources().getDimension(this.f1913o));
this.s0.setTextColor(-1);
this.t0.setTextSize(0, getResources().getDimension(this.f1914p));
this.t0.setTextColor(getResources().getColor(this.f1907i));
this.r0.setTextColor(getResources().getColor(this.f1905g));
this.j0.setImageDrawable(getResources().getDrawable(this.v));
this.l0.setColorFilter(Color.argb(255, 0, 255, 0));
if (this.w) {
this.i0.setImageDrawable(getResources().getDrawable(this.f1916r));
this.i0.setVisibility(0);
} else {
this.i0.setVisibility(8);
}
if (this.x0.s2 == 1) {
String string = getResources().getString(y4.a(this.K).d(getString(R.string.key_liveness_home_dynamic_prompt_mode_text)));
if (!this.A0 && TextUtils.isEmpty(string)) {
string = this.x0.t2;
}
if (!TextUtils.isEmpty(string)) {
this.k0.setVisibility(0);
this.k0.setText(string);
if (this.f1908j != 0) {
this.k0.setBackgroundColor(getResources().getColor(this.f1908j));
}
if (this.f1909k != 0) {
this.k0.setTextColor(getResources().getColor(this.f1909k));
}
this.k0.post(new v(this));
}
}
this.L0 = this.x0.E2;
if (!u4.a(this)) {
this.L0 = 0;
}
this.R = m4.f(this).g2;
boolean c2 = com.megvii.lv5.d.c(this);
this.C0 = c2;
if (this.x0.K2 || c2) {
this.b0 = null;
} else if (this.x) {
e(this.y);
}
if (!this.C) {
this.c0 = new n4(this.r0, this.x0.d * 1000, 1000L, new d(this));
}
if (com.megvii.lv5.b.b) {
u4.a(this.t0, 3, 8);
u4.a(this.q0, 3, 8);
u4.a(this.s0, 2, 8);
u4.a(this.r0, 1, 8);
}
if (this.C0) {
this.o0.setContentDescription(getResources().getString(y4.a(this.K).d(getString(R.string.key_liveness_home_close_button_text))));
this.N0.postDelayed(new e(), 3500L);
}
com.megvii.lv5.c.a = "liveness-sdk";
b5.a(c.a.a.a("enter_page_success", this.O, this.P));
}
@Override
public void f() {
CameraGLSurfaceView cameraGLSurfaceView = (CameraGLSurfaceView) findViewById(R.id.liveness_layout_cameraView);
this.d0 = cameraGLSurfaceView;
cameraGLSurfaceView.setVisibility(0);
this.d0.a(this, this);
this.g0 = (RadarView) findViewById(R.id.radar_view);
this.e0 = (ImageView) findViewById(R.id.liveness_img_color_frame);
this.f0 = (ImageView) findViewById(R.id.liveness_img_color_line);
LoadingCoverView loadingCoverView = (LoadingCoverView) findViewById(R.id.liveness_layout_lcv);
this.Y = loadingCoverView;
ImageView imageView = this.e0;
ImageView imageView2 = this.f0;
loadingCoverView.d0 = imageView;
loadingCoverView.e0 = imageView2;
loadingCoverView.setmProgressCallback(this);
this.Y.setStatusBarColorCallback(this);
this.F0 = new h(this);
this.k0 = (TextView) findViewById(R.id.tv_liveness_top_tips);
this.l0 = (ImageView) findViewById(R.id.img_audio);
this.m0 = (HorizontalMarqueeView) findViewById(R.id.marquee_tips);
this.n0 = (ViewGroup) findViewById(R.id.ll_custom_marquee);
this.q0 = (TextView) findViewById(R.id.tv_flash_tips);
this.r0 = (TextView) findViewById(R.id.tv_countdown_tips);
this.s0 = (TextView) findViewById(R.id.tv_finish_tips);
this.t0 = (TextView) findViewById(R.id.tv_vertical_tips);
this.i0 = (ImageView) findViewById(R.id.iv_face_powerby);
this.j0 = (ImageView) findViewById(R.id.img_green_success);
this.h0 = (ImageView) findViewById(R.id.iv_liveness_homepage_close);
LinearLayout linearLayout = (LinearLayout) findViewById(R.id.ll_detect_close);
this.o0 = linearLayout;
linearLayout.setOnClickListener(this.F0);
this.p0 = (ImageView) findViewById(R.id.iv_bg_vertical);
this.a0 = new i4(this, this.l0);
this.b0 = new t4(this);
TextView textView = (TextView) findViewById(R.id.tv_action_failed_tips);
this.u0 = textView;
if (com.megvii.lv5.b.b) {
textView.setMaxWidth(a5.a(this, 281.0f));
}
this.v0 = (HorizontalStepView) findViewById(R.id.step_view);
TextSwitcher textSwitcher = (TextSwitcher) findViewById(R.id.tv_action_tips);
this.w0 = textSwitcher;
textSwitcher.setFactory(new b());
this.d0.getViewTreeObserver().addOnGlobalLayoutListener(new c());
}
@Override
public void h() {
if (this.S || !this.x0.o2) {
return;
}
AlertDialog alertDialog = this.f1899a;
if (alertDialog == null || !alertDialog.isShowing()) {
a(this.q0);
this.f1899a = this.f1900b.a(!this.x0.I2, this.F0);
com.megvii.lv5.c.a = this.Q;
b5.a(c.a.a.a("click_quit_icon", this.O, this.P));
j();
}
}
public final void i() {
try {
if (this.Q0) {
return;
}
boolean z = f1.v;
f1 f1Var = f1.j.a;
synchronized (f1Var) {
Thread.currentThread().getName();
f1Var.k = null;
}
this.d0.onPause();
n4 n4Var = this.c0;
if (n4Var != null) {
n4Var.cancel();
}
Handler handler = this.N0;
if (handler != null) {
handler.removeCallbacksAndMessages(null);
}
AlertDialog alertDialog = this.f1899a;
if (alertDialog != null) {
alertDialog.dismiss();
}
t4 t4Var = this.b0;
if (t4Var != null) {
t4Var.a();
}
e4.b.a.a(this);
this.Q0 = true;
} catch (Throwable unused) {
}
}
public final void j() {
this.N0.removeCallbacksAndMessages(null);
boolean z = f1.v;
f1 f1Var = f1.j.a;
c0 c0Var = f1Var.m;
c0Var.getClass();
try {
j jVar = ((a0) c0Var).a;
if (jVar != null) {
jVar.a.n();
}
} catch (Throwable th) {
th.printStackTrace();
}
f1Var.m.J();
n4 n4Var = this.c0;
if (n4Var != null) {
n4Var.cancel();
}
i4 i4Var = this.a0;
((Activity) i4Var.b).runOnUiThread(new h4(i4Var));
t4 t4Var = this.b0;
if (t4Var != null) {
t4Var.b();
this.b0.b(-1, (String) null);
}
}
public final int k() {
if (this.A0) {
return this.x0.b;
}
return 1;
}
public final void l() {
try {
j();
if (!isFinishing() && !this.S) {
com.megvii.lv5.c.d = true;
q4 q4Var = q4.z;
a(q4Var, this.O);
a(PointerIconCompat.TYPE_TOP_LEFT_DIAGONAL_DOUBLE_ARROW, q4Var.b, this.O, (byte[]) null, (HashMap<String, byte[]>) null);
}
if (isFinishing()) {
i();
}
} catch (Exception e2) {
e2.printStackTrace();
}
}
public final void m() {
this.o0.setVisibility(8);
}
@Override
public void onActivityResult(int i2, int i3, Intent intent) {
super.onActivityResult(i2, i3, intent);
if (i2 == 10086 && i3 == -1) {
com.megvii.lv5.c.a = "liveness-sdk";
b5.a(c.a.a.a("scrn_user_click_yes", this.O, this.P));
this.G = false;
e4.b.a.a(i2, i3, intent, true);
j3.a.a.a(this.V);
} else {
com.megvii.lv5.c.a = "liveness-sdk";
b5.a(c.a.a.a("scrn_user_click_no", this.O, this.P));
if (this.L0 == 1) {
String string = getResources().getString(this.D);
new AlertDialog.Builder(this).setCancelable(false).setMessage(string).setPositiveButton(getResources().getString(this.E), new f()).create().show();
} else {
getWindow().addFlags(8192);
this.G = false;
j3.a.a.a(this.V);
}
}
com.megvii.lv5.c.a = "liveness-sdk";
b5.a(c.a.a.a("scrn_pass_permissions_detect", this.O, this.P));
}
@Override
@SensorsDataInstrumented
public void onClick(View view) {
isFinishing();
SensorsDataAutoTrackHelper.trackViewOnClick(view);
}
@Override
public void onDestroy() {
super.onDestroy();
i();
}
@Override
public void onPause() {
super.onPause();
if (this.G || this.x0.Q2) {
return;
}
l();
}
@Override
public void onResume() {
super.onResume();
}
@Override
public void onStop() {
super.onStop();
if (this.x0.Q2) {
l();
}
}
public void a(float f2) {
Bundle bundle = new Bundle();
bundle.putFloat("progress", f2);
a(117, bundle);
}
public void b(int i2, int i3) {
Bundle bundle = new Bundle();
bundle.putInt("actionIndex", i2);
bundle.putInt("currentAction", i3);
a(114, bundle);
}
public void c(int i2) {
this.N.setBackgroundColor(i2);
com.megvii.lv5.d.a(this, i2);
}
public void a(int i2) {
Bundle bundle = new Bundle();
bundle.putInt("qualityResult", i2);
if (!this.C0 || this.D0) {
a(102, bundle);
}
}
public static void b(ActionFlashLivenessActivity actionFlashLivenessActivity) {
l0 l0Var = actionFlashLivenessActivity.x0;
if (l0Var.o2 && l0Var.g2) {
actionFlashLivenessActivity.h0.setImageDrawable(actionFlashLivenessActivity.getResources().getDrawable(actionFlashLivenessActivity.u));
}
if (actionFlashLivenessActivity.x0.o2) {
return;
}
actionFlashLivenessActivity.m();
}
public static void c(ActionFlashLivenessActivity actionFlashLivenessActivity) {
String str;
if (!actionFlashLivenessActivity.y0 || actionFlashLivenessActivity.b0 == null) {
return;
}
if (TextUtils.isEmpty(actionFlashLivenessActivity.B)) {
str = null;
} else {
str = actionFlashLivenessActivity.B + "/" + actionFlashLivenessActivity.getResources().getString(R.string.key_facelive_well_done_m4a) + ".m4a";
}
actionFlashLivenessActivity.b0.a(y4.a(actionFlashLivenessActivity).c(actionFlashLivenessActivity.getResources().getString(R.string.key_facelive_well_done_m4a)), str);
actionFlashLivenessActivity.b0.b(-1, (String) null);
}
public void a(int i2, int i3) {
Bundle bundle = new Bundle();
bundle.putInt("result_type", i2);
bundle.putInt("action_index", i3);
a(116, bundle);
}
public final void a(int i2, Bundle bundle) {
Message message = new Message();
message.what = i2;
message.setData(bundle);
this.N0.sendMessage(message);
}
public void a(int i2, String str, w2 w2Var, byte[] bArr, byte[] bArr2) {
Bundle bundle = new Bundle();
bundle.putString("bizToken", this.O);
bundle.putInt("errorcode", i2);
bundle.putString("errormessage", str);
bundle.putByteArray("delta", bArr);
bundle.putSerializable("imagedata", this.P0);
this.I = m4.a(w2Var);
a(104, bundle);
}
public final void a(int i2, String str, String str2, byte[] bArr, HashMap<String, byte[]> hashMap) {
if (isFinishing()) {
return;
}
this.f1901c.a(i2, str, str2, this.I, bArr, hashMap);
finish();
}
public final void a(View view) {
if (this.C0) {
((AccessibilityManager) view.getContext().getSystemService("accessibility")).interrupt();
}
}
public final void a(TextView textView, String str, int i2) {
if (TextUtils.isEmpty(str)) {
str = "";
} else {
a(textView, str);
}
textView.setText(str);
textView.setTextColor(i2);
}
public void a(String str) {
Bundle bundle = new Bundle();
bundle.putString(TypedValues.Custom.S_COLOR, str);
a(118, bundle);
}
@Override
public void b() {
AlertDialog alertDialog = this.f1899a;
if (alertDialog != null) {
alertDialog.dismiss();
}
com.megvii.lv5.c.a = this.Q;
b5.a(c.a.a.a("click_confirm_quit", this.O, this.P));
a(q4.y, this.O);
}
public void a(Throwable th) {
a(1005, String.format("{%s}", m4.a(th)), this.O, "".getBytes(), (HashMap<String, byte[]>) null);
}
public void a(HashMap<String, byte[]> hashMap) {
this.P0 = hashMap;
}
public void a(byte[] bArr, int i2, int i3) {
this.d0.a(bArr, i2, i3);
}
public static void a(ActionFlashLivenessActivity actionFlashLivenessActivity) {
if (!actionFlashLivenessActivity.x0.o2) {
actionFlashLivenessActivity.m();
} else {
actionFlashLivenessActivity.h0.setImageDrawable(actionFlashLivenessActivity.getResources().getDrawable(actionFlashLivenessActivity.t));
actionFlashLivenessActivity.o0.setVisibility(0);
}
}
public static void a(ActionFlashLivenessActivity actionFlashLivenessActivity, int i2) {
TextView textView;
Resources resources;
int i3;
String c2 = actionFlashLivenessActivity.c(i2, actionFlashLivenessActivity.T);
actionFlashLivenessActivity.R0 = c2;
if (actionFlashLivenessActivity.T == 4) {
if (i2 == 14) {
textView = actionFlashLivenessActivity.q0;
} else if (actionFlashLivenessActivity.M0 == g.FIRST_ATTEMPT) {
textView = actionFlashLivenessActivity.q0;
c2 = actionFlashLivenessActivity.R0;
} else {
textView = actionFlashLivenessActivity.q0;
c2 = actionFlashLivenessActivity.R0;
resources = actionFlashLivenessActivity.getResources();
i3 = actionFlashLivenessActivity.f1906h;
}
resources = actionFlashLivenessActivity.getResources();
i3 = actionFlashLivenessActivity.f1905g;
} else if (i2 == 14) {
textView = actionFlashLivenessActivity.q0;
c2 = actionFlashLivenessActivity.getResources().getString(y4.a(actionFlashLivenessActivity.K).d(actionFlashLivenessActivity.getString(R.string.key_liveness_home_buffer_holding_text)));
resources = actionFlashLivenessActivity.getResources();
i3 = actionFlashLivenessActivity.f1905g;
} else {
textView = actionFlashLivenessActivity.q0;
resources = actionFlashLivenessActivity.getResources();
i3 = actionFlashLivenessActivity.f1906h;
}
actionFlashLivenessActivity.a(textView, c2, resources.getColor(i3));
}
public class d implements n4.a {
public d(ActionFlashLivenessActivity actionFlashLivenessActivity) {
}
public void a() {
}
}
public static void a(com.face.csg.lv5.sdk.detect.actionflash.ActionFlashLivenessActivity r11, int r12, int r13) {
throw new UnsupportedOperationException("Method not decompiled: com.face.csg.lv5.sdk.detect.actionflash.ActionFlashLivenessActivity.a(com.face.csg.lv5.sdk.detect.actionflash.ActionFlashLivenessActivity, int, int):void");
}
@Override
public void a(q4 q4Var, String str) {
String str2 = (q4Var == q4.B || q4Var == q4.O) ? "camera_fail" : q4Var == q4.z ? "go_to_background" : q4Var == q4.y ? "user_cancel" : q4Var == q4.J ? "scrn_authorized_fail" : "";
com.megvii.lv5.c.a = this.Q;
b5.a(c.a.a.a("fail_detect:" + str2, this.O, this.P));
j3.a.a.a(m4.a(q4Var));
}
public void a(SurfaceTexture surfaceTexture) {
boolean z;
this.V = surfaceTexture;
Bundle bundle = new Bundle();
Message message = new Message();
message.what = 100;
message.setData(bundle);
this.N0.sendMessageDelayed(message, 200L);
int i2 = this.L0;
if (i2 == 0) {
if (this.K0) {
j3.a.a.a(this.V);
return;
}
return;
}
if (i2 == 0) {
return;
}
if (i2 == 1 && !com.megvii.lv5.d.a(this)) {
a(q4.M, this.O);
return;
}
e4 e4Var = e4.b.a;
if (e4Var.d != null || ((z = this.E0) && !this.G)) {
e4Var.a(this);
j3.a.a.a(this.V);
} else {
if (z) {
return;
}
com.megvii.lv5.c.a = "liveness-sdk";
b5.a(c.a.a.a("scrn_enter_permissions_detect", this.O, this.P));
this.E0 = true;
this.G = true;
e4Var.a(this);
}
}
public final void a(View view, String str) {
if (!this.C0 || TextUtils.isEmpty(str.trim())) {
return;
}
view.announceForAccessibility(str);
if (this.B0) {
this.B0 = false;
if (this.C0) {
view.requestFocus();
view.sendAccessibilityEvent(8);
}
}
}
}