APK反编译源代码展示 - 南明离火平台提供

应用版本信息
应用名称:Electrical Cost
版本号:6.0.5
包名称:it.Ettore.spesaelettrica

MD5 校验值:facd8e3913e14e36e7daf9e69fbd45cb

反编译源代码说明

FragmentAbout.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。


package it.Ettore.spesaelettrica.ui.fragment;

import D1.d;
import I1.b;
import K1.c;
import K1.f;
import M1.g;
import Y1.h;
import Y1.o;
import Y1.p;
import Y1.s;
import Y1.t;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.text.method.LinkMovementMethod;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ProgressBar;
import android.widget.ScrollView;
import android.widget.TableRow;
import android.widget.TextView;
import androidx.appcompat.app.AlertDialog;
import androidx.fragment.app.FragmentActivity;
import androidx.viewbinding.ViewBindings;
import com.google.android.gms.tasks.Task;
import com.google.android.play.core.appupdate.AppUpdateInfo;
import it.Ettore.spesaelettrica.R;
import it.Ettore.spesaelettrica.ui.activity.ActivityChatbot;
import it.Ettore.spesaelettrica.ui.fragment.FragmentAbout;
import it.ettoregallina.androidutils.ui.view.TopAboutView;
import it.ettoregallina.translatortool.activity.ActivityTranslatorMain;
import java.util.Arrays;
import kotlin.jvm.internal.k;
import m3.a;

public final class FragmentAbout extends GeneralFragment implements View.OnClickListener {

    public d f2675b;

    public t f2676c;

    @Override
    public final void onClick(View view) {
        k.e(view, "view");
        switch (view.getId()) {
            case R.id.changelogButton:
                Context requireContext = requireContext();
                k.d(requireContext, "requireContext(...)");
                AlertDialog a4 = new g(requireContext).a(true);
                if (a4 != null) {
                    a4.show();
                    break;
                }
                break;
            case R.id.contattaButton:
                AlertDialog.Builder builder = new AlertDialog.Builder(requireContext());
                builder.setMessage(R.string.chatbot_consulta);
                final int i = 0;
                builder.setPositiveButton(R.string.chatbot_chiedi, new DialogInterface.OnClickListener(this) {

                    public final FragmentAbout f383b;

                    {
                        this.f383b = this;
                    }

                    @Override
                    public final void onClick(DialogInterface dialogInterface, int i4) {
                        boolean z3;
                        switch (i) {
                            case 0:
                                FragmentAbout this$0 = this.f383b;
                                k.e(this$0, "this$0");
                                this$0.startActivity(new Intent(this$0.getActivity(), (Class<?>) ActivityChatbot.class));
                                return;
                            default:
                                FragmentAbout this$02 = this.f383b;
                                k.e(this$02, "this$0");
                                Context requireContext2 = this$02.requireContext();
                                k.d(requireContext2, "requireContext(...)");
                                h hVar = new h(requireContext2, R.string.contatta);
                                if (this$02.getActivity() != null) {
                                    K1.c cVar = K1.d.Companion;
                                    FragmentActivity requireActivity = this$02.requireActivity();
                                    k.d(requireActivity, "requireActivity(...)");
                                    cVar.getClass();
                                    z3 = K1.c.a(requireActivity).c();
                                } else {
                                    z3 = false;
                                }
                                String string = requireContext2.getString(R.string.app_name);
                                k.d(string, "getString(...)");
                                hVar.a(string, z3);
                                hVar.b();
                                return;
                        }
                    }
                });
                final int i4 = 1;
                builder.setNeutralButton(R.string.contatta, new DialogInterface.OnClickListener(this) {

                    public final FragmentAbout f383b;

                    {
                        this.f383b = this;
                    }

                    @Override
                    public final void onClick(DialogInterface dialogInterface, int i42) {
                        boolean z3;
                        switch (i4) {
                            case 0:
                                FragmentAbout this$0 = this.f383b;
                                k.e(this$0, "this$0");
                                this$0.startActivity(new Intent(this$0.getActivity(), (Class<?>) ActivityChatbot.class));
                                return;
                            default:
                                FragmentAbout this$02 = this.f383b;
                                k.e(this$02, "this$0");
                                Context requireContext2 = this$02.requireContext();
                                k.d(requireContext2, "requireContext(...)");
                                h hVar = new h(requireContext2, R.string.contatta);
                                if (this$02.getActivity() != null) {
                                    K1.c cVar = K1.d.Companion;
                                    FragmentActivity requireActivity = this$02.requireActivity();
                                    k.d(requireActivity, "requireActivity(...)");
                                    cVar.getClass();
                                    z3 = K1.c.a(requireActivity).c();
                                } else {
                                    z3 = false;
                                }
                                String string = requireContext2.getString(R.string.app_name);
                                k.d(string, "getString(...)");
                                hVar.a(string, z3);
                                hVar.b();
                                return;
                        }
                    }
                });
                builder.setNegativeButton(android.R.string.cancel, (DialogInterface.OnClickListener) null);
                builder.create().show();
                break;
            case R.id.traduciButton:
                startActivity(new Intent(getContext(), (Class<?>) ActivityTranslatorMain.class));
                break;
            case R.id.verificaButton:
                d dVar = this.f2675b;
                k.b(dVar);
                dVar.g.setVisibility(8);
                d dVar2 = this.f2675b;
                k.b(dVar2);
                dVar2.h.setVisibility(0);
                t tVar = this.f2676c;
                if (tVar == null) {
                    k.j("updateInApp");
                    throw null;
                }
                Task<AppUpdateInfo> appUpdateInfo = tVar.f1496a.getAppUpdateInfo();
                k.d(appUpdateInfo, "getAppUpdateInfo(...)");
                appUpdateInfo.addOnSuccessListener(new o(new s(tVar, 0), 1));
                appUpdateInfo.addOnFailureListener(new p(tVar));
                break;
            case R.id.votaButton:
                Context requireContext2 = requireContext();
                k.d(requireContext2, "requireContext(...)");
                f fVar = new f(requireContext2);
                String packageName = fVar.f729a.getPackageName();
                k.d(packageName, "getPackageName(...)");
                fVar.a(packageName);
                break;
        }
    }

