导航菜单

页面标题

页面副标题

Uptodown App Store v6.80 - PasswordEditActivity.java 源代码

正在查看: Uptodown App Store v6.80 应用的 PasswordEditActivity.java JAVA 源代码文件

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


package com.uptodown.activities;

import N1.k;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.activity.ComponentActivity;
import androidx.core.content.ContextCompat;
import androidx.lifecycle.LifecycleOwnerKt;
import androidx.lifecycle.ViewModelLazy;
import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelStore;
import androidx.lifecycle.viewmodel.CreationExtras;
import c2.C0578e0;
import com.mbridge.msdk.playercommon.exoplayer2.extractor.ts.TsExtractor;
import com.uptodown.activities.PasswordEditActivity;
import kotlin.jvm.internal.AbstractC1009g;

public final class PasswordEditActivity extends AbstractC0740a {
    public static final a L = new a(null);
    private final R2.g J = new ViewModelLazy(kotlin.jvm.internal.D.b(C0761w.class), new f(this), new e(this), new g(null, this));
    private final R2.g K = R2.h.a(new d3.a() {
        @Override
        public final Object invoke() {
            C0578e0 j32;
            j32 = PasswordEditActivity.j3(PasswordEditActivity.this);
            return j32;
        }
    });

    public static final class a {
        public a(AbstractC1009g abstractC1009g) {
            this();
        }

        private a() {
        }
    }

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

        @Override
        public void afterTextChanged(Editable editable) {
        }

        @Override
        public void beforeTextChanged(CharSequence charSequence, int i, int i4, int i5) {
        }

