导航菜单

页面标题

页面副标题

CreditNow v1.0.2 - LivenessCaptureActivity.java 源代码

正在查看: CreditNow v1.0.2 应用的 LivenessCaptureActivity.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.regula.facesdk;

import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Bitmap;
import android.graphics.Matrix;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import androidx.lifecycle.Observer;
import com.regula.facesdk.LivenessCaptureActivity;
import com.regula.facesdk.api.r0;
import com.regula.facesdk.configuration.LivenessConfiguration;
import com.regula.facesdk.exception.LivenessErrorException;
import defpackage.a05;
import defpackage.a72;
import defpackage.ap;
import defpackage.b25;
import defpackage.b72;
import defpackage.c15;
import defpackage.c25;
import defpackage.c72;
import defpackage.d15;
import defpackage.e25;
import defpackage.f25;
import defpackage.gx;
import defpackage.hx;
import defpackage.hz4;
import defpackage.i05;
import defpackage.i91;
import defpackage.ju0;
import defpackage.ke3;
import defpackage.kl4;
import defpackage.km0;
import defpackage.lm0;
import defpackage.m71;
import defpackage.mf3;
import defpackage.mm0;
import defpackage.mq4;
import defpackage.p25;
import defpackage.pz4;
import defpackage.qz4;
import defpackage.r05;
import defpackage.s05;
import defpackage.v62;
import defpackage.w62;
import defpackage.y62;
import defpackage.z62;
import java.io.File;
import java.lang.ref.WeakReference;
import java.lang.reflect.InvocationTargetException;
import java.util.Arrays;
import java.util.Objects;
import java.util.concurrent.Executors;
import org.json.JSONException;
import org.json.JSONObject;

public final class LivenessCaptureActivity extends c implements SensorEventListener, hz4, d15 {
    public boolean S1;
    public boolean T1;
    public z62 U1;
    public ap V1;
    public f25 W1;
    public byte[] X1;
    public SensorManager Y1;
    public final float[] Z1 = new float[3];
    public final float[] a2 = new float[3];
    public final float[] b2 = new float[3];
    public boolean c2;
    public boolean d2;
    public r05 e2;

    public static void W1(y62 y62Var, z62 z62Var) {
        m71.o().b.b("NotifyClient " + y62Var);
        w62 a = new w62.a().b(y62Var, z62Var).a();
        m71.o().b.b("Notify client with notification: status=" + a.b());
    }

