导航菜单

页面标题

页面副标题

VivaMoneda v1.4 - Zonal.java 源代码

正在查看: VivaMoneda v1.4 应用的 Zonal.java JAVA 源代码文件

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


package com.moneda.cloud.tt.rgu.uv;

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.moneda.cloud.tt.ambqmbravq.Grills;
import com.moneda.cloud.tt.rgu.uv.Zonal;
import com.moneda.project.databinding.XebecBinding;
import e5.f;
import e5.l;
import java.io.File;
import java.util.concurrent.ExecutionException;
import t.o;

public class Zonal extends Grills<l, XebecBinding> {
    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 == Zonal.this.J) {
                int rotation = Zonal.this.findViewById(R.id.content).getDisplay().getRotation();
                if (Zonal.this.K != null) {
                    Zonal.this.K.a0(rotation);
                }
                if (Zonal.this.M != null) {
                    Zonal.this.M.J0(rotation);
                }
                if (Zonal.this.N != null) {
                    Zonal.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) {
            Zonal.this.R.registerDisplayListener(Zonal.this.S, null);
        }

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

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

        @Override
        public void a(@NonNull k.p pVar) {
            ((XebecBinding) Zonal.this.G).wfz.setVisibility(0);
            ((XebecBinding) Zonal.this.G).unchanged.setVisibility(0);
            ((XebecBinding) Zonal.this.G).nicknames.setVisibility(0);
            ((XebecBinding) Zonal.this.G).une.setVisibility(4);
            ((XebecBinding) Zonal.this.G).wfz.setImageURI(pVar.a());
            Zonal.this.P = pVar.a();
            Log.d("chenchao", "Photo saved in " + Zonal.this.P);
        }

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

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

    public void D0() {
        this.J = ((XebecBinding) this.G).habitual.getDisplay().getDisplayId();
        ((XebecBinding) this.G).habitual.addOnAttachStateChangeListener(new b());
        RectF rectF = new RectF(((XebecBinding) this.G).habitual.getLeft(), ((XebecBinding) this.G).habitual.getTop(), ((XebecBinding) this.G).habitual.getRight(), ((XebecBinding) this.G).habitual.getBottom());
        this.O = rectF;
        ((XebecBinding) this.G).zero.setViewFinderRect(rectF);
        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.f13046b, this.K, this.M, this.N);
        this.K.Y(previewView.getSurfaceProvider());
    }

    public final void I0() {
        ((XebecBinding) this.G).wfz.setVisibility(4);
        ((XebecBinding) this.G).nicknames.setVisibility(8);
        ((XebecBinding) this.G).unchanged.setVisibility(8);
        ((XebecBinding) this.G).une.setVisibility(0);
    }

    public final void J0(h hVar) {
        HandlerThread handlerThread = new HandlerThread("Luminosity");
        handlerThread.start();
        hVar.a0(new k5.c(new Handler(handlerThread.getLooper())), new i5.c());
    }

    public final void K0() {
        final PreviewView previewView = ((XebecBinding) this.G).habitual;
        final r3.a<e> f9 = e.f(this);
        f9.a(new Runnable() {
            @Override
            public final void run() {
                Zonal.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(((XebecBinding) this.G).habitual.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 k5.c(this.Q), new c());
    }

    @Override
    public void a0() {
    }

    @Override
    public void d0(Bundle bundle) {
        r5.a.a(this.I, f.a("YWNpcnTDqW1vaWIgbsOzaWNhY2l0bmV0dUE="), new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                Zonal.this.C0(view);
            }
        });
        ((XebecBinding) this.G).prhhwl.setText(f.a("LmFkYW5pbXVsaSBuZWliIHkgb2NyYW0gbGUgbm9jIGFkYWVuaWxhIMOpdHNlIGFyYWMgdXMgZXVxIGVkIGVzZXLDumdlc0E="));
        ((XebecBinding) this.G).une.setText(f.a("cmF6ZXBtZSBhcmFwIGNpbGMgYWdhSA=="));
        this.R = (DisplayManager) getSystemService("display");
        a aVar = new a();
        this.S = aVar;
        this.R.registerDisplayListener(aVar, null);
        ((XebecBinding) this.G).habitual.post(new Runnable() {
            @Override
            public final void run() {
                Zonal.this.D0();
            }
        });
        ((XebecBinding) this.G).nicknames.setText(f.a("b3ZldW4gZWQgcmFpZmFyZ290b0Y="));
        ((XebecBinding) this.G).unchanged.setText(f.a("cmFtcmlmbm9D"));
        ((XebecBinding) this.G).nicknames.setVisibility(8);
        ((XebecBinding) this.G).unchanged.setVisibility(8);
        ((XebecBinding) this.G).une.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                Zonal.this.E0(view);
            }
        });
        ((XebecBinding) this.G).nicknames.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                Zonal.this.F0(view);
            }
        });
        ((XebecBinding) this.G).unchanged.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                Zonal.this.G0(view);
            }
        });
    }

    @Override
    public boolean h0() {
        return true;
    }

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