导航菜单

页面标题

页面副标题

Atlys v4.8.7 - BoloWebviewFragment.java 源代码

正在查看: Atlys v4.8.7 应用的 BoloWebviewFragment.java JAVA 源代码文件

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


package com.atlys.android.bolo;

import A8.c;
import A8.d;
import N6.C0456k;
import P6.m;
import P6.n;
import P6.r;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.ValueCallback;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ProgressBar;
import androidx.core.view.AbstractC0970a0;
import androidx.core.view.N;
import androidx.fragment.app.F;
import androidx.lifecycle.z0;
import com.atlys.android.bolo.BoloWebviewFragment;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import da.t;
import dc.o;
import di.z;
import dj.q;
import e0.AbstractC1742c;
import h.AbstractC2092d;
import java.util.WeakHashMap;
import java.util.concurrent.ScheduledFuture;
import kotlin.Metadata;
import kotlin.jvm.internal.l;
import ne.i;
import pj.f;
import pj.j;
import sj.b;
import wl.g;
import wl.h;
import yf.x;

@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0007\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u0002\u0010\u0003¨\u0006\u0004"}, d2 = {"Lcom/atlys/android/bolo/BoloWebviewFragment;", "Landroidx/fragment/app/F;", "<init>", "()V", "app_release"}, k = 1, mv = {1, AbstractC1742c.f23923d, 0})
public final class BoloWebviewFragment extends F implements b {

    public j f22382j;

    public boolean f22383k;
    public volatile f l;

    public final Object f22384m = new Object();

    public boolean f22385n = false;

    public final E.j f22386o;

    public WebView f22387p;

    public ProgressBar f22388q;

    public String f22389r;

    public String f22390s;

    public ValueCallback f22391t;

    public final int f22392u;

    public final AbstractC2092d f22393v;

    public BoloWebviewFragment() {
        g b02 = z.b0(h.b, new C0456k(15, new A8.b(this, 15)));
        this.f22386o = new E.j(kotlin.jvm.internal.z.a.b(r.class), new c(b02, 26), new d(this, b02, 13), new c(b02, 27));
        this.f22392u = 1001;
        AbstractC2092d registerForActivityResult = registerForActivityResult(new Oh.g(11), new P6.g(this, 0));
        l.g(registerForActivityResult, "registerForActivityResult(...)");
        this.f22393v = registerForActivityResult;
    }

    public final Object e0() {
        if (this.l == null) {
            synchronized (this.f22384m) {
                try {
                    if (this.l == null) {
                        this.l = new f(this);
                    }
                } finally {
                }
            }
        }
        return this.l.e0();
    }

    @Override
    public final Context getContext() {
        if (super.getContext() == null && !this.f22383k) {
            return null;
        }
        n();
        return this.f22382j;
    }

    @Override
    public final z0 getDefaultViewModelProviderFactory() {
        return q.F(this, super.getDefaultViewModelProviderFactory());
    }

    public final r m() {
        return (r) this.f22386o.getValue();
    }

    public final void n() {
        if (this.f22382j == null) {
            this.f22382j = new j(super.getContext(), this);
            this.f22383k = dk.c.M(super.getContext());
        }
    }

    @Override
    public final void onAttach(Context context) {
        super.onAttach(context);
        n();
        if (this.f22385n) {
            return;
        }
        this.f22385n = true;
        ((n) e0()).getClass();
    }

