导航菜单

页面标题

页面副标题

Pesohere v1.0.5 - ResetPasswordCowHereActivity.java 源代码

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

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


package com.cow.here.uicowhereanddto.acowherectivity;

import android.content.Intent;
import android.graphics.Typeface;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.text.Editable;
import android.text.TextWatcher;
import android.text.method.HideReturnsTransformationMethod;
import android.text.method.PasswordTransformationMethod;
import android.view.View;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.TextView;
import com.cow.here.netcowherework.dcowhereto.responsecowhere.ErrorCowHereDto;
import com.cow.here.netcowherework.dcowhereto.responsecowhere.SendCodeCowHereResponseDto;
import com.cow.here.uicowhereanddto.acowherectivity.ResetPasswordCowHereActivity;
import com.cow.here.uicowhereanddto.vcowhereiews.ClearEditCowHereText;
import com.pesohere.android.R;
import com.wang.avi.BuildConfig;
import f.c.a.f.a.l;
import f.c.a.f.b.f;
import f.c.a.h.c.j;
import f.c.a.i.o;
import i.x.n;
import java.util.LinkedHashMap;
import java.util.Map;

public final class ResetPasswordCowHereActivity extends j implements l {
    public f E;
    public CountDownTimer F;
    public Map<Integer, View> G = new LinkedHashMap();

    public static final class a implements ClearEditCowHereText.a {
        public a() {
        }

        @Override
        public boolean a(String str) {
            i.u.b.f.f(str, f.c.a.c.a("GQQKHw=="));
            boolean c2 = f.c.a.i.c.c(str);
            ResetPasswordCowHereActivity resetPasswordCowHereActivity = ResetPasswordCowHereActivity.this;
            if (c2) {
                ((TextView) resetPasswordCowHereActivity.f0(f.c.a.a.mobileInputCowHereError)).setVisibility(8);
            }
            return c2;
        }

        @Override
        public void b(String str) {
            i.u.b.f.f(str, f.c.a.c.a("GQQKHw=="));
            ((TextView) ResetPasswordCowHereActivity.this.f0(f.c.a.a.mobileInputCowHereError)).setVisibility(0);
        }
    }

    public static final class b implements ClearEditCowHereText.a {
        public b() {
        }

        @Override
        public boolean a(String str) {
            i.u.b.f.f(str, f.c.a.c.a("GQQKHw=="));
            boolean z = str.length() == 6;
            ResetPasswordCowHereActivity resetPasswordCowHereActivity = ResetPasswordCowHereActivity.this;
            if (z) {
                ((TextView) resetPasswordCowHereActivity.f0(f.c.a.a.smsInputCowHere1Error)).setVisibility(8);
            }
            return z;
        }

        @Override
        public void b(String str) {
            i.u.b.f.f(str, f.c.a.c.a("GQQKHw=="));
            ((TextView) ResetPasswordCowHereActivity.this.f0(f.c.a.a.smsInputCowHere1Error)).setVisibility(0);
        }
    }

    public static final class c implements ClearEditCowHereText.a {
        public c() {
        }

        @Override
        public boolean a(String str) {
            i.u.b.f.f(str, f.c.a.c.a("GQQKHw=="));
            boolean b = f.c.a.i.c.b(str);
            ResetPasswordCowHereActivity resetPasswordCowHereActivity = ResetPasswordCowHereActivity.this;
            if (b) {
                ((TextView) resetPasswordCowHereActivity.f0(f.c.a.a.pwdInpuCowHereError)).setTextColor(d.i.f.a.d(resetPasswordCowHereActivity, R.color.qe));
            }
            return b;
        }

        @Override
        public void b(String str) {
            i.u.b.f.f(str, f.c.a.c.a("GQQKHw=="));
            ((TextView) ResetPasswordCowHereActivity.this.f0(f.c.a.a.pwdInpuCowHereError)).setTextColor(d.i.f.a.d(ResetPasswordCowHereActivity.this, R.color.aq));
        }
    }