    @Override
    public final View onCreateView(LayoutInflater inflater, ViewGroup viewGroup, Bundle bundle) {
        k.e(inflater, "inflater");
        View inflate = inflater.inflate(R.layout.fragment_about, viewGroup, false);
        int i = R.id.changelogButton;
        Button button = (Button) ViewBindings.findChildViewById(inflate, R.id.changelogButton);
        if (button != null) {
            i = R.id.check_update_tablerow;
            TableRow tableRow = (TableRow) ViewBindings.findChildViewById(inflate, R.id.check_update_tablerow);
            if (tableRow != null) {
                i = R.id.contattaButton;
                Button button2 = (Button) ViewBindings.findChildViewById(inflate, R.id.contattaButton);
                if (button2 != null) {
                    i = R.id.privacyPolicyTextView;
                    TextView textView = (TextView) ViewBindings.findChildViewById(inflate, R.id.privacyPolicyTextView);
                    if (textView != null) {
                        ScrollView scrollView = (ScrollView) inflate;
                        i = R.id.top_about_view;
                        TopAboutView topAboutView = (TopAboutView) ViewBindings.findChildViewById(inflate, R.id.top_about_view);
                        if (topAboutView != null) {
                            i = R.id.traduciButton;
                            Button button3 = (Button) ViewBindings.findChildViewById(inflate, R.id.traduciButton);
                            if (button3 != null) {
                                i = R.id.verificaButton;
                                Button button4 = (Button) ViewBindings.findChildViewById(inflate, R.id.verificaButton);
                                if (button4 != null) {
                                    i = R.id.verificaProgressbar;
                                    ProgressBar progressBar = (ProgressBar) ViewBindings.findChildViewById(inflate, R.id.verificaProgressbar);
                                    if (progressBar != null) {
                                        i = R.id.votaButton;
                                        Button button5 = (Button) ViewBindings.findChildViewById(inflate, R.id.votaButton);
                                        if (button5 != null) {
                                            this.f2675b = new d(scrollView, button, tableRow, button2, textView, topAboutView, button3, button4, progressBar, button5);
                                            t tVar = new t(this);
                                            this.f2676c = tVar;
                                            tVar.f1499d = new b(this);
                                            d dVar = this.f2675b;
                                            k.b(dVar);
                                            ScrollView scrollView2 = dVar.f110a;
                                            k.d(scrollView2, "getRoot(...)");
                                            return scrollView2;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        throw new NullPointerException("Missing required view with ID: ".concat(inflate.getResources().getResourceName(i)));
    }

    @Override
    public final void onDestroyView() {
        super.onDestroyView();
        this.f2675b = null;
    }

    @Override
    public final void onResume() {
        boolean z3;
        super.onResume();
        t tVar = this.f2676c;
        if (tVar == null) {
            k.j("updateInApp");
            throw null;
        }
        tVar.f1496a.getAppUpdateInfo().addOnSuccessListener(new o(new s(tVar, 1), 0));
        d dVar = this.f2675b;
        k.b(dVar);
        if (getActivity() != null) {
            c cVar = K1.d.Companion;
            FragmentActivity requireActivity = requireActivity();
            k.d(requireActivity, "requireActivity(...)");
            cVar.getClass();
            z3 = c.a(requireActivity).c();
        } else {
            z3 = false;
        }
        dVar.e.setAppName(z3 ? String.format("%s %s", Arrays.copyOf(new Object[]{getString(R.string.app_name), getString(R.string.pro)}, 2)) : getString(R.string.app_name));
    }

    @Override
    public final void onViewCreated(View view, Bundle bundle) {
        k.e(view, "view");
        super.onViewCreated(view, bundle);
        d dVar = this.f2675b;
        k.b(dVar);
        dVar.f111b.setOnClickListener(this);
        d dVar2 = this.f2675b;
        k.b(dVar2);
        dVar2.i.setOnClickListener(this);
        d dVar3 = this.f2675b;
        k.b(dVar3);
        dVar3.f112c.setOnClickListener(this);
        d dVar4 = this.f2675b;
        k.b(dVar4);
        dVar4.f.setOnClickListener(this);
        d dVar5 = this.f2675b;
        k.b(dVar5);
        dVar5.g.setOnClickListener(this);
        d dVar6 = this.f2675b;
        k.b(dVar6);
        dVar6.f113d.setMovementMethod(LinkMovementMethod.getInstance());
        d dVar7 = this.f2675b;
        k.b(dVar7);
        dVar7.f113d.setText(a.o("<a href=\"https://www.egalnetsoftwares.com/privacy-policy/\">Privacy Policy</a>"));
    }
}