正在查看: TodoCrédito v1.4 应用的 Trowel.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: TodoCrédito v1.4 应用的 Trowel.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.tdcd.mx.bowlines.petting;
import android.R;
import android.content.Intent;
import android.graphics.RectF;
import android.hardware.display.DisplayManager;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.Looper;
import android.provider.MediaStore;
import android.util.DisplayMetrics;
import android.util.Log;
import android.util.Size;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.camera.core.ImageCaptureException;
import androidx.camera.core.h;
import androidx.camera.core.k;
import androidx.camera.core.n;
import androidx.camera.lifecycle.e;
import androidx.camera.view.PreviewView;
import com.gyf.immersionbar.m;
import com.tdcd.mx.bowlines.bcojqc.Incompatible;
import com.tdcd.mx.bowlines.petting.Trowel;
import com.tdcd.mx.ds.databinding.YwufpbBinding;
import java.io.File;
import java.util.concurrent.ExecutionException;
import l5.g;
import t.o;
import z5.s;
public class Trowel extends Incompatible<o5.a, YwufpbBinding> {
public n K;
public e L;
public k M;
public h N;
public RectF O;
public Uri P;
public DisplayManager R;
public DisplayManager.DisplayListener S;
public int J = 0;
public final Handler Q = new Handler(Looper.getMainLooper());
public class a implements DisplayManager.DisplayListener {
public a() {
}
@Override
public void onDisplayAdded(int i9) {
}
@Override
public void onDisplayChanged(int i9) {
if (i9 == Trowel.this.J) {
int rotation = Trowel.this.findViewById(R.id.content).getDisplay().getRotation();
if (Trowel.this.K != null) {
Trowel.this.K.a0(rotation);
}
if (Trowel.this.M != null) {
Trowel.this.M.J0(rotation);
}
if (Trowel.this.N != null) {
Trowel.this.N.b0(rotation);
}
}
}
@Override
public void onDisplayRemoved(int i9) {
}
}
public class b implements View.OnAttachStateChangeListener {
public b() {
}
@Override
public void onViewAttachedToWindow(@NonNull View view) {
Trowel.this.R.registerDisplayListener(Trowel.this.S, null);
}
@Override
public void onViewDetachedFromWindow(@NonNull View view) {
Trowel.this.R.unregisterDisplayListener(Trowel.this.S);
}
}
public class c implements k.n {
public c() {
}
@Override
public void a(@NonNull k.p pVar) {
((YwufpbBinding) Trowel.this.G).cfoerluwhjx.setVisibility(0);
((YwufpbBinding) Trowel.this.G).piles.setVisibility(0);
((YwufpbBinding) Trowel.this.G).lhirbfedn.setVisibility(0);
((YwufpbBinding) Trowel.this.G).ohtqz.setVisibility(4);
((YwufpbBinding) Trowel.this.G).cfoerluwhjx.setImageURI(pVar.a());
Trowel.this.P = pVar.a();
Log.d("chenchao", "Photo saved in " + Trowel.this.P);
}
@Override
public void b(@NonNull ImageCaptureException imageCaptureException) {
imageCaptureException.printStackTrace();
}
}
public void C0(View view) {
finish();
}
public void D0() {
this.J = ((YwufpbBinding) this.G).durer.getDisplay().getDisplayId();
((YwufpbBinding) this.G).durer.addOnAttachStateChangeListener(new b());
RectF rectF = new RectF(((YwufpbBinding) this.G).durer.getLeft(), ((YwufpbBinding) this.G).durer.getTop(), ((YwufpbBinding) this.G).durer.getRight(), ((YwufpbBinding) this.G).durer.getBottom());
this.O = rectF;
((YwufpbBinding) this.G).quantize.b(rectF, m5.b.a(this, 200.0f));
K0();
}
public void E0(View view) {
L0();
}
public void F0(View view) {
I0();
}
public void G0(View view) {
setResult(-1, new Intent().setData(this.P));
finish();
}
public void H0(r3.a aVar, PreviewView previewView) {
try {
this.L = (e) aVar.get();
previewView.getDisplay().getRealMetrics(new DisplayMetrics());
int rotation = previewView.getDisplay().getRotation();
e eVar = this.L;
this.K = new n.b().b(new Size(300, 300)).a(rotation).e();
this.M = new k.h().h(0).i(2).b(new Size(300, 300)).a(rotation).e();
h e9 = new h.c().b(new Size(300, 300)).a(rotation).h(0).e();
this.N = e9;
J0(e9);
eVar.m();
B0(eVar, previewView);
} catch (InterruptedException e10) {
throw new RuntimeException(e10);
} catch (ExecutionException e11) {
throw new RuntimeException(e11);
}
}
public final void B0(e eVar, PreviewView previewView) {
eVar.e(this, o.f13442b, this.K, this.M, this.N);
this.K.Y(previewView.getSurfaceProvider());
}
public final void I0() {
((YwufpbBinding) this.G).cfoerluwhjx.setVisibility(4);
((YwufpbBinding) this.G).lhirbfedn.setVisibility(8);
((YwufpbBinding) this.G).piles.setVisibility(8);
((YwufpbBinding) this.G).ohtqz.setVisibility(0);
}
public final void J0(h hVar) {
HandlerThread handlerThread = new HandlerThread("Luminosity");
handlerThread.start();
hVar.a0(new l5.o(new Handler(handlerThread.getLooper())), new g());
}
public final void K0() {
final PreviewView previewView = ((YwufpbBinding) this.G).durer;
final r3.a<e> f9 = e.f(this);
f9.a(new Runnable() {
@Override
public final void run() {
Trowel.this.H0(f9, previewView);
}
}, v0.a.g(this));
}
public final void L0() {
k kVar = this.M;
if (kVar == null) {
kVar = new k.h().b(new Size(300, 300)).a(((YwufpbBinding) this.G).durer.getDisplay().getRotation()).e();
}
k.l lVar = new k.l();
lVar.d(true);
MediaStore.Images.Media.EXTERNAL_CONTENT_URI.toString();
File file = new File(getCacheDir() + "/CameraxTakeFace/");
if (!file.exists()) {
file.mkdirs();
}
kVar.B0(new k.o.a(new File(file, System.currentTimeMillis() + ".jpg")).b(lVar).a(), new l5.o(this.Q), new c());
}
@Override
public void a0() {
}
@Override
public void d0(Bundle bundle) {
u5.b.a(((YwufpbBinding) this.G).dv, s.a("Autenticación biométrica"), new View.OnClickListener() {
@Override
public final void onClick(View view) {
Trowel.this.C0(view);
}
});
m.u0(this).o0(((YwufpbBinding) this.G).dv).H();
((YwufpbBinding) this.G).ebmj.setText(s.a("Asegúrese de que su rostro esté alineado con el marco de la cámara y haya una buena iluminación."));
((YwufpbBinding) this.G).ohtqz.setText(s.a("Haga clic para empezar"));
this.R = (DisplayManager) getSystemService("display");
a aVar = new a();
this.S = aVar;
this.R.registerDisplayListener(aVar, null);
((YwufpbBinding) this.G).durer.post(new Runnable() {
@Override
public final void run() {
Trowel.this.D0();
}
});
((YwufpbBinding) this.G).lhirbfedn.setVisibility(8);
((YwufpbBinding) this.G).piles.setVisibility(8);
((YwufpbBinding) this.G).ohtqz.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
Trowel.this.E0(view);
}
});
((YwufpbBinding) this.G).lhirbfedn.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
Trowel.this.F0(view);
}
});
((YwufpbBinding) this.G).piles.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
Trowel.this.G0(view);
}
});
}
@Override
public void onDestroy() {
super.onDestroy();
this.R.unregisterDisplayListener(this.S);
}
}