    public static final class d implements TextWatcher {
        public d() {
        }

        @Override
        public void afterTextChanged(Editable editable) {
            i.u.b.f.f(editable, f.c.a.c.a("CAUbHwQWHBY="));
            if (editable.length() == 11 && editable == ((ClearEditCowHereText) ResetPasswordCowHereActivity.this.f0(f.c.a.a.registerPhoneCowHereEt)).getEditableText()) {
                ((ClearEditCowHereText) ResetPasswordCowHereActivity.this.f0(f.c.a.a.registerSmsCowHereEt)).requestFocus();
            } else if (editable.length() == 6 && editable == ((ClearEditCowHereText) ResetPasswordCowHereActivity.this.f0(f.c.a.a.registerSmsCowHereEt)).getEditableText()) {
                ((ClearEditCowHereText) ResetPasswordCowHereActivity.this.f0(f.c.a.a.registerPwdCowHereEt)).requestFocus();
            }
        }

        @Override
        public void beforeTextChanged(CharSequence charSequence, int i2, int i3, int i4) {
        }

        @Override
        public void onTextChanged(CharSequence charSequence, int i2, int i3, int i4) {
            TextView textView = (TextView) ResetPasswordCowHereActivity.this.f0(f.c.a.a.registerClickCowHereTv);
            if (textView == null) {
                return;
            }
            i.u.b.f.e(((ClearEditCowHereText) ResetPasswordCowHereActivity.this.f0(f.c.a.a.registerPhoneCowHereEt)).getText(), f.c.a.c.a("HwQVAhYAFQE/AAocAC4OBSMABhU2G0YRFx0Z"));
            boolean z = true;
            if (!n.k(r2)) {
                i.u.b.f.e(((ClearEditCowHereText) ResetPasswordCowHereActivity.this.f0(f.c.a.a.registerSmsCowHereEt)).getText(), f.c.a.c.a("HwQVAhYAFQE8BRYxChopFxkAMQRdGw0dBg=="));
                if (!n.k(r2)) {
                    i.u.b.f.e(((ClearEditCowHereText) ResetPasswordCowHereActivity.this.f0(f.c.a.a.registerPwdCowHereEt)).getText(), f.c.a.c.a("HwQVAhYAFQE/HwExChopFxkAMQRdGw0dBg=="));
                }
            }
            z = false;
            textView.setEnabled(z);
        }
    }

    public static final class e extends CountDownTimer {
        public e(long j2) {
            super(j2, 1000L);
        }

        @Override
        public void onFinish() {
            ((TextView) ResetPasswordCowHereActivity.this.f0(f.c.a.a.registerSmsCowHereTv)).setEnabled(true);
            ((TextView) ResetPasswordCowHereActivity.this.f0(f.c.a.a.registerSmsCowHereTv)).setText(R.string.logincowheresms_getretry);
        }

        @Override
        public void onTick(long j2) {
            ((TextView) ResetPasswordCowHereActivity.this.f0(f.c.a.a.registerSmsCowHereTv)).setEnabled(false);
            ((TextView) ResetPasswordCowHereActivity.this.f0(f.c.a.a.registerSmsCowHereTv)).setText(ResetPasswordCowHereActivity.this.getString(R.string.logincowheresms_count_downtime, new Object[]{Long.valueOf(j2 / 1000)}));
        }
    }

    public static final void H0(ResetPasswordCowHereActivity resetPasswordCowHereActivity, CompoundButton compoundButton, boolean z) {
        i.u.b.f.f(resetPasswordCowHereActivity, f.c.a.c.a("GQkbGEFE"));
        if (z) {
            ((ClearEditCowHereText) resetPasswordCowHereActivity.f0(f.c.a.a.registerPwdCowHereEt)).setTransformationMethod(HideReturnsTransformationMethod.getInstance());
        } else {
            ((ClearEditCowHereText) resetPasswordCowHereActivity.f0(f.c.a.a.registerPwdCowHereEt)).setTransformationMethod(PasswordTransformationMethod.getInstance());
        }
        ((ClearEditCowHereText) resetPasswordCowHereActivity.f0(f.c.a.a.registerPwdCowHereEt)).setSelection(((ClearEditCowHereText) resetPasswordCowHereActivity.f0(f.c.a.a.registerPwdCowHereEt)).length());
    }