    public final void G1() {
        boolean contains = Arrays.asList(((LivenessConfiguration) this.I1).o()).contains(a72.a);
        SharedPreferences sharedPreferences = getSharedPreferences("FaceSDK", 0);
        if (!sharedPreferences.getBoolean("go_button_state", false)) {
            sharedPreferences.edit().putBoolean("go_button_state", true).apply();
        }
        final Observer observer = new Observer() {
            public final void onChanged(Object obj) {
                LivenessCaptureActivity.this.i2((kl4) obj);
            }
        };
        m71.o().q().a().observe(this, observer);
        this.P1.h.a().setVisibility(0);
        this.P1.h.a().setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                LivenessCaptureActivity.Y1(view);
            }
        });
        this.P1.h.f.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                LivenessCaptureActivity.this.Z1(observer, view);
            }
        });
        this.P1.h.l.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                LivenessCaptureActivity.this.j2(observer, view);
            }
        });
        if (contains) {
            this.P1.h.l.performClick();
        }
    }

    public final boolean H1() {
        boolean z = true;
        this.y1++;
        int k = ((LivenessConfiguration) this.I1).k();
        if (k > 0 && this.y1 > k) {
            z = false;
        }
        m71.o().b.b("Do user has ability to retry: " + z);
        return z;
    }

    public final void I1() {
        m71.o().h(this.U1);
    }

    public final void J1() {
        h2(this.U1);
    }

    @Override
    public final void K0(gx gxVar) {
        v62 v62Var = v62.v;
        if (gxVar == gx.a) {
            v62Var = v62.w;
        }
        z62 a = new qz4().b(new LivenessErrorException(v62Var)).a();
        this.U1 = a;
        m1();
        m71.o().h(a);
        finish();
    }

    public final void K1() {
        this.q1 = 0;
        R1();
        this.P1.l.setVisibility(0);
        this.P1.d.setVisibility(0);
        this.P1.i.setVisibility(4);
        r0 r0Var = this.P1;
        if (r0Var != null) {
            r0Var.g.invalidate();
        }
    }

    public final void L1() {
        if (!H1()) {
            h2(this.U1);
        } else {
            m71.o().b.b("Show result by timeout");
            f2(new int[]{R$string.livenessRetry_text_environment, R$string.livenessRetry_text_subject});
        }
    }

    @Override
    public final void M0(y62 y62Var) {
        W1(y62Var, this.U1);
    }

    public final void M1() {
        this.B1 = false;
        this.E1.f();
    }

    public final void N1() {
        if (!H1()) {
            h2(this.U1);
        } else {
            m71.o().b.b("Show result by application inactive");
            f2(new int[]{R$string.livenessRetry_text_environment, R$string.livenessRetry_text_subject});
        }
    }

    public final void O1() {
        if (!H1()) {
            h2(this.U1);
        } else {
            m71.o().b.b("Show result by application inactive");
            f2(new int[]{R$string.livenessRetry_text_environment, R$string.livenessRetry_text_subject});
        }
    }

    @Override
    public final void P0(mq4 mq4Var, String str, int i, String str2, boolean z) {
        super.P0(mq4Var, str, i, str2, mq4Var != this.p1);
    }

    public final void P1() {
        m71.o().b.b("Click on cancel button in liveness activity");
        n2();
        super.v();
    }

    @Override
    public final void Q0(mq4 mq4Var, String str, String str2, int i) {
        final File file = new File(str);
        if (file.exists()) {
            if (((LivenessConfiguration) this.I1).n() == ke3.b && (this.E1.b() || this.E1.H())) {
                Executors.newSingleThreadExecutor().execute(new Runnable() {
                    @Override
                    public final void run() {
                        LivenessCaptureActivity.this.b2(file);
                    }
                });
            } else {
                super.Q0(mq4Var, str, str2, i);
            }
        }
    }

    public final void Q1() {
        W1(y62.w, this.U1);
        m71.o().b.b("Restart liveness session");
        this.q1 = 0;
        this.v1.e2(true);
        this.P1.g.w();
        this.v1.S1();
        this.v1.i2(m71.o().b(getApplicationContext(), this.n1, R$string.faceLivenessCameraLayoutPreparingService));
        R1();
        this.P1.l.setVisibility(0);
        this.P1.d.setVisibility(0);
        this.P1.i.setVisibility(4);
        r0 r0Var = this.P1;
        if (r0Var != null) {
            r0Var.g.invalidate();
        }
    }

    public final void R1() {
        W1(y62.b, this.U1);
        this.E1.E(null);
        this.W1.e(getApplicationContext(), new i05(b1(), ((LivenessConfiguration) this.I1).q(), ju0.e(getApplicationContext()), ju0.b(getApplicationContext()), ((LivenessConfiguration) this.I1).l()));
    }

    public final void S1() {
        m71.o().b.b("Set up default values");
        this.r1 = ((LivenessConfiguration) this.I1).n() != ke3.c;
        this.E1.e();
        this.U1 = null;
        this.X1 = null;
    }

    public final void T1() {
        if (this.T1) {
            m71.o().b.b("Stop liveness by pause in background");
            this.P1.g.s();
            this.P1.b.e();
            g2(v62.i, new Runnable() {
                @Override
                public final void run() {
                    LivenessCaptureActivity.this.O1();
                }
            });
        }
    }

    public final void U1(int i) {
        this.P1.g.B();
        this.P1.b.f();
        m71.o().b.b("Target sectore changed from " + this.O1 + " to " + i);
        this.O1 = i;
        this.P1.g.setTargetSector(i);
        this.N1 = null;
        W1(y62.e, this.U1);
        p1();
    }

    public final void V1(v62 v62Var, Runnable runnable) {
        Bitmap[] bitmapArr;
        qz4 qz4Var = new qz4();
        String b1 = b1();
        String h1 = h1();
        LivenessErrorException livenessErrorException = new LivenessErrorException(v62Var);
        byte[] bArr = this.X1;
        if (bArr == null) {
            bitmapArr = null;
        } else {
            int e2 = this.t1.e2();
            int d2 = this.t1.d2();
            int W1 = this.t1.W1();
            Bitmap l = hx.l(bArr, e2, d2);
            Matrix matrix = new Matrix();
            matrix.postRotate(W1);
            bitmapArr = new Bitmap[]{Bitmap.createBitmap(l, 0, 0, l.getWidth(), l.getHeight(), matrix, true)};
        }
        this.U1 = qz4Var.d(b1, h1, livenessErrorException, bitmapArr).a();
        this.D1.post(runnable);
    }

    @Override
    public final void W0() {
        if (this.r1) {
            m71.o().b.b("Abort face detector module");
            this.E1.F();
        } else {
            l1();
        }
        this.q1 = 3;
        T1();
        F0();
    }

    public final void X1(z62 z62Var) {
        m1();
        m71.o().h(z62Var);
        finish();
    }

    @Override
    public final String Y0() {
        if (this.b2 == null) {
            return null;
        }
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("yaw", Math.toDegrees(r0[0]));
            jSONObject.put("pitch", -Math.toDegrees(r0[1]));
            jSONObject.put("roll", Math.toDegrees(r0[2]));
            return jSONObject.toString();
        } catch (JSONException e) {
            m71.o().b.e(e);
            return null;
        }
    }

    public final void Z1(Observer observer, View view) {
        m71.o().q().a().removeObserver(observer);
        v();
    }

    @Override
    public final int a1() {
        return ((LivenessConfiguration) this.I1).q() == c72.b ? 3 : 1;
    }

    public final void a2(r05 r05Var) {
        LivenessErrorException livenessErrorException = r05Var.d;
        if (livenessErrorException != null) {
            h2(new qz4().b(livenessErrorException).a());
            return;
        }
        this.E1.E(r05Var);
        m71.o().n(r05Var.a);
        if (this.c2) {
            m2();
        } else {
            this.d2 = true;
        }
    }

    @Override
    public final void b() {
        super.b();
        m71.o().b.b("face detection finished");
        this.v1.S1();
        W1(y62.l, this.U1);
        this.V1.Z1();
        r05 G = this.E1.G();
        if (((LivenessConfiguration) this.I1).n() == ke3.b && (this.E1.b() || this.E1.H())) {
            return;
        }
        this.E1.q(G);
    }

    @Override
    public final String b1() {
        String p = ((LivenessConfiguration) this.I1).p();
        r05 G = this.E1.G();
        if (p != null) {
            return p;
        }
        if (G == null) {
            return null;
        }
        return G.b;
    }

    public final void b2(File file) {
        this.E1.x(i91.b(file));
    }

    @Override
    public final void c() {
        m71.o().b.b("timeout from Core");
        this.q1 = 2;
        super.c();
        if (this.T1) {
            m71.o().b.b("Stop liveness");
            this.P1.g.s();
            this.P1.b.e();
            g2(v62.f, new Runnable() {
                @Override
                public final void run() {
                    LivenessCaptureActivity.this.L1();
                }
            });
        }
        k2(this.E1.G());
    }

    @Override
    public final Float c1() {
        return null;
    }

    public final void c2(c25 c25Var, a05 a05Var) {
        mf3 mf3Var;
        String str;
        m71.o().b.b("Liveness api callback called");
        this.T1 = false;
        if (this.S1) {
            String k = a05Var.a().k();
            String str2 = (String) this.K1.get(k);
            if (str2 != null) {
                Q0(this.p1, str2, k, this.y1);
            } else {
                this.K1.put(k, k);
            }
            m71.o().b.b("Ready to send video: " + k);
            if (this.G1) {
                mf3Var = m71.o().b;
                str = "Activity has already finished";
            } else {
                if (c25Var.a != null) {
                    this.U1 = a05Var.a();
                    if (this.L1) {
                        setRequestedOrientation(4);
                    }
                    if (!a05Var.c() && H1()) {
                        f2(a05Var.b());
                        return;
                    } else {
                        h2(this.U1);
                        return;
                    }
                }
                mf3Var = m71.o().b;
                str = "Base64 image is null";
            }
            mf3Var.b(str);
        }
    }

    @Override
    public final void d() {
        super.d();
        this.P1.g.w();
        this.v1.S1();
        this.v1.i2(m71.o().b(getApplicationContext(), this.n1, R$string.faceLivenessCameraLayoutPreparingService));
        this.E1.F();
        this.q1 = 3;
        F0();
        this.E1.E(null);
        this.D1.postDelayed(new Runnable() {
            @Override
            public final void run() {
                LivenessCaptureActivity.this.K1();
            }
        }, 300L);
    }

    @Override
    public final Integer d1() {
        return null;
    }

    public final void d2(final c25 c25Var, r05 r05Var) {
        if (r05Var == null) {
            m71.o().b.b("Skip completion, liveness session is not started");
            return;
        }
        m71.o().b.b("face detection complete, public key: " + c25Var.c);
        this.S1 = true;
        this.W1.m(m71.o().p);
        this.W1.l(new WeakReference(new b25() {
            @Override
            public final void a(a05 a05Var) {
                LivenessCaptureActivity.this.c2(c25Var, a05Var);
            }
        }));
        c25Var.d = r05Var.a;
        c25Var.e = r05Var.b;
        this.W1.f(getApplicationContext(), c25Var);
    }

    @Override
    public final Integer e1() {
        return null;
    }

    public final void e2(byte[] bArr, int i) {
        p1();
        m71.o().b.b("Processing state changed");
        this.P1.g.setFaceHoldStill(false);
        this.O1 = i;
        this.P1.g.setTargetSector(i);
        m71.o().b.b("Moved to new stage");
        W1(y62.d, this.U1);
        this.X1 = bArr;
        this.P1.g.setStage(c15.b);
        this.v1.S1();
        this.v1.e2(false);
        this.B1 = true;
        this.D1.postDelayed(new Runnable() {
            @Override
            public final void run() {
                LivenessCaptureActivity.this.M1();
            }
        }, 1000L);
    }

    @Override
    public final void f() {
        h2(new qz4().b(new LivenessErrorException(v62.h)).a());
    }

    @Override
    public final Float f1() {
        return null;
    }

    public final void f2(int[] iArr) {
        if (this.G1) {
            m71.o().b.b("Skip show liveness results when activity has finished");
            return;
        }
        W1(y62.v, this.U1);
        this.S1 = false;
        this.V1.a2(iArr);
        this.P1.l.setVisibility(4);
        this.P1.d.setVisibility(4);
        this.P1.i.setVisibility(0);
    }

    @Override
    public final Float g1() {
        return null;
    }

    public final void g2(final v62 v62Var, final Runnable runnable) {
        Executors.newSingleThreadExecutor().execute(new Runnable() {
            @Override
            public final void run() {
                LivenessCaptureActivity.this.V1(v62Var, runnable);
            }
        });
    }

    @Override
    public final String h1() {
        if (this.E1.G() != null) {
            return this.E1.G().a;
        }
        return null;
    }

    public final void h2(final z62 z62Var) {
        mf3 mf3Var;
        String str;
        if (this.G1) {
            mf3Var = m71.o().b;
            str = "Notify with results to already finished activity";
        } else {
            if (z62Var != null) {
                mf3 mf3Var2 = m71.o().b;
                StringBuilder sb = new StringBuilder("Notify with results, liveness: ");
                sb.append(z62Var.i());
                sb.append(", error: ");
                sb.append(z62Var.h() == null ? "no error" : z62Var.h().a());
                mf3Var2.b(sb.toString());
                if (z62Var.i() != b72.a || Arrays.asList(((LivenessConfiguration) this.I1).o()).contains(a72.b)) {
                    m1();
                    m71.o().h(z62Var);
                    finish();
                    return;
                } else {
                    this.V1.b2();
                    W1(y62.X, z62Var);
                    new Handler().postDelayed(new Runnable() {
                        @Override
                        public final void run() {
                            LivenessCaptureActivity.this.X1(z62Var);
                        }
                    }, 1000L);
                    return;
                }
            }
            mf3Var = m71.o().b;
            str = "Notify with null response";
        }
        mf3Var.b(str);
    }

    public final void i2(kl4 kl4Var) {
        this.P1.h.k.setBackgroundColor(kl4Var.h(km0.ONBOARDING_SCREEN_BACKGROUND, getResources()));
        kl4Var.l(this.P1.h.f, getResources(), mm0.ONBOARDING_SCREEN_CLOSE_BUTTON);
        kl4Var.j(this.P1.h.l, getResources(), km0.ONBOARDING_SCREEN_START_BUTTON_BACKGROUND);
        this.P1.h.l.setTextColor(kl4Var.h(km0.ONBOARDING_SCREEN_START_BUTTON_TITLE, getResources()));
        kl4Var.k(lm0.ONBOARDING_SCREEN_START_BUTTON, this, this.P1.h.l);
        kl4Var.n(lm0.ONBOARDING_SCREEN_TITLE_LABEL, this, this.P1.h.h);
        kl4Var.n(lm0.ONBOARDING_SCREEN_SUBTITLE_LABEL, this, this.P1.h.g);
        lm0 lm0Var = lm0.ONBOARDING_SCREEN_MESSAGE_LABELS;
        kl4Var.n(lm0Var, this, this.P1.h.j);
        kl4Var.n(lm0Var, this, this.P1.h.c);
        kl4Var.n(lm0Var, this, this.P1.h.e);
        this.P1.h.h.setTextColor(kl4Var.h(km0.ONBOARDING_SCREEN_TITLE_LABEL_TEXT, getResources()));
        this.P1.h.g.setTextColor(kl4Var.h(km0.ONBOARDING_SCREEN_SUBTITLE_LABEL_TEXT, getResources()));
        int h = kl4Var.h(km0.ONBOARDING_SCREEN_MESSAGE_LABELS_TEXT, getResources());
        this.P1.h.j.setTextColor(h);
        this.P1.h.c.setTextColor(h);
        this.P1.h.e.setTextColor(h);
        kl4Var.m(this.P1.h.i, getResources(), mm0.ONBOARDING_SCREEN_ILLUMINATION);
        kl4Var.m(this.P1.h.b, getResources(), mm0.ONBOARDING_SCREEN_ACCESSORIES);
        kl4Var.m(this.P1.h.d, getResources(), mm0.ONBOARDING_SCREEN_CAMERA_LEVEL);
    }

    @Override
    public final boolean j1() {
        return ((LivenessConfiguration) this.I1).n() == ke3.b;
    }

    public final void j2(Observer observer, View view) {
        W1(y62.a, this.U1);
        this.P1.h.a().setVisibility(4);
        m71.o().q().a().removeObserver(observer);
        r05 r05Var = this.e2;
        if (r05Var == null || r05Var.a == null) {
            R1();
            return;
        }
        this.E1.E(r05Var);
        if (this.c2) {
            m2();
        } else {
            this.d2 = true;
        }
    }

    @Override
    public final boolean k1() {
        return true;
    }

    public final void k2(r05 r05Var) {
        m71.o().b.b("Abort operation called");
        this.P1.g.s();
        this.P1.b.e();
        if (((LivenessConfiguration) this.I1).n() == ke3.b && (this.E1.b() || this.E1.H())) {
            return;
        }
        this.E1.q(r05Var);
    }

    public final void l2() {
        m71.o().b.b("Cancel process by back button");
        this.S1 = false;
        this.T1 = false;
        if (this.U1 != null) {
            m71.o().h(this.U1);
        } else {
            g2(v62.e, new Runnable() {
                @Override
                public final void run() {
                    LivenessCaptureActivity.this.I1();
                }
            });
        }
    }

    @Override
    public final void m1() {
        super.m1();
        ap apVar = this.V1;
        if (apVar != null) {
            apVar.Y1();
        }
    }

    public final void m2() {
        S1();
        if (super.o1()) {
            this.B1 = false;
            this.T1 = true;
            this.v1.i2(m71.o().b(getApplicationContext(), this.n1, R$string.hint_fit2));
        } else {
            z62 a = new qz4().b(new LivenessErrorException(v62.d)).a();
            m1();
            m71.o().h(a);
            finish();
        }
    }

    public final void n2() {
        m71.o().b.b("Cancel process");
        this.S1 = false;
        this.T1 = false;
        z62 z62Var = this.U1;
        if (z62Var != null) {
            h2(z62Var);
        } else {
            g2(v62.e, new Runnable() {
                @Override
                public final void run() {
                    LivenessCaptureActivity.this.J1();
                }
            });
        }
        this.E1.F();
    }

    @Override
    public final boolean o1() {
        throw null;
    }

    @Override
    public final void onBackPressed() {
        super.onBackPressed();
        l2();
        m1();
    }

    @Override
    public final void onCreate(Bundle bundle) {
        String string;
        super.onCreate(bundle);
        Intent intent = getIntent();
        String str = m71.o().c;
        if (intent != null) {
            str = intent.getStringExtra("serviceUrl");
            if (!intent.getBooleanExtra("PermissionGranted", true) || !intent.getBooleanExtra("AnyCameraAvailable", true)) {
                return;
            }
        }
        if (str == null) {
            Objects.requireNonNull(m71.o());
            str = "https://faceapi.regulaforensics.com";
        }
        if (bundle != null && (string = bundle.getString("liveness_Start_Model")) != null && !string.isEmpty()) {
            this.e2 = r05.a(string);
        }
        this.Y1 = (SensorManager) getSystemService("sensor");
        this.W1 = p25.a(str, m71.o().p, new WeakReference(new e25() {
            @Override
            public final void a(r05 r05Var) {
                LivenessCaptureActivity.this.a2(r05Var);
            }
        }));
        this.t1.z2(1280, 960);
        ju0.f(getApplicationContext(), ((LivenessConfiguration) this.I1).r());
        G1();
        if (((LivenessConfiguration) this.I1).m() != null) {
            try {
                this.V1 = ((LivenessConfiguration) this.I1).m().getConstructor(new Class[0]).newInstance(new Object[0]);
            } catch (IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException e) {
                m71.o().b.e(e);
            }
        }
        if (this.V1 == null) {
            this.V1 = new pz4();
        }
        d0().m().r(R$id.uiCustomLayout, this.V1).j();
        this.P1.g.f();
    }

    @Override
    public final void onDestroy() {
        super.onDestroy();
        f25 f25Var = this.W1;
        if (f25Var != null) {
            f25Var.n();
        }
    }

    @Override
    public final void onPause() {
        super.onPause();
        this.c2 = false;
        SensorManager sensorManager = this.Y1;
        if (sensorManager != null) {
            sensorManager.unregisterListener(this);
        }
        if (this.T1) {
            m71.o().b.b("Called onPause activity");
            this.q1 = 3;
            if (this.T1) {
                m71.o().b.b("Abort face detector module, pause activity");
                this.E1.F();
                this.T1 = false;
                m71.o().b.b("Stop liveness by pause in background");
                this.P1.g.s();
                this.P1.b.e();
                g2(v62.i, new Runnable() {
                    @Override
                    public final void run() {
                        LivenessCaptureActivity.this.N1();
                    }
                });
            }
            F0();
        }
    }

    @Override
    public final void onResume() {
        super.onResume();
        SensorManager sensorManager = this.Y1;
        if (sensorManager == null) {
            return;
        }
        Sensor defaultSensor = sensorManager.getDefaultSensor(1);
        if (defaultSensor != null) {
            this.Y1.registerListener(this, defaultSensor, 3, 2);
        }
        Sensor defaultSensor2 = this.Y1.getDefaultSensor(2);
        if (defaultSensor2 != null) {
            this.Y1.registerListener(this, defaultSensor2, 3, 2);
        }
    }

    public final void onSaveInstanceState(Bundle bundle) {
        String str;
        super/*androidx.activity.ComponentActivity*/.onSaveInstanceState(bundle);
        m71.o().b.b("onSaveInstanceState = " + h1());
        r05 r05Var = this.e2;
        if (r05Var == null || (str = r05Var.c) == null) {
            return;
        }
        bundle.putSerializable("liveness_Start_Model", str);
    }

    @Override
    public final void onSensorChanged(SensorEvent sensorEvent) {
        if (sensorEvent.sensor.getType() == 1) {
            float[] fArr = sensorEvent.values;
            float[] fArr2 = this.Z1;
            System.arraycopy(fArr, 0, fArr2, 0, fArr2.length);
        } else if (sensorEvent.sensor.getType() == 2) {
            float[] fArr3 = sensorEvent.values;
            float[] fArr4 = this.a2;
            System.arraycopy(fArr3, 0, fArr4, 0, fArr4.length);
        }
        float[] fArr5 = new float[9];
        SensorManager.getRotationMatrix(fArr5, null, this.Z1, this.a2);
        SensorManager.getOrientation(fArr5, this.b2);
    }

    @Override
    public final void u(boolean z) {
        super.u(z);
        this.c2 = true;
        if (!this.d2 || this.E1.G() == null) {
            return;
        }
        m2();
        this.d2 = false;
    }

    @Override
    public final void v() {
        m71.o().b.b("Click on close button in liveness activity");
        n2();
        super.v();
    }

    @Override
    public final s05 X0() {
        return this;
    }

    public static void Y1(View view) {
    }

    @Override
    public final void onAccuracyChanged(Sensor sensor, int i) {
    }
}