导航菜单

页面标题

页面副标题

TodoCrédito v1.4 - Mommy.java 源代码

正在查看: TodoCrédito v1.4 应用的 Mommy.java JAVA 源代码文件

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


package com.tdcd.mx.bowlines.nobleman;

import android.R;
import android.content.Intent;
import android.graphics.Color;
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.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.view.PreviewView;
import com.gyf.immersionbar.m;
import com.tdcd.mx.bowlines.bcojqc.Incompatible;
import com.tdcd.mx.bowlines.nobleman.Mommy;
import com.tdcd.mx.ds.R$mipmap;
import com.tdcd.mx.ds.databinding.OutlinedBinding;
import java.io.File;
import java.util.concurrent.ExecutionException;
import l5.g;
import me.jessyan.autosize.internal.CustomAdapt;
import t.o;
import z5.s;

public class Mommy extends Incompatible<o5.a, OutlinedBinding> implements CustomAdapt {
    public n K;
    public androidx.camera.lifecycle.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 Handler Q = new Handler(Looper.getMainLooper());
    public boolean T = false;
    public int U = 2;

    public class a implements DisplayManager.DisplayListener {
        public a() {
        }

        @Override
        public void onDisplayAdded(int i9) {
        }

        @Override
        public void onDisplayChanged(int i9) {
            if (i9 == Mommy.this.J) {
                int rotation = Mommy.this.findViewById(R.id.content).getDisplay().getRotation();
                if (Mommy.this.K != null) {
                    Mommy.this.K.a0(rotation);
                }
                if (Mommy.this.M != null) {
                    Mommy.this.M.J0(rotation);
                }
                if (Mommy.this.N != null) {
                    Mommy.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) {
            Mommy.this.R.registerDisplayListener(Mommy.this.S, null);
        }

        @Override
        public void onViewDetachedFromWindow(@NonNull View view) {
            Mommy.this.R.unregisterDisplayListener(Mommy.this.S);
        }
    }

    public class c implements View.OnClickListener {
        public c() {
        }

        @Override
        public void onClick(View view) {
            Mommy.this.R0();
        }
    }

    public class d implements k.n {
        public d() {
        }

        @Override
        public void a(@NonNull k.p pVar) {
            ((OutlinedBinding) Mommy.this.G).cfoerluwhjx.setVisibility(0);
            ((OutlinedBinding) Mommy.this.G).jbv.setVisibility(0);
            ((OutlinedBinding) Mommy.this.G).care.setVisibility(0);
            ((OutlinedBinding) Mommy.this.G).ohtqz.setVisibility(4);
            Mommy.this.P0(pVar.a());
            Mommy.this.P = pVar.a();
        }

        @Override
        public void b(@NonNull ImageCaptureException imageCaptureException) {
            imageCaptureException.printStackTrace();
        }
    }

    public class e implements Runnable {

        public final r3.a f8699c;

        public final PreviewView f8700d;

        public e(r3.a aVar, PreviewView previewView) {
            this.f8699c = aVar;
            this.f8700d = previewView;
        }

        @Override
        public void run() {
            try {
                Mommy.this.L = (androidx.camera.lifecycle.e) this.f8699c.get();
                this.f8700d.getDisplay().getRealMetrics(new DisplayMetrics());
                int rotation = this.f8700d.getDisplay().getRotation();
                androidx.camera.lifecycle.e eVar = Mommy.this.L;
                Mommy.this.K = new n.b().b(new Size(451, 286)).a(rotation).e();
                Mommy.this.M = new k.h().h(0).i(Mommy.this.U).b(new Size(451, 286)).a(rotation).e();
                Mommy.this.N = new h.c().b(new Size(451, 286)).a(rotation).h(0).e();
                Mommy mommy = Mommy.this;
                mommy.S0(mommy.N);
                eVar.m();
                Mommy.this.I0(eVar, this.f8700d);
            } catch (InterruptedException e9) {
                throw new RuntimeException(e9);
            } catch (ExecutionException e10) {
                throw new RuntimeException(e10);
            }
        }
    }

    public void K0() {
        this.J = ((OutlinedBinding) this.G).durer.getDisplay().getDisplayId();
        ((OutlinedBinding) this.G).durer.addOnAttachStateChangeListener(new b());
        RectF rectF = new RectF(((OutlinedBinding) this.G).durer.getLeft(), ((OutlinedBinding) this.G).durer.getTop(), ((OutlinedBinding) this.G).durer.getRight(), ((OutlinedBinding) this.G).durer.getBottom());
        this.O = rectF;
        ((OutlinedBinding) this.G).quantize.b(rectF, m5.b.a(this, 19.0f));
        ((OutlinedBinding) this.G).quantize.setBackgroundColor(Color.parseColor("#666666"));
        T0();
    }

    public void L0(View view) {
        U0();
    }

    public void M0(View view) {
        finish();
    }

    public void N0(View view) {
        Q0();
    }

    public void O0(View view) {
        setResult(-1, new Intent().setData(this.P));
        finish();
    }

    public final void I0(androidx.camera.lifecycle.e eVar, PreviewView previewView) {
        eVar.e(this, o.f13443c, this.K, this.M, this.N);
        this.K.Y(previewView.getSurfaceProvider());
    }

    public final void J0() {
        k kVar = this.M;
        if (kVar == null) {
            kVar = new k.h().b(new Size(300, 300)).a(((OutlinedBinding) this.G).durer.getDisplay().getRotation()).e();
        }
        k.l lVar = new k.l();
        lVar.d(false);
        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 d());
    }

