导航菜单

页面标题

页面副标题

Pesohere v1.0.5 - IdentificationCowHereActivity.java 源代码

正在查看: Pesohere v1.0.5 应用的 IdentificationCowHereActivity.java JAVA 源代码文件

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


package com.cow.here.uicowhereanddto.acowherectivity;

import android.R;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ValueAnimator;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.view.View;
import android.view.animation.AlphaAnimation;
import android.view.animation.LinearInterpolator;
import android.view.animation.OvershootInterpolator;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.constraintlayout.widget.ConstraintLayout;
import com.cow.here.netcowherework.dcowhereto.responsecowhere.ErrorCowHereDto;
import com.cow.here.netcowherework.dcowhereto.responsecowhere.FileResponseCowHereDto;
import com.cow.here.netcowherework.dcowhereto.responsecowhere.IdentifiCowHereResponseDto;
import com.cow.here.uicowhereanddto.acowherectivity.IdentificationCowHereActivity;
import com.cow.here.uicowhereanddto.vcowhereiews.PhotoCowHereBtn;
import com.google.android.cameraview.CameraView;
import com.wang.avi.BuildConfig;
import f.c.a.f.a.d;
import f.c.a.h.c.j;
import f.c.a.i.e;
import f.c.a.i.g;
import i.u.b.f;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.util.LinkedHashMap;
import java.util.Map;

public final class IdentificationCowHereActivity extends j implements d {
    public boolean F;
    public boolean H;
    public boolean J;
    public boolean K;
    public boolean L;
    public boolean M;
    public boolean N;
    public byte[] O;
    public File R;
    public f.c.a.f.b.a S;
    public boolean E = true;
    public boolean G = true;
    public String I = BuildConfig.FLAVOR;
    public final AlphaAnimation P = new AlphaAnimation(1.0f, 0.0f);
    public final AlphaAnimation Q = new AlphaAnimation(0.0f, 1.0f);
    public c T = new c(Looper.getMainLooper());
    public final b U = new b();
    public Map<Integer, View> V = new LinkedHashMap();

    public static final class a implements PhotoCowHereBtn.e {
        public final float b;

        public static final class C0009a extends AnimatorListenerAdapter {
            public final IdentificationCowHereActivity a;

            public C0009a(IdentificationCowHereActivity identificationCowHereActivity) {
                this.a = identificationCowHereActivity;
            }

            @Override
            public void onAnimationEnd(Animator animator) {
                f.f(animator, f.c.a.c.a("DA8bBgQAGRwB"));
                super.onAnimationEnd(animator);
                ((ImageView) this.a.f0(f.c.a.a.resetCowHere)).setVisibility(4);
                this.a.L = false;
            }
        }

        public a(float f2) {
            this.b = f2;
        }

        public static final void e(IdentificationCowHereActivity identificationCowHereActivity, float f2, ValueAnimator valueAnimator) {
            f.f(identificationCowHereActivity, f.c.a.c.a("GQkbGEFE"));
            f.f(valueAnimator, f.c.a.c.a("BBU="));
            ImageView imageView = (ImageView) identificationCowHereActivity.f0(f.c.a.a.resetCowHere);
            float f3 = -360;
            Object animatedValue = valueAnimator.getAnimatedValue();
            if (animatedValue == null) {
                throw new NullPointerException(f.c.a.c.a("AxQeB0UXER0BBxFSBwhBEQoWAFAHAEgLHQtADwcHCVQECh8NRRkKGQ0bBUsyHBwOHA=="));
            }
            imageView.setRotation(f3 * ((Float) animatedValue).floatValue());
            ImageView imageView2 = (ImageView) identificationCowHereActivity.f0(f.c.a.a.resetCowHere);
            float f4 = -f2;
            Object animatedValue2 = valueAnimator.getAnimatedValue();
            if (animatedValue2 == null) {
                throw new NullPointerException(f.c.a.c.a("AxQeB0UXER0BBxFSBwhBEQoWAFAHAEgLHQtADwcHCVQECh8NRRkKGQ0bBUsyHBwOHA=="));
            }
            imageView2.setTranslationX(f4 * ((Float) animatedValue2).floatValue());
        }

