导航菜单

页面标题

页面副标题

OVO v3.139.0 - SelfieGuideFragment.java 源代码

正在查看: OVO v3.139.0 应用的 SelfieGuideFragment.java JAVA 源代码文件

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


package ovo.id.kyc.liveness.ui.presentation.fragment;

import android.content.Context;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import androidx.activity.OnBackPressedDispatcher;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.AppCompatImageView;
import androidx.databinding.ViewDataBinding;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.HasDefaultViewModelProviderFactory;
import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.ViewModelLazy;
import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelStore;
import androidx.lifecycle.ViewModelStoreOwner;
import java.util.HashMap;
import kotlin.Metadata;
import o.i.Function110;
import o.i.Function23;
import o.i.a8c;
import o.i.aj8;
import o.i.alb;
import o.i.aud;
import o.i.bud;
import o.i.c7g;
import o.i.cud;
import o.i.ev2;
import o.i.f17;
import o.i.fv2;
import o.i.fxa;
import o.i.gzc;
import o.i.h9c;
import o.i.hna;
import o.i.im8;
import o.i.ksd;
import o.i.l6c;
import o.i.lc2;
import o.i.m2f;
import o.i.mg4;
import o.i.nca;
import o.i.ne;
import o.i.np2;
import o.i.oye;
import o.i.p1g;
import o.i.pw5;
import o.i.r89;
import o.i.rud;
import o.i.s4c;
import o.i.sh2;
import o.i.shc;
import o.i.tl1;
import o.i.ua8;
import o.i.uyc;
import o.i.v11;
import o.i.vk7;
import o.i.vuc;
import o.i.vx0;
import o.i.y0c;
import o.i.yp8;
import o.i.zs4;
import o.i.zs5;
import o.i.zu5;
import ovo.id.base.BaseFragment;

@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0000\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u0002\u0010\u0003¨\u0006\u0004"}, d2 = {"Lovo/id/kyc/liveness/ui/presentation/fragment/SelfieGuideFragment;", "Lovo/id/base/BaseFragment;", "<init>", "()V", "upgrade_release"}, k = 1, mv = {1, 8, 0})
public final class SelfieGuideFragment extends BaseFragment {
    public static final int j = 0;
    public ViewModelProvider.Factory e;
    public hna f;
    public final oye g = im8.b(new a());
    public final ViewModelLazy h;
    public final ViewModelLazy i;

    public static final class a extends ua8 implements zu5<aud> {
        public a() {
            super(0);
        }

        public final Object invoke() {
            Context requireContext = SelfieGuideFragment.this.requireContext();
            vk7.e(requireContext, "requireContext()");
            return new aud(requireContext);
        }
    }

    public static final class b extends nca {
        public final AppCompatActivity e;

        public b(AppCompatActivity appCompatActivity) {
            super(true);
            this.e = appCompatActivity;
        }

        public final void d() {
            int i = SelfieGuideFragment.j;
            SelfieGuideFragment selfieGuideFragment = SelfieGuideFragment.this;
            cud Z = selfieGuideFragment.Z();
            String string = this.e.getString(h9c.ovo_kyc_selfie_guide_title);
            vk7.e(string, "getString(R.string.ovo_kyc_selfie_guide_title)");
            Z.getClass();
            Z.p.setValue(new c7g("ekyc_selfie_guide_page", "BACK", r89.x(new fxa[]{new fxa("TITLE", string)})));
            f(false);
            selfieGuideFragment.c0().x("");
        }
    }

    public static final class c extends ua8 implements Function23<Drawable, Drawable, p1g> {
        public c() {
            super(2);
        }