    @Override
    public final View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        l.h(layoutInflater, "inflater");
        int i10 = 0;
        View inflate = layoutInflater.inflate(2131558504, viewGroup, false);
        l.e(inflate);
        Af.b bVar = new Af.b(17);
        WeakHashMap weakHashMap = AbstractC0970a0.f18262a;
        N.u(inflate, bVar);
        String string = requireArguments().getString("user_id");
        l.e(string);
        this.f22389r = string;
        this.f22390s = requireArguments().getString("application_id");
        View findViewById = inflate.findViewById(2131363293);
        l.g(findViewById, "findViewById(...)");
        this.f22387p = (WebView) findViewById;
        View findViewById2 = inflate.findViewById(2131362941);
        l.g(findViewById2, "findViewById(...)");
        this.f22388q = (ProgressBar) findViewById2;
        WebView webView = this.f22387p;
        if (webView == null) {
            l.o("webView");
            throw null;
        }
        webView.setWebViewClient(new WebViewClient());
        WebView webView2 = this.f22387p;
        if (webView2 == null) {
            l.o("webView");
            throw null;
        }
        webView2.setWebChromeClient(new P6.l(this, i10));
        WebView webView3 = this.f22387p;
        if (webView3 == null) {
            l.o("webView");
            throw null;
        }
        WebSettings settings = webView3.getSettings();
        settings.setJavaScriptEnabled(true);
        settings.setDomStorageEnabled(true);
        settings.setAllowFileAccess(true);
        settings.setAllowContentAccess(true);
        settings.setMediaPlaybackRequiresUserGesture(false);
        settings.setCacheMode(2);
        WebView webView4 = this.f22387p;
        if (webView4 != null) {
            webView4.addJavascriptInterface(new m(this), "AndroidInterface");
            return inflate;
        }
        l.o("webView");
        throw null;
    }

    @Override
    public final void onDestroyView() {
        super.onDestroyView();
        WebView webView = this.f22387p;
        if (webView != null) {
            webView.destroy();
        } else {
            l.o("webView");
            throw null;
        }
    }

    @Override
    public final LayoutInflater onGetLayoutInflater(Bundle bundle) {
        LayoutInflater onGetLayoutInflater = super.onGetLayoutInflater(bundle);
        return onGetLayoutInflater.cloneInContext(new j(onGetLayoutInflater, this));
    }

    @Override
    public final void onViewCreated(View view, Bundle bundle) {
        Task b10;
        l.h(view, "view");
        super.onViewCreated(view, bundle);
        m();
        i iVar = o.F().f;
        if (iVar == null || (b10 = iVar.b(true)) == null) {
            return;
        }
        final int i10 = 0;
        b10.addOnCompleteListener(new OnCompleteListener() {
            public final void onComplete(Task task) {
                switch (i10) {
                    case 0:
                        BoloWebviewFragment boloWebviewFragment = (BoloWebviewFragment) this;
                        kotlin.jvm.internal.l.h(boloWebviewFragment, "this$0");
                        kotlin.jvm.internal.l.h(task, "it");
                        if (task.isSuccessful()) {
                            ne.j jVar = (ne.j) task.getResult();
                            String str = jVar != null ? jVar.a : null;
                            String str2 = boloWebviewFragment.f22390s;
                            String str3 = boloWebviewFragment.f22389r;
                            if (str3 == null) {
                                kotlin.jvm.internal.l.o("userId");
                                throw null;
                            }
                            Uri.Builder buildUpon = Uri.parse("https://bolo.atlys.com").buildUpon();
                            buildUpon.appendQueryParameter("uid", str3);
                            if (str2 != null) {
                                buildUpon.appendQueryParameter("applicationId", str2);
                            }
                            buildUpon.appendQueryParameter("token", str);
                            buildUpon.appendQueryParameter("features", "chat_supported,fc_residence,fc_profile,fc_cadence,invoices,link_open_support");
                            String uri = buildUpon.build().toString();
                            kotlin.jvm.internal.l.g(uri, "toString(...)");
                            WebView webView = boloWebviewFragment.f22387p;
                            if (webView == null) {
                                kotlin.jvm.internal.l.o("webView");
                                throw null;
                            }
                            webView.loadUrl(uri);
                        }
                        ProgressBar progressBar = boloWebviewFragment.f22388q;
                        if (progressBar != null) {
                            progressBar.setVisibility(8);
                            return;
                        } else {
                            kotlin.jvm.internal.l.o("progressBar");
                            throw null;
                        }
                    case 1:
                        x.a((Intent) this);
                        return;
                    case 2:
                        ((yf.z) this).b.trySetResult((Object) null);
                        return;
                    default:
                        ((ScheduledFuture) this).cancel(false);
                        return;
                }
            }
        });
    }

    @Override
    public final void onAttach(Activity activity) {
        super.onAttach(activity);
        j jVar = this.f22382j;
        t.J(jVar == null || f.b(jVar) == activity, "onAttach called multiple times with different Context! Hilt Fragments should not be retained.", new Object[0]);
        n();
        if (this.f22385n) {
            return;
        }
        this.f22385n = true;
        ((n) e0()).getClass();
    }
}