        public static final void f(IdentificationCowHereActivity identificationCowHereActivity, float f2, ValueAnimator valueAnimator) {
            f.f(identificationCowHereActivity, f.c.a.c.a("GQkbGEFE"));
            f.f(valueAnimator, f.c.a.c.a("BBU="));
            ImageView imageView = (ImageView) identificationCowHereActivity.f0(f.c.a.a.resetCowHere);
            float f3 = -360;
            Object animatedValue = valueAnimator.getAnimatedValue();
            if (animatedValue == null) {
                throw new NullPointerException(f.c.a.c.a("AxQeB0UXER0BBxFSBwhBEQoWAFAHAEgLHQtADwcHCVQECh8NRRkKGQ0bBUsyHBwOHA=="));
            }
            imageView.setRotation(f3 * ((Float) animatedValue).floatValue());
            ImageView imageView2 = (ImageView) identificationCowHereActivity.f0(f.c.a.a.resetCowHere);
            float f4 = -f2;
            Object animatedValue2 = valueAnimator.getAnimatedValue();
            if (animatedValue2 == null) {
                throw new NullPointerException(f.c.a.c.a("AxQeB0UXER0BBxFSBwhBEQoWAFAHAEgLHQtADwcHCVQECh8NRRkKGQ0bBUsyHBwOHA=="));
            }
            imageView2.setTranslationX(f4 * ((Float) animatedValue2).floatValue());
        }

        @Override
        public void a() {
            try {
                if (IdentificationCowHereActivity.this.O == null) {
                    ((ImageView) IdentificationCowHereActivity.this.f0(f.c.a.a.resetCowHere)).performClick();
                } else if (IdentificationCowHereActivity.this.J) {
                    IdentificationCowHereActivity.this.J = false;
                    if (!IdentificationCowHereActivity.this.isDestroyed()) {
                        Message.obtain(IdentificationCowHereActivity.this.T, 257).sendToTarget();
                    }
                } else {
                    IdentificationCowHereActivity.this.K = true;
                }
            } catch (Exception unused) {
                ((ImageView) IdentificationCowHereActivity.this.f0(f.c.a.a.resetCowHere)).performClick();
            }
        }