        public final Object invoke(Object obj, Object obj2) {
            Drawable drawable = (Drawable) obj;
            vk7.f((Drawable) obj2, "<anonymous parameter 1>");
            SelfieGuideFragment selfieGuideFragment = SelfieGuideFragment.this;
            hna hnaVar = selfieGuideFragment.f;
            if (hnaVar == null) {
                vk7.m("binding");
                throw null;
            }
            hnaVar.x.setVisibility(8);
            hna hnaVar2 = selfieGuideFragment.f;
            if (hnaVar2 == null) {
                vk7.m("binding");
                throw null;
            }
            AppCompatImageView appCompatImageView = hnaVar2.f511v;
            vk7.e(appCompatImageView, "binding.imgPhone");
            f17.h(appCompatImageView, drawable, null, null, null, null, false, null, false);
            return p1g.a;
        }
    }

    public static final class d extends ua8 implements Function110<Integer, p1g> {
        public d() {
            super(1);
        }

        public final Object invoke(Object obj) {
            int intValue = ((Number) obj).intValue();
            hna hnaVar = SelfieGuideFragment.this.f;
            if (hnaVar != null) {
                hnaVar.f512w.setGuidelineBegin(intValue);
                return p1g.a;
            }
            vk7.m("binding");
            throw null;
        }
    }

    public static final class e extends ua8 implements Function110<Integer, p1g> {
        public e() {
            super(1);
        }

        public final Object invoke(Object obj) {
            int intValue = ((Number) obj).intValue();
            hna hnaVar = SelfieGuideFragment.this.f;
            if (hnaVar != null) {
                hnaVar.y.setGuidelineBegin(intValue);
                return p1g.a;
            }
            vk7.m("binding");
            throw null;
        }
    }

    public static final class f extends ua8 implements Function110<fxa<? extends String, ? extends HashMap<String, String>>, p1g> {
        public f() {
            super(1);
        }

        public final Object invoke(Object obj) {
            fxa fxaVar = (fxa) obj;
            int i = SelfieGuideFragment.j;
            SelfieGuideFragment.this.c0().y((HashMap) fxaVar.b, (String) fxaVar.a);
            return p1g.a;
        }
    }

    public static final class g extends ua8 implements Function110<c7g, p1g> {
        public g() {
            super(1);
        }

        public final Object invoke(Object obj) {
            c7g c7gVar = (c7g) obj;
            int i = SelfieGuideFragment.j;
            rud c0 = SelfieGuideFragment.this.c0();
            vk7.e(c7gVar, "it");
            c0.getClass();
            c0.f1222w.setValue(c7gVar);
            return p1g.a;
        }
    }

    public class h extends pw5 implements zu5<p1g> {
        public h(Object obj) {
            super(0, obj, SelfieGuideFragment.class, "showGuideBottomSheet", "showGuideBottomSheet()V", 0);
        }

        public final Object invoke() {
            SelfieGuideFragment selfieGuideFragment = (SelfieGuideFragment) ((v11) this).receiver;
            int i = SelfieGuideFragment.j;
            cud Z = selfieGuideFragment.Z();
            String string = selfieGuideFragment.getString(h9c.ovo_kyc_selfie_guide_dialog_title);
            vk7.e(string, "getString(R.string.ovo_k…elfie_guide_dialog_title)");
            Z.getClass();
            Z.f227o.setValue(new fxa("event/product_information", r89.v(new fxa[]{new fxa("Trigger", "Bottom Sheet Load"), new fxa("Page", "Selfie Guide Page"), new fxa("Product", "eKYC")})));
            Z.p.setValue(new c7g("ekyc_selfie_guide_page", "KYC_SELFIE_GUIDE_POPUP", r89.x(new fxa[]{new fxa("BOTTOMSHEET_TITLE", string)})));
            final ?? r1 = (aud) selfieGuideFragment.g.getValue();
            final bud budVar = new bud(selfieGuideFragment);
            r1.getClass();
            r1.p.f873u.setOnClickListener(new View.OnClickListener() {
                @Override
                public final void onClick(View view) {
                    zu5 zu5Var = budVar;
                    vk7.f(zu5Var, "$action");
                    aud audVar = r1;
                    vk7.f(audVar, "this$0");
                    zu5Var.invoke();
                    audVar.dismiss();
                }
            });
            r1.show();
            return p1g.a;
        }
    }

