正在查看: PrestaMax v1.0.9 应用的 TakeFaceActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: PrestaMax v1.0.9 应用的 TakeFaceActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.prestamx.max.activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Matrix;
import android.media.ExifInterface;
import android.os.Bundle;
import android.util.Size;
import android.view.MotionEvent;
import android.view.View;
import androidx.camera.core.ImageCaptureException;
import androidx.camera.core.ogbxud;
import androidx.camera.core.otadknixd;
import androidx.camera.core.vehppha;
import androidx.camera.core.wiuidnyon;
import androidx.camera.view.PreviewView;
import com.prestamx.max.R$id;
import com.prestamx.max.R$layout;
import com.prestamx.max.java_calss.ActivityUtil;
import com.prestamx.max.java_calss.AppUtil;
import com.prestamx.max.room.PointEnum;
import com.prestamx.max.transfer_view.TransferImageview;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.HashMap;
import kitld.gdlglvuk;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
public class TakeFaceActivity extends MaxActivity {
public androidx.camera.lifecycle.slyvsmo f13609ksocihbb;
public kitld.aiyptt f13610vikxvh;
public androidx.camera.core.wiuidnyon f13611wavzltwms;
public class emazevgh implements gdlglvuk.mwowwskti {
public emazevgh() {
}
@Override
public void emazevgh(kitld.gdlglvuk gdlglvukVar) {
gdlglvukVar.dismiss();
momzvk.emazevgh.wdmirpab(TakeFaceActivity.this, AppUtil.emazevgh(), 1000);
}
@Override
public void mwowwskti(kitld.gdlglvuk gdlglvukVar) {
gdlglvukVar.dismiss();
TakeFaceActivity.this.finish();
}
}
public class mwowwskti implements Callback {
public mwowwskti() {
}
public void onFailure(Call call, Throwable th) {
TakeFaceActivity.this.f13610vikxvh.dismiss();
momzvk.emazevgh.wdmirpab(TakeFaceActivity.this, AppUtil.emazevgh(), 1000);
}
public void onResponse(Call call, Response response) {
TakeFaceActivity.this.f13610vikxvh.dismiss();
momzvk.emazevgh.wdmirpab(TakeFaceActivity.this, AppUtil.emazevgh(), 1000);
}
}
public class zwfgajm implements wiuidnyon.sjdatecqy {
public final File f13615mwowwskti;
public zwfgajm(File file) {
this.f13615mwowwskti = file;
}
@Override
public void emazevgh(ImageCaptureException imageCaptureException) {
TakeFaceActivity.this.f13610vikxvh.dismiss();
AppUtil.slyvsmo(TakeFaceActivity.this);
TakeFaceActivity.this.finish();
}
@Override
public void mwowwskti(wiuidnyon.nqymzx nqymzxVar) {
try {
TakeFaceActivity.this.f13609ksocihbb.sjdatecqy();
if (nqymzxVar.mwowwskti() == null) {
TakeFaceActivity.this.f13610vikxvh.dismiss();
AppUtil.slyvsmo(TakeFaceActivity.this);
TakeFaceActivity.this.finish();
return;
}
boolean wcewpl2 = TakeFaceActivity.this.wcewpl(this.f13615mwowwskti);
TakeFaceActivity.this.f13610vikxvh.dismiss();
if (wcewpl2) {
Intent intent = new Intent();
intent.putExtra("knsljbe", this.f13615mwowwskti.getAbsolutePath());
TakeFaceActivity.this.setResult(-1, intent);
} else {
AppUtil.slyvsmo(TakeFaceActivity.this);
}
TakeFaceActivity.this.finish();
} catch (Exception e) {
e.printStackTrace();
TakeFaceActivity.this.f13610vikxvh.dismiss();
AppUtil.slyvsmo(TakeFaceActivity.this);
TakeFaceActivity.this.finish();
}
}
}
public void hebzbk(View view) {
finish();
}
public void hiqobdks(com.google.common.util.concurrent.vpqvb vpqvbVar, PreviewView previewView, TransferImageview transferImageview) {
try {
this.f13609ksocihbb = (androidx.camera.lifecycle.slyvsmo) vpqvbVar.get();
this.f13611wavzltwms = mmzqqpyl();
this.f13609ksocihbb.sjdatecqy();
androidx.camera.core.otadknixd zwfgajm2 = new otadknixd.emazevgh().zwfgajm();
androidx.camera.core.ogbxud kbpjcqc2 = kbpjcqc();
androidx.camera.core.vehppha zwfgajm3 = new vehppha.mwowwskti().zwfgajm();
this.f13609ksocihbb.slyvsmo(this, kbpjcqc2, zwfgajm3, zwfgajm2, this.f13611wavzltwms);
zwfgajm3.mmzqqpyl(previewView.getSurfaceProvider());
transferImageview.setEnabled(true);
} catch (Exception e) {
e.printStackTrace();
}
}
public void osroeap(View view) {
try {
this.f13610vikxvh.show();
if (this.f13611wavzltwms == null) {
return;
}
File file = new File(getCacheDir().getAbsolutePath(), com.prestamx.max.java_calss.yyqsz.zppskyagv("uX0wotJqn0qpLp+YO4MF3g==") + com.prestamx.max.java_calss.yyqsz.zppskyagv("dN7QHTyzCBhFw1462LQjKQ=="));
this.f13611wavzltwms.ptyq(new wiuidnyon.jzzsan.mwowwskti(file).mwowwskti(), rubjtuopd.mwowwskti.zybqm(this), new zwfgajm(file));
} catch (Exception e) {
this.f13610vikxvh.dismiss();
e.printStackTrace();
AppUtil.slyvsmo(this);
finish();
}
}
@Override
public boolean dispatchTouchEvent(MotionEvent motionEvent) {
qpcdhxz.nmqbnjf.vikxvh(PointEnum.POINT_APPLY, motionEvent);
return super.dispatchTouchEvent(motionEvent);
}
public final void kamfujg() {
final TransferImageview transferImageview = (TransferImageview) findViewById(R$id.takeView);
final PreviewView previewView = (PreviewView) findViewById(R$id.preView);
final com.google.common.util.concurrent.vpqvb zppskyagv2 = androidx.camera.lifecycle.slyvsmo.zppskyagv(this);
zppskyagv2.addListener(new Runnable() {
@Override
public final void run() {
TakeFaceActivity.this.hiqobdks(zppskyagv2, previewView, transferImageview);
}
}, rubjtuopd.mwowwskti.zybqm(this));
transferImageview.setEnabled(false);
transferImageview.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
TakeFaceActivity.this.osroeap(view);
}
});
}
public final androidx.camera.core.ogbxud kbpjcqc() {
return new ogbxud.mwowwskti().nmqbnjf(0).emazevgh();
}
public final androidx.camera.core.wiuidnyon mmzqqpyl() {
return new wiuidnyon.etol().wavzltwms(new Size(720, 1280)).zppskyagv(1).zwfgajm();
}
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R$layout.activity_take_face);
this.f13610vikxvh = new kitld.aiyptt(this);
findViewById(R$id.closeView).setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
TakeFaceActivity.this.hebzbk(view);
}
});
this.f13610vikxvh.show();
com.prestamx.max.java_calss.vikxvh.zppskyagv().pzetpkg(com.prestamx.max.java_calss.vikxvh.mwowwskti(this, new HashMap())).enqueue(new mwowwskti());
AppUtil.zwfgajm(this, 17);
ActivityUtil.wdmirpab(this, 20);
}
@Override
public void onRequestPermissionsResult(int i, String[] strArr, int[] iArr) {
super.onRequestPermissionsResult(i, strArr, iArr);
StringBuilder sb = new StringBuilder();
for (String str : AppUtil.emazevgh()) {
if (rubjtuopd.mwowwskti.mwowwskti(this, str) != 0) {
if (sb.length() > 0) {
sb.append("\n");
}
sb.append(str.replace(com.prestamx.max.java_calss.yyqsz.zppskyagv("WHH4uAcHAlvtzJFdtixvPzjO2JFid8clyDaAwXJyzcw="), ""));
}
}
if (sb.length() == 0) {
kamfujg();
} else {
new kitld.gdlglvuk(this).nqymzx(new emazevgh()).qwppmv(sb.toString()).show();
}
}
public final boolean wcewpl(File file) {
int attributeInt = new ExifInterface(file.getAbsolutePath()).getAttributeInt("Orientation", 1);
Matrix matrix = new Matrix();
if (attributeInt == 6) {
matrix.postRotate(90.0f);
} else if (attributeInt == 3) {
matrix.postRotate(180.0f);
} else if (attributeInt == 8) {
matrix.postRotate(270.0f);
}
Bitmap decodeFile = BitmapFactory.decodeFile(file.getAbsolutePath());
return wiuidnyon(Bitmap.createBitmap(decodeFile, 0, 0, decodeFile.getWidth(), decodeFile.getHeight(), matrix, false), file);
}
public final boolean wiuidnyon(Bitmap bitmap, File file) {
try {
FileOutputStream fileOutputStream = new FileOutputStream(file);
boolean compress = bitmap.compress(Bitmap.CompressFormat.JPEG, 100, fileOutputStream);
fileOutputStream.flush();
fileOutputStream.close();
bitmap.recycle();
return compress;
} catch (IOException e) {
e.printStackTrace();
return false;
}
}
}