    @Override
    public void B0() {
    }

    @Override
    public void a(SendCodeCowHereResponseDto sendCodeCowHereResponseDto) {
        i.u.b.f.f(sendCodeCowHereResponseDto, f.c.a.c.a("CRUdKAo3HwQnDRcXFgI="));
        e eVar = new e(sendCodeCowHereResponseDto.getCowHereSleep() * 1000);
        this.F = eVar;
        if (eVar == null) {
            return;
        }
        eVar.start();
    }

    @Override
    public void d(ErrorCowHereDto errorCowHereDto) {
        i.u.b.f.f(errorCowHereDto, f.c.a.c.a("CBMABBc="));
    }

    @Override
    public void doCowHereclick(View view) {
        f fVar;
        i.u.b.f.f(view, f.c.a.c.a("GwgXHA=="));
        boolean z = false;
        if (i.u.b.f.a(view, (TextView) f0(f.c.a.a.registerSmsCowHereTv))) {
            String obj = ((ClearEditCowHereText) f0(f.c.a.a.registerPhoneCowHereEt)).getText().toString();
            if (!f.c.a.i.c.c(obj)) {
                ((TextView) f0(f.c.a.a.mobileInputCowHereError)).setVisibility(0);
                return;
            }
            f fVar2 = this.E;
            if (fVar2 != null) {
                fVar2.f(obj);
            }
            o.b(this).d(f.c.a.c.a("HgQcD0UHBRAMDRYB"), 1000);
            return;
        }
        if (i.u.b.f.a(view, (TextView) f0(f.c.a.a.registerClickCowHereTv))) {
            String obj2 = ((ClearEditCowHereText) f0(f.c.a.a.registerPhoneCowHereEt)).getText().toString();
            String obj3 = ((ClearEditCowHereText) f0(f.c.a.a.registerSmsCowHereEt)).getText().toString();
            String obj4 = ((ClearEditCowHereText) f0(f.c.a.a.registerPwdCowHereEt)).getText().toString();
            boolean z2 = true;
            if (f.c.a.i.c.c(obj2)) {
                ((TextView) f0(f.c.a.a.mobileInputCowHereError)).setVisibility(8);
            } else {
                ((TextView) f0(f.c.a.a.mobileInputCowHereError)).setVisibility(0);
                z2 = false;
            }
            if (obj3.length() != 6) {
                ((TextView) f0(f.c.a.a.smsInputCowHere1Error)).setVisibility(0);
                z2 = false;
            } else {
                ((TextView) f0(f.c.a.a.smsInputCowHere1Error)).setVisibility(8);
            }
            if (f.c.a.i.c.b(obj4)) {
                ((ClearEditCowHereText) f0(f.c.a.a.registerPwdCowHereEt)).setBackgroundResource(R.drawable.en);
                ((TextView) f0(f.c.a.a.pwdInpuCowHereError)).setTextColor(d.i.f.a.d(this, R.color.at));
                z = z2;
            } else {
                ((TextView) f0(f.c.a.a.pwdInpuCowHereError)).setTextColor(d.i.f.a.d(this, R.color.aq));
                ((ClearEditCowHereText) f0(f.c.a.a.registerPwdCowHereEt)).setBackgroundResource(R.drawable.el);
            }
            if (z && (fVar = this.E) != null) {
                fVar.e(obj2, ((ClearEditCowHereText) f0(f.c.a.a.registerSmsCowHereEt)).getText().toString(), obj4);
            }
        }
    }