    public static final class i extends ua8 implements zu5<ViewModelStore> {
        public final Fragment b;

        public i(Fragment fragment) {
            super(0);
            this.b = fragment;
        }

        public final Object invoke() {
            return ksd.c(this.b, "requireActivity().viewModelStore");
        }
    }

    public static final class j extends ua8 implements zu5<sh2> {
        public final Fragment b;

        public j(Fragment fragment) {
            super(0);
            this.b = fragment;
        }

        public final Object invoke() {
            return mg4.b(this.b, "requireActivity().defaultViewModelCreationExtras");
        }
    }

    public static final class k extends ua8 implements zu5<ViewModelProvider.Factory> {
        public final Fragment b;

        public k(Fragment fragment) {
            super(0);
            this.b = fragment;
        }

        public final Object invoke() {
            return ne.b(this.b, "requireActivity().defaultViewModelProviderFactory");
        }
    }

    public static final class l extends ua8 implements zu5<Fragment> {
        public final Fragment b;

        public l(Fragment fragment) {
            super(0);
            this.b = fragment;
        }

        public final Object invoke() {
            return this.b;
        }
    }

    public static final class m extends ua8 implements zu5<ViewModelStoreOwner> {
        public final zu5 b;

        public m(l lVar) {
            super(0);
            this.b = lVar;
        }

        public final Object invoke() {
            return (ViewModelStoreOwner) this.b.invoke();
        }
    }

    public static final class n extends ua8 implements zu5<ViewModelStore> {
        public final aj8 b;

        public n(aj8 aj8Var) {
            super(0);
            this.b = aj8Var;
        }

        public final Object invoke() {
            return zs5.a(this.b).getViewModelStore();
        }
    }

    public static final class o extends ua8 implements zu5<sh2> {
        public final aj8 b;

        public o(aj8 aj8Var) {
            super(0);
            this.b = aj8Var;
        }

        public final Object invoke() {
            HasDefaultViewModelProviderFactory a = zs5.a(this.b);
            HasDefaultViewModelProviderFactory hasDefaultViewModelProviderFactory = a instanceof HasDefaultViewModelProviderFactory ? a : null;
            return hasDefaultViewModelProviderFactory != null ? hasDefaultViewModelProviderFactory.getDefaultViewModelCreationExtras() : sh2.a.INSTANCE;
        }
    }

    public static final class p extends ua8 implements zu5<ViewModelProvider.Factory> {
        public p() {
            super(0);
        }

        public final Object invoke() {
            ViewModelProvider.Factory factory = SelfieGuideFragment.this.e;
            if (factory != null) {
                return factory;
            }
            vk7.m("factory");
            throw null;
        }
    }

    public SelfieGuideFragment() {
        p pVar = new p();
        aj8 a2 = im8.a(yp8.NONE, new m(new l(this)));
        this.h = zs5.b(this, vuc.a(cud.class), new n(a2), new o(a2), pVar);
        this.i = zs5.b(this, vuc.a(rud.class), new i(this), new j(this), new k(this));
    }

    public final void T() {
        np2 np2Var = tl1.b;
        if (np2Var != null) {
            this.e = np2Var.a();
        } else {
            vk7.m("livenessComponent");
            throw null;
        }
    }

    public final cud Z() {
        return (cud) this.h.getValue();
    }

    public final rud c0() {
        return (rud) this.i.getValue();
    }