        @Override
        public void b() {
            ValueAnimator ofFloat = ValueAnimator.ofFloat(1.0f, 0.0f);
            final IdentificationCowHereActivity identificationCowHereActivity = IdentificationCowHereActivity.this;
            final float f2 = this.b;
            ofFloat.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
                @Override
                public final void onAnimationUpdate(ValueAnimator valueAnimator) {
                    IdentificationCowHereActivity.a.e(IdentificationCowHereActivity.this, f2, valueAnimator);
                }
            });
            ofFloat.setInterpolator(new LinearInterpolator());
            ofFloat.setDuration(600L);
            ofFloat.addListener(new C0009a(IdentificationCowHereActivity.this));
            ofFloat.start();
        }

        @Override
        public void c() {
            ((ImageView) IdentificationCowHereActivity.this.f0(f.c.a.a.resetCowHere)).setVisibility(0);
            ValueAnimator ofFloat = ValueAnimator.ofFloat(0.0f, 1.0f);
            final IdentificationCowHereActivity identificationCowHereActivity = IdentificationCowHereActivity.this;
            final float f2 = this.b;
            ofFloat.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
                @Override
                public final void onAnimationUpdate(ValueAnimator valueAnimator) {
                    IdentificationCowHereActivity.a.f(IdentificationCowHereActivity.this, f2, valueAnimator);
                }
            });
            ofFloat.setInterpolator(new OvershootInterpolator());
            ofFloat.setDuration(1200L);
            ofFloat.start();
        }

        @Override
        public void d() {
            try {
                if (((CameraView) IdentificationCowHereActivity.this.f0(f.c.a.a.cameraViewCowHere)) != null && ((CameraView) IdentificationCowHereActivity.this.f0(f.c.a.a.cameraViewCowHere)).c()) {
                    ((CameraView) IdentificationCowHereActivity.this.f0(f.c.a.a.cameraViewCowHere)).i();
                }
                if ((((CameraView) IdentificationCowHereActivity.this.f0(f.c.a.a.cameraViewCowHere)) == null || !((CameraView) IdentificationCowHereActivity.this.f0(f.c.a.a.cameraViewCowHere)).d()) && ((CameraView) IdentificationCowHereActivity.this.f0(f.c.a.a.cameraViewCowHere)) != null) {
                    ((CameraView) IdentificationCowHereActivity.this.f0(f.c.a.a.cameraViewCowHere)).g();
                }
            } catch (Exception unused) {
                if (((CameraView) IdentificationCowHereActivity.this.f0(f.c.a.a.cameraViewCowHere)) != null) {
                    ((CameraView) IdentificationCowHereActivity.this.f0(f.c.a.a.cameraViewCowHere)).g();
                }
            }
        }
    }

    public static final class b extends CameraView.b {
        public b() {
        }

        public static final void d(byte[] bArr, IdentificationCowHereActivity identificationCowHereActivity) {
            int i2;
            FileOutputStream fileOutputStream;
            Throwable th;
            f.f(bArr, f.c.a.c.a("SQUTHwQ="));
            f.f(identificationCowHereActivity, f.c.a.c.a("GQkbGEFE"));
            Bitmap decodeByteArray = BitmapFactory.decodeByteArray(bArr, 0, bArr.length);
            Bitmap f2 = f.c.a.i.b.f(decodeByteArray, 2048, 2048);
            ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
            int i3 = 98;
            if (!f.a(decodeByteArray, f2)) {
                f2.compress(Bitmap.CompressFormat.JPEG, 98, byteArrayOutputStream);
                identificationCowHereActivity.O = byteArrayOutputStream.toByteArray();
                byteArrayOutputStream.reset();
                decodeByteArray = f2;
            }
            try {
                i2 = identificationCowHereActivity.W0(bArr);
            } catch (Exception unused) {
                i2 = 0;
            }
            if (i2 != 0) {
                decodeByteArray.recycle();
                byte[] bArr2 = identificationCowHereActivity.O;
                byte[] bArr3 = identificationCowHereActivity.O;
                f.c(bArr3);
                decodeByteArray = f.c.a.i.b.i(i2, BitmapFactory.decodeByteArray(bArr2, 0, bArr3.length));
                decodeByteArray.compress(Bitmap.CompressFormat.JPEG, 98, byteArrayOutputStream);
                identificationCowHereActivity.O = byteArrayOutputStream.toByteArray();
                byteArrayOutputStream.reset();
            }
            while (true) {
                byte[] bArr4 = identificationCowHereActivity.O;
                f.c(bArr4);
                if (bArr4.length / 1024 <= 600) {
                    break;
                }
                byteArrayOutputStream.reset();
                decodeByteArray.compress(Bitmap.CompressFormat.JPEG, i3, byteArrayOutputStream);
                identificationCowHereActivity.O = byteArrayOutputStream.toByteArray();
                i3 -= 2;
            }
            byteArrayOutputStream.reset();
            decodeByteArray.recycle();
            identificationCowHereActivity.R = g.a();
            if (identificationCowHereActivity.R != null) {
                FileOutputStream fileOutputStream2 = null;
                try {
                    try {
                        fileOutputStream = new FileOutputStream(identificationCowHereActivity.R);
                    } catch (Exception unused2) {
                    }
                    try {
                        fileOutputStream.write(identificationCowHereActivity.O);
                        fileOutputStream.flush();
                        fileOutputStream.close();
                    } catch (Exception unused3) {
                        fileOutputStream2 = fileOutputStream;
                        if (fileOutputStream2 != null) {
                            fileOutputStream2.close();
                        }
                        identificationCowHereActivity.J = true;
                        if (identificationCowHereActivity.isDestroyed()) {
                            return;
                        } else {
                            return;
                        }
                    } catch (Throwable th2) {
                        th = th2;
                        if (fileOutputStream != null) {
                            try {
                                fileOutputStream.close();
                            } catch (Exception unused4) {
                            }
                        }
                        throw th;
                    }
                } catch (Exception unused5) {
                } catch (Throwable th3) {
                    fileOutputStream = null;
                    th = th3;
                }
                identificationCowHereActivity.J = true;
                if (identificationCowHereActivity.isDestroyed() || !identificationCowHereActivity.K) {
                    return;
                }
                identificationCowHereActivity.K = false;
                Message.obtain(identificationCowHereActivity.T, 257).sendToTarget();
            }
        }

        public static final void e(IdentificationCowHereActivity identificationCowHereActivity, CameraView cameraView) {
            f.f(identificationCowHereActivity, f.c.a.c.a("GQkbGEFE"));
            f.f(cameraView, f.c.a.c.a("SQITBgAGESUGDRI="));
            identificationCowHereActivity.N = true;
            cameraView.h();
        }

        public static final void f(IdentificationCowHereActivity identificationCowHereActivity) {
            f.f(identificationCowHereActivity, f.c.a.c.a("GQkbGEFE"));
            ((PhotoCowHereBtn) identificationCowHereActivity.f0(f.c.a.a.nextCowHere)).i();
            ((TextView) identificationCowHereActivity.f0(f.c.a.a.hint)).startAnimation(identificationCowHereActivity.P);
        }

        @Override
        public void a(CameraView cameraView) {
            f.f(cameraView, f.c.a.c.a("DgAfDhcVJhoKHw=="));
        }

        @Override
        public void b(CameraView cameraView) {
            f.f(cameraView, f.c.a.c.a("DgAfDhcVJhoKHw=="));
        }

        @Override
        public void c(final CameraView cameraView, final byte[] bArr) {
            f.f(cameraView, f.c.a.c.a("DgAfDhcVJhoKHw=="));
            f.f(bArr, f.c.a.c.a("CQAGCg=="));
            IdentificationCowHereActivity.this.O = bArr;
            final IdentificationCowHereActivity identificationCowHereActivity = IdentificationCowHereActivity.this;
            new Thread(new Runnable() {
                @Override
                public final void run() {
                    IdentificationCowHereActivity.b.d(bArr, identificationCowHereActivity);
                }
            }).start();
            c cVar = IdentificationCowHereActivity.this.T;
            final IdentificationCowHereActivity identificationCowHereActivity2 = IdentificationCowHereActivity.this;
            cVar.post(new Runnable() {
                @Override
                public final void run() {
                    IdentificationCowHereActivity.b.e(IdentificationCowHereActivity.this, cameraView);
                }
            });
            c cVar2 = IdentificationCowHereActivity.this.T;
            final IdentificationCowHereActivity identificationCowHereActivity3 = IdentificationCowHereActivity.this;
            cVar2.postDelayed(new Runnable() {
                @Override
                public final void run() {
                    IdentificationCowHereActivity.b.f(IdentificationCowHereActivity.this);
                }
            }, 500L);
        }
    }

    public static final class c extends Handler {
        public c(Looper looper) {
            super(looper);
        }

        @Override
        public void handleMessage(Message message) {
            f.f(message, f.c.a.c.a("ABIV"));
            super.handleMessage(message);
            IdentificationCowHereActivity identificationCowHereActivity = IdentificationCowHereActivity.this;
            if (message.what == 257) {
                identificationCowHereActivity.E = false;
                f.c.a.i.a.i(identificationCowHereActivity, R.color.transparent, true, true);
                ((RelativeLayout) identificationCowHereActivity.f0(f.c.a.a.progressCowHerelayout)).setVisibility(0);
                File file = identificationCowHereActivity.R;
                if (file == null) {
                    return;
                }
                f.c.a.i.f.a.a(f.c.a.c.a("CwARDjoQFQcKCxEtFgUOHR86BwQSHRw="), BuildConfig.FLAVOR);
                f.c.a.f.b.a aVar = identificationCowHereActivity.S;
                if (aVar == null) {
                    f.s(f.c.a.c.a("ACIdHC0RAhYmDAAcEQQHGwgEABkcATgXFxYIDwYOFw=="));
                    throw null;
                }
                String absolutePath = file.getAbsolutePath();
                f.e(absolutePath, f.c.a.c.a("DAMBBAkBBBY/CREa"));
                aVar.e(absolutePath, identificationCowHereActivity.X0());
            }
        }
    }

    public static final void Y0(final IdentificationCowHereActivity identificationCowHereActivity, View view) {
        f.f(identificationCowHereActivity, f.c.a.c.a("GQkbGEFE"));
        ((ConstraintLayout) identificationCowHereActivity.f0(f.c.a.a.failCowHerelayout)).setVisibility(8);
        ((ImageView) identificationCowHereActivity.f0(f.c.a.a.resetCowHere)).postDelayed(new Runnable() {
            @Override
            public final void run() {
                IdentificationCowHereActivity.Z0(IdentificationCowHereActivity.this);
            }
        }, 500L);
    }

    public static final void Z0(IdentificationCowHereActivity identificationCowHereActivity) {
        f.f(identificationCowHereActivity, f.c.a.c.a("GQkbGEFE"));
        ((ImageView) identificationCowHereActivity.f0(f.c.a.a.resetCowHere)).performClick();
    }

    public static final void a1(IdentificationCowHereActivity identificationCowHereActivity) {
        f.f(identificationCowHereActivity, f.c.a.c.a("GQkbGEFE"));
        identificationCowHereActivity.onBackPressed();
    }

    public static final void b1(final IdentificationCowHereActivity identificationCowHereActivity, View view) {
        f.f(identificationCowHereActivity, f.c.a.c.a("GQkbGEFE"));
        ((ConstraintLayout) identificationCowHereActivity.f0(f.c.a.a.failCowHerelayout)).setVisibility(8);
        ((ImageView) identificationCowHereActivity.f0(f.c.a.a.resetCowHere)).postDelayed(new Runnable() {
            @Override
            public final void run() {
                IdentificationCowHereActivity.c1(IdentificationCowHereActivity.this);
            }
        }, 500L);
    }

    public static final void c1(IdentificationCowHereActivity identificationCowHereActivity) {
        f.f(identificationCowHereActivity, f.c.a.c.a("GQkbGEFE"));
        ((ImageView) identificationCowHereActivity.f0(f.c.a.a.resetCowHere)).performClick();
    }

    public static final void d1(final IdentificationCowHereActivity identificationCowHereActivity, View view) {
        f.f(identificationCowHereActivity, f.c.a.c.a("GQkbGEFE"));
        if (identificationCowHereActivity.L) {
            return;
        }
        identificationCowHereActivity.J = false;
        identificationCowHereActivity.M = true;
        identificationCowHereActivity.L = true;
        if (!((CameraView) identificationCowHereActivity.f0(f.c.a.a.cameraViewCowHere)).c()) {
            ((CameraView) identificationCowHereActivity.f0(f.c.a.a.cameraViewCowHere)).e();
            return;
        }
        ((CameraView) identificationCowHereActivity.f0(f.c.a.a.cameraViewCowHere)).f();
        identificationCowHereActivity.N = false;
        if (identificationCowHereActivity.M) {
            identificationCowHereActivity.M = false;
            identificationCowHereActivity.T.postDelayed(new Runnable() {
                @Override
                public final void run() {
                    IdentificationCowHereActivity.e1(IdentificationCowHereActivity.this);
                }
            }, 500L);
        }
    }

    public static final void e1(IdentificationCowHereActivity identificationCowHereActivity) {
        f.f(identificationCowHereActivity, f.c.a.c.a("GQkbGEFE"));
        ((PhotoCowHereBtn) identificationCowHereActivity.f0(f.c.a.a.nextCowHere)).h();
        ((TextView) identificationCowHereActivity.f0(f.c.a.a.hint)).startAnimation(identificationCowHereActivity.Q);
    }

    public static final void g1(IdentificationCowHereActivity identificationCowHereActivity) {
        f.f(identificationCowHereActivity, f.c.a.c.a("GQkbGEFE"));
        ((ImageView) identificationCowHereActivity.f0(f.c.a.a.resetCowHere)).performClick();
    }

    @Override
    public void B0() {
    }

    public Void V0() {
        return null;
    }

    public final int W0(byte[] bArr) {
        int i2;
        if (bArr == null) {
            return 0;
        }
        int i3 = 0;
        while (true) {
            boolean z = true;
            if (i3 + 3 >= bArr.length) {
                break;
            }
            int i4 = i3 + 1;
            if ((bArr[i3] & 255) != 255) {
                break;
            }
            int i5 = bArr[i4] & 255;
            if (i5 != 255) {
                i4++;
                if (i5 != 1 && i5 != 216) {
                    if (i5 != 217 && i5 != 218) {
                        int f1 = f1(bArr, i4, 2, false);
                        if (f1 >= 2 && (i2 = i4 + f1) <= bArr.length) {
                            if (i5 == 225 && f1 >= 8 && f1(bArr, i4 + 2, 4, false) == 1165519206 && f1(bArr, i4 + 6, 2, false) == 0) {
                                i3 = i4 + 8;
                                int i6 = f1 - 8;
                                break;
                            }
                            i3 = i2;
                        } else {
                            break;
                        }
                    } else {
                        break;
                    }
                }
            }
            i3 = i4;
        }
        return 0;
    }

    public final boolean X0() {
        return this.H;
    }

    @Override
    public void doCowHereclick(View view) {
        f.f(view, f.c.a.c.a("GwgXHA=="));
        if (f.a(view, (ImageView) f0(f.c.a.a.closeCowHere))) {
            onBackPressed();
        }
    }

    @Override
    public void e(FileResponseCowHereDto fileResponseCowHereDto) {
        f.f(fileResponseCowHereDto, f.c.a.c.a("CRUdLQwYFQAaCwYXFh4="));
        Intent intent = new Intent();
        intent.putExtra(f.c.a.c.a("GBMe"), fileResponseCowHereDto.getCowHere_peso_url());
        setResult(-1, intent);
        finish();
    }

    @Override
    public void f(IdentifiCowHereResponseDto identifiCowHereResponseDto, String str) {
        f.f(identifiCowHereResponseDto, f.c.a.c.a("CRUdKAo3HwQnDRcXFgI="));
        f.f(str, f.c.a.c.a("GBMe"));
        if (identifiCowHereResponseDto.getCowHereStatus() == 1) {
            f.c.a.i.f.a.a(f.c.a.c.a("CwARDjoQFQcKCxEtAAMF"), BuildConfig.FLAVOR);
            this.I = str;
            this.F = true;
            ((ConstraintLayout) f0(f.c.a.a.successCowHerelayout)).setVisibility(0);
            ((ConstraintLayout) f0(f.c.a.a.successCowHerelayout)).postDelayed(new Runnable() {
                @Override
                public final void run() {
                    IdentificationCowHereActivity.a1(IdentificationCowHereActivity.this);
                }
            }, 1500L);
        } else {
            f.c.a.i.f.a.a(f.c.a.c.a("CwARDjoQFQcKCxEtAAMF"), BuildConfig.FLAVOR);
            ((TextView) f0(f.c.a.a.failCowHerenext)).setOnClickListener(new View.OnClickListener() {
                @Override
                public final void onClick(View view) {
                    IdentificationCowHereActivity.b1(IdentificationCowHereActivity.this, view);
                }
            });
            ((ConstraintLayout) f0(f.c.a.a.failCowHerelayout)).setVisibility(0);
            ((RelativeLayout) f0(f.c.a.a.progressCowHerelayout)).setVisibility(8);
        }
        this.E = true;
    }

    @Override
    public View f0(int i2) {
        Map<Integer, View> map = this.V;
        View view = map.get(Integer.valueOf(i2));
        if (view != null) {
            return view;
        }
        View findViewById = findViewById(i2);
        if (findViewById == null) {
            return null;
        }
        map.put(Integer.valueOf(i2), findViewById);
        return findViewById;
    }

    public final int f1(byte[] bArr, int i2, int i3, boolean z) {
        int i4;
        if (z) {
            i2 += i3 - 1;
            i4 = -1;
        } else {
            i4 = 1;
        }
        int i5 = 0;
        while (true) {
            int i6 = i3 - 1;
            if (i3 <= 0) {
                return i5;
            }
            i5 = (bArr[i2] & 255) | (i5 << 8);
            i2 += i4;
            i3 = i6;
        }
    }

    @Override
    public int h0() {
        return com.pesohere.android.R.layout.b1;
    }

    @Override
    public int i0() {
        return R.color.transparent;
    }

    @Override
    public String j0() {
        return (String) V0();
    }

    @Override
    public void m0() {
        this.H = getIntent().getBooleanExtra(f.c.a.c.a("Ag8eEjEVGxY/AAoGCg=="), false);
        this.S = new f.c.a.f.b.a(this);
    }

    @Override
    public void n0(Bundle bundle) {
        ((CameraView) f0(f.c.a.a.cameraViewCowHere)).setFacing(1);
        ((CameraView) f0(f.c.a.a.cameraViewCowHere)).a(this.U);
        ((CameraView) f0(f.c.a.a.cameraViewCowHere)).setUnlockFocus(false);
        ((PhotoCowHereBtn) f0(f.c.a.a.nextCowHere)).setOnCowHereStateChangeListener(new a(e.c(75) * 1.5f));
        ((ImageView) f0(f.c.a.a.resetCowHere)).setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                IdentificationCowHereActivity.d1(IdentificationCowHereActivity.this, view);
            }
        });
        this.P.setDuration(800L);
        this.P.setFillAfter(true);
        this.Q.setDuration(800L);
        this.Q.setFillAfter(true);
    }

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

    @Override
    public void onBackPressed() {
        Intent intent = new Intent();
        if (this.F) {
            intent.putExtra(f.c.a.c.a("HhUTHxAH"), f.c.a.c.a("XA=="));
            intent.putExtra(f.c.a.c.a("GBMe"), this.I);
            setResult(-1, intent);
            this.I = BuildConfig.FLAVOR;
        }
        if (this.E) {
            try {
                super.onBackPressed();
            } catch (Exception unused) {
            }
        }
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        this.T.removeMessages(257);
    }

    @Override
    public void onPause() {
        super.onPause();
        f.c.a.i.f.a.a(f.c.a.c.a("CwARDjoQFQcKCxEtFgUOHR86BQUaGw=="), BuildConfig.FLAVOR);
        ((CameraView) f0(f.c.a.a.cameraViewCowHere)).g();
    }

    @Override
    public void onResume() {
        super.onResume();
        if (this.G) {
            f.c.a.i.f.a.a(f.c.a.c.a("CwARDjoQFQcKCxEtFgUOHR86HR4="), BuildConfig.FLAVOR);
        }
        this.G = true;
        System.currentTimeMillis();
        if (((ConstraintLayout) f0(f.c.a.a.successCowHerelayout)).getVisibility() == 8 && ((ConstraintLayout) f0(f.c.a.a.failCowHerelayout)).getVisibility() == 8 && ((RelativeLayout) f0(f.c.a.a.progressCowHerelayout)).getVisibility() == 8) {
            ((CameraView) f0(f.c.a.a.cameraViewCowHere)).e();
        }
    }

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

    @Override
    public void q() {
    }

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

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

    @Override
    public void v(ErrorCowHereDto errorCowHereDto) {
        f.f(errorCowHereDto, f.c.a.c.a("CBMABBc="));
        ((TextView) f0(f.c.a.a.failCowHerenext)).setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                IdentificationCowHereActivity.Y0(IdentificationCowHereActivity.this, view);
            }
        });
        ((ConstraintLayout) f0(f.c.a.a.failCowHerelayout)).setVisibility(0);
        ((RelativeLayout) f0(f.c.a.a.progressCowHerelayout)).setVisibility(8);
        this.E = true;
    }

    @Override
    public void w(ErrorCowHereDto errorCowHereDto) {
        f.f(errorCowHereDto, f.c.a.c.a("CBMABBc="));
        ((RelativeLayout) f0(f.c.a.a.progressCowHerelayout)).setVisibility(8);
        ((ImageView) f0(f.c.a.a.resetCowHere)).postDelayed(new Runnable() {
            @Override
            public final void run() {
                IdentificationCowHereActivity.g1(IdentificationCowHereActivity.this);
            }
        }, 500L);
        this.E = true;
    }
}