    public final void P0(Uri uri) {
        n2.a.d(this, ((OutlinedBinding) this.G).cfoerluwhjx, uri.getPath(), m5.b.a(this, 19.0f));
    }

    public final void Q0() {
        ((OutlinedBinding) this.G).cfoerluwhjx.setVisibility(4);
        ((OutlinedBinding) this.G).care.setVisibility(8);
        ((OutlinedBinding) this.G).jbv.setVisibility(8);
        ((OutlinedBinding) this.G).ohtqz.setVisibility(0);
    }

    public final void R0() {
        boolean z8 = !this.T;
        this.T = z8;
        ((OutlinedBinding) this.G).composer.setImageResource(z8 ? R$mipmap.kink : R$mipmap.quack);
        this.U = this.T ? 1 : 2;
    }

    public final void S0(h hVar) {
        HandlerThread handlerThread = new HandlerThread("Luminosity");
        handlerThread.start();
        hVar.a0(new l5.o(new Handler(handlerThread.getLooper())), new g());
    }

    public final void T0() {
        PreviewView previewView = ((OutlinedBinding) this.G).durer;
        r3.a<androidx.camera.lifecycle.e> f9 = androidx.camera.lifecycle.e.f(this);
        f9.a(new e(f9, previewView), v0.a.g(this));
    }

    public final void U0() {
        J0();
    }

    @Override
    public void a0() {
    }

    @Override
    public void d0(Bundle bundle) {
        m.u0(this).H();
        this.R = (DisplayManager) getSystemService("display");
        a aVar = new a();
        this.S = aVar;
        this.R.registerDisplayListener(aVar, null);
        ((OutlinedBinding) this.G).durer.post(new Runnable() {
            @Override
            public final void run() {
                Mommy.this.K0();
            }
        });
        ((OutlinedBinding) this.G).question.setText(s.a("Tome una foto de su identificación dentro del marco"));
        ((OutlinedBinding) this.G).care.setVisibility(8);
        ((OutlinedBinding) this.G).jbv.setVisibility(8);
        ((OutlinedBinding) this.G).ohtqz.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                Mommy.this.L0(view);
            }
        });
        ((OutlinedBinding) this.G).zoos.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                Mommy.this.M0(view);
            }
        });
        ((OutlinedBinding) this.G).care.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                Mommy.this.N0(view);
            }
        });
        ((OutlinedBinding) this.G).composer.setOnClickListener(new c());
        ((OutlinedBinding) this.G).jbv.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                Mommy.this.O0(view);
            }
        });
    }

    @Override
    public float getSizeInDp() {
        return 360.0f;
    }

    @Override
    public boolean isBaseOnWidth() {
        return false;
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        this.R.unregisterDisplayListener(this.S);
    }
}