    public final void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setHasOptionsMenu(true);
    }

    public final void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {
        vk7.f(menu, "menu");
        vk7.f(menuInflater, "inflater");
        menuInflater.inflate(a8c.ovo_menu_selfie_guide, menu);
        super/*androidx.fragment.app.Fragment*/.onCreateOptionsMenu(menu, menuInflater);
    }

    public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        vk7.f(layoutInflater, "inflater");
        ViewDataBinding b2 = fv2.b(layoutInflater, l6c.ovo_fragment_selfie_guide, viewGroup, false, (ev2) null);
        vk7.e(b2, "inflate(inflater, R.layo…_guide, container, false)");
        this.f = (hna) b2;
        AppCompatActivity S = S();
        OnBackPressedDispatcher R = S.R();
        LifecycleOwner viewLifecycleOwner = getViewLifecycleOwner();
        vk7.e(viewLifecycleOwner, "viewLifecycleOwner");
        R.a(viewLifecycleOwner, new b(S));
        hna hnaVar = this.f;
        if (hnaVar == null) {
            vk7.m("binding");
            throw null;
        }
        hnaVar.w(getViewLifecycleOwner());
        View view = ((ViewDataBinding) hnaVar).e;
        vk7.e(view, "root");
        return view;
    }

    public final boolean onOptionsItemSelected(MenuItem menuItem) {
        vk7.f(menuItem, "item");
        if (menuItem.getItemId() != s4c.menu_help) {
            return super/*androidx.fragment.app.Fragment*/.onOptionsItemSelected(menuItem);
        }
        cud Z = Z();
        String string = getString(h9c.ovo_kyc_selfie_guide_title);
        vk7.e(string, "getString(R.string.ovo_kyc_selfie_guide_title)");
        Z.getClass();
        Z.f227o.setValue(new fxa("event/product_information", r89.v(new fxa[]{new fxa("Trigger", "Icon Click"), new fxa("Trigger Value", "?"), new fxa("Page", "Liveness Detection Starting Page"), new fxa("Product", "eKYC")})));
        Z.p.setValue(new c7g("ekyc_selfie_guide_page", "HELP_BUTTON_CLICK", r89.x(new fxa[]{new fxa("TITLE", string)})));
        Z().n.setValue((Object) null);
        return true;
    }

    public final void onViewCreated(View view, Bundle bundle) {
        vk7.f(view, "view");
        super/*androidx.fragment.app.Fragment*/.onViewCreated(view, bundle);
        cud Z = Z();
        String string = getString(h9c.ovo_kyc_selfie_guide_title);
        vk7.e(string, "getString(R.string.ovo_kyc_selfie_guide_title)");
        Z.getClass();
        Z.f227o.setValue(new fxa("state/product_information", r89.v(new fxa[]{new fxa("Trigger", "Page Load"), new fxa("Page", "Liveness Detection Starting Page"), new fxa("Product", "eKYC")})));
        Z.p.setValue(new c7g("ekyc_selfie_guide_page", "DEFAULT", r89.x(new fxa[]{new fxa("TITLE", string)})));
        String str = vk7.a(alb.a.getValue(), "id") ? "https://static.ovo.id/kyc/general/assets/png/img_phone_selfie.png" : "https://static.ovo.id/kyc/general/assets/png/img_phone_selfie_foreigner.png";
        Context requireContext = requireContext();
        vk7.e(requireContext, "requireContext()");
        c cVar = new c();
        ColorDrawable colorDrawable = new ColorDrawable(lc2.b(requireContext, y0c.color_pepper_light_30));
        uyc I = com.bumptech.glide.a.b(requireContext).c(requireContext).h().n(y0c.color_pepper_light_30).I(str);
        I.G(new shc.a(cVar, colorDrawable), (gzc) null, I, zs4.a);
        rud c0 = c0();
        vx0.t(this, new fxa(c0.y, new d()));
        vx0.t(this, new fxa(c0.A, new e()));
        cud Z2 = Z();
        vx0.t(this, new fxa(Z2.f227o, new f()));
        vx0.t(this, new fxa(Z2.p, new g()));
        vx0.u(this, new fxa(Z2.n, new h(this)));
        hna hnaVar = this.f;
        if (hnaVar != null) {
            hnaVar.f510u.setOnClickListener(new m2f(1, this));
        } else {
            vk7.m("binding");
            throw null;
        }
    }
}