        @Override
        public void onTextChanged(CharSequence charSequence, int i, int i4, int i5) {
            if (charSequence != null) {
                PasswordEditActivity.this.r3(charSequence.toString());
            }
        }
    }

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

        @Override
        public void afterTextChanged(Editable editable) {
        }

        @Override
        public void beforeTextChanged(CharSequence charSequence, int i, int i4, int i5) {
        }

        @Override
        public void onTextChanged(CharSequence charSequence, int i, int i4, int i5) {
            if (charSequence != null) {
                PasswordEditActivity passwordEditActivity = PasswordEditActivity.this;
                passwordEditActivity.r3(passwordEditActivity.k3().c.getText().toString());
            }
        }
    }

    static final class d extends kotlin.coroutines.jvm.internal.l implements d3.p {
        int a;

        static final class a implements r3.f {
            final PasswordEditActivity a;

            static final class C0177a extends kotlin.coroutines.jvm.internal.d {
                Object a;
                Object b;
                int d;

                C0177a(V2.d dVar) {
                    super(dVar);
                }

                @Override
                public final Object invokeSuspend(Object obj) {
                    this.b = obj;
                    this.d |= Integer.MIN_VALUE;
                    return a.this.emit(null, this);
                }
            }

            a(PasswordEditActivity passwordEditActivity) {
                this.a = passwordEditActivity;
            }

            public final java.lang.Object emit(u2.H r5, V2.d r6) {
                throw new UnsupportedOperationException("Method not decompiled: com.uptodown.activities.PasswordEditActivity.d.a.emit(u2.H, V2.d):java.lang.Object");
            }
        }

        d(V2.d dVar) {
            super(2, dVar);
        }

        @Override
        public final V2.d create(Object obj, V2.d dVar) {
            return PasswordEditActivity.this.new d(dVar);
        }

        @Override
        public final Object invokeSuspend(Object obj) {
            Object c = W2.b.c();
            int i = this.a;
            if (i == 0) {
                R2.n.b(obj);
                r3.I c4 = PasswordEditActivity.this.l3().c();
                a aVar = new a(PasswordEditActivity.this);
                this.a = 1;
                if (c4.collect(aVar, this) == c) {
                    return c;
                }
            } else {
                if (i != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                R2.n.b(obj);
            }
            throw new R2.d();
        }

        @Override
        public final Object invoke(o3.J j, V2.d dVar) {
            return ((d) create(j, dVar)).invokeSuspend(R2.s.a);
        }
    }

    public static final class e extends kotlin.jvm.internal.n implements d3.a {
        final ComponentActivity a;

        public e(ComponentActivity componentActivity) {
            super(0);
            this.a = componentActivity;
        }

        @Override
        public final ViewModelProvider.Factory invoke() {
            return this.a.getDefaultViewModelProviderFactory();
        }
    }

    public static final class f extends kotlin.jvm.internal.n implements d3.a {
        final ComponentActivity a;

        public f(ComponentActivity componentActivity) {
            super(0);
            this.a = componentActivity;
        }

        @Override
        public final ViewModelStore invoke() {
            return this.a.getViewModelStore();
        }
    }

    public static final class g extends kotlin.jvm.internal.n implements d3.a {
        final d3.a a;
        final ComponentActivity b;

        public g(d3.a aVar, ComponentActivity componentActivity) {
            super(0);
            this.a = aVar;
            this.b = componentActivity;
        }

        @Override
        public final CreationExtras invoke() {
            CreationExtras creationExtras;
            d3.a aVar = this.a;
            return (aVar == null || (creationExtras = (CreationExtras) aVar.invoke()) == null) ? this.b.getDefaultViewModelCreationExtras() : creationExtras;
        }
    }

    public static final C0578e0 j3(PasswordEditActivity passwordEditActivity) {
        return C0578e0.c(passwordEditActivity.getLayoutInflater());
    }

    public final C0578e0 k3() {
        return (C0578e0) this.K.getValue();
    }

    public final C0761w l3() {
        return (C0761w) this.J.getValue();
    }

    private final void m3() {
        setContentView(k3().getRoot());
        Drawable drawable = ContextCompat.getDrawable(this, N1.e.c);
        if (drawable != null) {
            k3().g.setNavigationIcon(drawable);
            k3().g.setNavigationContentDescription(getString(2131951721));
            k3().g.setNavigationOnClickListener(new View.OnClickListener() {
                @Override
                public final void onClick(View view) {
                    PasswordEditActivity.n3(PasswordEditActivity.this, view);
                }
            });
        }
        TextView textView = k3().l;
        k.a aVar = N1.k.g;
        textView.setTypeface(aVar.w());
        k3().c.setTypeface(aVar.x());
        k3().b.setTypeface(aVar.x());
        k3().k.setTypeface(aVar.w());
        k3().j.setTypeface(aVar.x());
        k3().i.setTypeface(aVar.x());
        k3().h.setTypeface(aVar.x());
        k3().e.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                PasswordEditActivity.o3(PasswordEditActivity.this, view);
            }
        });
        k3().d.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                PasswordEditActivity.p3(PasswordEditActivity.this, view);
            }
        });
        k3().c.addTextChangedListener(new b());
        k3().b.addTextChangedListener(new c());
        k3().k.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                PasswordEditActivity.q3(PasswordEditActivity.this, view);
            }
        });
    }

    public static final void n3(PasswordEditActivity passwordEditActivity, View view) {
        passwordEditActivity.getOnBackPressedDispatcher().onBackPressed();
    }

    public static final void o3(PasswordEditActivity passwordEditActivity, View view) {
        EditText etPasswordEdit = passwordEditActivity.k3().c;
        kotlin.jvm.internal.m.d(etPasswordEdit, "etPasswordEdit");
        ImageView ivPasswordEdit = passwordEditActivity.k3().e;
        kotlin.jvm.internal.m.d(ivPasswordEdit, "ivPasswordEdit");
        passwordEditActivity.s3(etPasswordEdit, ivPasswordEdit);
    }

    public static final void p3(PasswordEditActivity passwordEditActivity, View view) {
        EditText etConfirmPasswordEdit = passwordEditActivity.k3().b;
        kotlin.jvm.internal.m.d(etConfirmPasswordEdit, "etConfirmPasswordEdit");
        ImageView ivConfirmPasswordEdit = passwordEditActivity.k3().d;
        kotlin.jvm.internal.m.d(ivConfirmPasswordEdit, "ivConfirmPasswordEdit");
        passwordEditActivity.s3(etConfirmPasswordEdit, ivConfirmPasswordEdit);
    }

    public static final void q3(PasswordEditActivity passwordEditActivity, View view) {
        N1.k.g.d(passwordEditActivity, passwordEditActivity.k3().c);
        if (passwordEditActivity.k3().c.getText().toString().length() == 0 || passwordEditActivity.k3().b.getText().toString().length() == 0) {
            String string = passwordEditActivity.getString(2131952004);
            kotlin.jvm.internal.m.d(string, "getString(...)");
            passwordEditActivity.r0(string);
            return;
        }
        if (passwordEditActivity.k3().c.getText().toString().length() < 6) {
            String string2 = passwordEditActivity.getString(2131952820);
            kotlin.jvm.internal.m.d(string2, "getString(...)");
            passwordEditActivity.r0(string2);
        } else if (passwordEditActivity.k3().c.getText().toString().length() > 99) {
            String string3 = passwordEditActivity.getString(2131952818);
            kotlin.jvm.internal.m.d(string3, "getString(...)");
            passwordEditActivity.r0(string3);
        } else {
            if (kotlin.jvm.internal.m.a(passwordEditActivity.k3().c.getText().toString(), passwordEditActivity.k3().b.getText().toString())) {
                passwordEditActivity.l3().b(passwordEditActivity, passwordEditActivity.k3().c.getText().toString(), passwordEditActivity.k3().b.getText().toString());
                return;
            }
            String string4 = passwordEditActivity.getString(2131952480);
            kotlin.jvm.internal.m.d(string4, "getString(...)");
            passwordEditActivity.r0(string4);
        }
    }

    public final void r3(String str) {
        if (str.length() <= 0 || str.length() < 6) {
            k3().j.setCompoundDrawablesWithIntrinsicBounds(ContextCompat.getDrawable(this, 2131231553), (Drawable) null, (Drawable) null, (Drawable) null);
        } else {
            k3().j.setCompoundDrawablesWithIntrinsicBounds(ContextCompat.getDrawable(this, 2131231408), (Drawable) null, (Drawable) null, (Drawable) null);
        }
        if (str.length() <= 0 || str.length() > 99) {
            k3().i.setCompoundDrawablesWithIntrinsicBounds(ContextCompat.getDrawable(this, 2131231553), (Drawable) null, (Drawable) null, (Drawable) null);
        } else {
            k3().i.setCompoundDrawablesWithIntrinsicBounds(ContextCompat.getDrawable(this, 2131231408), (Drawable) null, (Drawable) null, (Drawable) null);
        }
        if (kotlin.jvm.internal.m.a(str, k3().b.getText().toString())) {
            k3().h.setCompoundDrawablesWithIntrinsicBounds(ContextCompat.getDrawable(this, 2131231408), (Drawable) null, (Drawable) null, (Drawable) null);
        } else {
            k3().h.setCompoundDrawablesWithIntrinsicBounds(ContextCompat.getDrawable(this, 2131231553), (Drawable) null, (Drawable) null, (Drawable) null);
        }
    }

    private final void s3(EditText editText, ImageView imageView) {
        if (editText.getInputType() == 129) {
            editText.setInputType(145);
            imageView.setImageDrawable(ContextCompat.getDrawable(this, 2131231489));
            editText.setSelection(editText.length());
        } else {
            editText.setInputType(TsExtractor.TS_STREAM_TYPE_AC3);
            imageView.setImageDrawable(ContextCompat.getDrawable(this, 2131231488));
            editText.setSelection(editText.length());
        }
    }

    @Override
    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(k3().getRoot());
        m3();
        o3.g.d(LifecycleOwnerKt.getLifecycleScope(this), o3.Y.c(), (o3.L) null, new d(null), 2, (Object) null);
    }
}