    @Override
    public View f0(int i2) {
        Map<Integer, View> map = this.G;
        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;
    }

    @Override
    public void g() {
        f.c.a.h.c.l.b(this, getString(R.string.changecowherepwd_success));
        Intent intent = new Intent(this, (Class<?>) MoreDataCowHereActivity.class);
        intent.setFlags(268468224);
        startActivity(intent);
        finish();
    }

    @Override
    public int h0() {
        return R.layout.b6;
    }

    @Override
    public void i(ErrorCowHereDto errorCowHereDto) {
        i.u.b.f.f(errorCowHereDto, f.c.a.c.a("CBMABBc="));
    }

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

    @Override
    public String j0() {
        String string = getString(R.string.changecowherepwd_title);
        i.u.b.f.e(string, f.c.a.c.a("CgQGOBEGGR0IQDdcFhkTGwUCWhMbDgYCFwYCFhoOFxEABAs3ERsRAQRb"));
        return string;
    }

    @Override
    public void m0() {
        this.E = new f(this);
    }

    @Override
    public void n0(Bundle bundle) {
        d dVar = new d();
        ((CheckBox) f0(f.c.a.a.eyeCowHereCk)).setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
            @Override
            public final void onCheckedChanged(CompoundButton compoundButton, boolean z) {
                ResetPasswordCowHereActivity.H0(ResetPasswordCowHereActivity.this, compoundButton, z);
            }
        });
        ((ClearEditCowHereText) f0(f.c.a.a.registerPhoneCowHereEt)).addTextChangedListener(dVar);
        ((ClearEditCowHereText) f0(f.c.a.a.registerSmsCowHereEt)).addTextChangedListener(dVar);
        ((ClearEditCowHereText) f0(f.c.a.a.registerPwdCowHereEt)).addTextChangedListener(dVar);
        ((ClearEditCowHereText) f0(f.c.a.a.registerPhoneCowHereEt)).setOnCheckInputListener(new a());
        ((ClearEditCowHereText) f0(f.c.a.a.registerSmsCowHereEt)).setOnCheckInputListener(new b());
        ((ClearEditCowHereText) f0(f.c.a.a.registerPwdCowHereEt)).setOnCheckInputListener(new c());
        Intent intent = getIntent();
        ClearEditCowHereText clearEditCowHereText = (ClearEditCowHereText) f0(f.c.a.a.registerPhoneCowHereEt);
        Editable text = clearEditCowHereText.getText();
        String stringExtra = intent.getStringExtra(f.c.a.c.a("HQkdBQA="));
        if (stringExtra == null) {
            stringExtra = BuildConfig.FLAVOR;
        }
        text.append((CharSequence) stringExtra);
        clearEditCowHereText.setSelection(clearEditCowHereText.getText().length());
        if (clearEditCowHereText.getText().length() == 11) {
            ((ClearEditCowHereText) f0(f.c.a.a.registerSmsCowHereEt)).requestFocus();
        } else {
            clearEditCowHereText.requestFocus();
        }
        String b2 = f.c.a.e.a.c().b();
        if (!(b2 == null || n.k(b2))) {
            ClearEditCowHereText clearEditCowHereText2 = (ClearEditCowHereText) f0(f.c.a.a.registerPhoneCowHereEt);
            clearEditCowHereText2.getText().append((CharSequence) f.c.a.e.a.c().e());
            clearEditCowHereText2.setEnabled(false);
        }
        ((ClearEditCowHereText) f0(f.c.a.a.registerPwdCowHereEt)).setTypeface(Typeface.DEFAULT);
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        CountDownTimer countDownTimer = this.F;
        if (countDownTimer == null) {
            return;
        }
        countDownTimer.cancel();
    }

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

    @Override
    public void q() {
        f fVar = this.E;
        if (fVar == null) {
            return;
        }
        fVar.c();
    }

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