导航菜单

页面标题

页面副标题

Crafto v9.3.3 - c.java 源代码

正在查看: Crafto v9.3.3 应用的 c.java JAVA 源代码文件

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


package L9;

import android.content.ActivityNotFoundException;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.view.View;
import androidx.appcompat.widget.AppCompatImageView;
import androidx.fragment.app.FragmentActivity;
import com.crafto.android.usa.ui.base.BaseActivityUsa;
import com.crafto.android.usa.ui.custom_view.CustomRatingBar;
import kotlin.Unit;
import kotlin.jvm.functions.Function3;
import kotlin.jvm.internal.Intrinsics;
import mb.y;
import org.jetbrains.annotations.NotNull;
import qb.A;
import t7.C2981I;

public final class c extends i {

    @NotNull
    public final Function3<Integer, Boolean, Boolean, Unit> g;
    public y h;
    public Handler i;
    public C2981I j;
    public String k;
    public String l;
    public boolean m;
    public int n;

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

        @Override
        public final void a(CustomRatingBar customRatingBar, final int i) {
            Handler handler;
            final c cVar = c.this;
            Intrinsics.checkNotNullParameter(customRatingBar, "ratingBar");
            try {
                do.a.a.c("onRatingChanged " + i, new Object[0]);
                if (!cVar.isAdded() || (handler = cVar.i) == null) {
                    return;
                }
                handler.postDelayed(new Runnable() {
                    @Override
                    public final void run() {
                        c cVar2 = cVar;
                        Intrinsics.checkNotNullParameter(cVar2, "this$0");
                        int i2 = i;
                        if (i2 > 4) {
                            cVar2.n = i2;
                            try {
                                StringBuilder sb = new StringBuilder("market://details?id=");
                                FragmentActivity activity = cVar2.getActivity();
                                sb.append(activity != null ? activity.getPackageName() : null);
                                Intent intent = new Intent("android.intent.action.VIEW", Uri.parse(sb.toString()));
                                intent.addFlags(1208483840);
                                try {
                                    FragmentActivity activity2 = cVar2.getActivity();
                                    if (activity2 != null) {
                                        activity2.startActivity(intent);
                                    }
                                } catch (ActivityNotFoundException unused) {
                                    FragmentActivity activity3 = cVar2.getActivity();
                                    if (activity3 != null) {
                                        StringBuilder sb2 = new StringBuilder("http://play.google.com/store/apps/details?id=");
                                        FragmentActivity activity4 = cVar2.getActivity();
                                        sb2.append(activity4 != null ? activity4.getPackageName() : null);
                                        activity3.startActivity(new Intent("android.intent.action.VIEW", Uri.parse(sb2.toString())));
                                    }
                                }
                                cVar2.m = true;
                                cVar2.dismissAllowingStateLoss();
                            } catch (Exception e) {
                                e.printStackTrace();
                                do.a.a.e(e);
                            }
                        } else {
                            cVar2.g.invoke(Integer.valueOf(i2), Boolean.FALSE, Boolean.TRUE);
                        }
                        String str = cVar2.k;
                        String valueOf = String.valueOf(i2);
                        String str2 = cVar2.l;
                        if (str2 == null) {
                            str2 = "";
                        }
                        c.K(cVar2, str2, str, valueOf, "Rated");
                        cVar2.dismissAllowingStateLoss();
                    }
                }, 300L);
            } catch (Exception e) {
                do.a.a.e(e);
            }
        }
    }

    public c(@NotNull Function3<? super Integer, ? super Boolean, ? super Boolean, Unit> function3) {
        Intrinsics.checkNotNullParameter(function3, "openFeedbackDialog");
        this.g = function3;
        this.i = new Handler(Looper.getMainLooper());
        this.n = 1;
    }

    public static void K(c cVar, String str, String str2, String str3, String str4) {
        if (cVar.getActivity() != null) {
            BaseActivityUsa activity = cVar.getActivity();
            if (activity instanceof BaseActivityUsa) {
                activity.O("In App Rating", str, (r23 & 4) != 0 ? null : str2, (r23 & 8) != 0 ? null : str3, (r23 & 16) != 0 ? null : str4, (r23 & 32) != 0 ? false : false, (r23 & 64) != 0 ? -1 : -1, (r23 & 128) != 0 ? -1 : -1, 0, null);
            }
        }
    }

    @org.jetbrains.annotations.NotNull
    public final android.view.View onCreateView(@org.jetbrains.annotations.NotNull android.view.LayoutInflater r4, android.view.ViewGroup r5, android.os.Bundle r6) {
        throw new UnsupportedOperationException("Method not decompiled: L9.c.onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle):android.view.View");
    }

    public final void onDestroy() {
        Handler handler = this.i;
        if (handler != null) {
            handler.removeCallbacksAndMessages(null);
        }
        this.i = null;
        super/*androidx.fragment.app.Fragment*/.onDestroy();
    }

    public final void onDismiss(@NotNull DialogInterface dialogInterface) {
        String str;
        Intrinsics.checkNotNullParameter(dialogInterface, "dialog");
        do.a.a.c("onDismiss", new Object[0]);
        super/*androidx.fragment.app.DialogFragment*/.onDismiss(dialogInterface);
        try {
            boolean z = this.m;
            Function3<Integer, Boolean, Boolean, Unit> function3 = this.g;
            if (z) {
                str = "Yes";
                function3.invoke(Integer.valueOf(this.n), Boolean.valueOf(this.m), Boolean.FALSE);
            } else {
                str = "Skip";
                function3.invoke(Integer.valueOf(this.n), Boolean.valueOf(this.m), Boolean.FALSE);
            }
            String str2 = this.l;
            if (str2 != null) {
                K(this, str2, this.k, null, str);
            }
        } catch (Exception e) {
            do.a.a.e(e);
        }
    }

    public final void onViewCreated(@NotNull View view, Bundle bundle) {
        AppCompatImageView appCompatImageView;
        CustomRatingBar customRatingBar;
        Intrinsics.checkNotNullParameter(view, "view");
        super/*androidx.fragment.app.Fragment*/.onViewCreated(view, bundle);
        C2981I c2981i = this.j;
        if (c2981i != null && (customRatingBar = c2981i.d) != null) {
            customRatingBar.setOnRatingBarChangeListener(new a());
        }
        C2981I c2981i2 = this.j;
        if (c2981i2 == null || (appCompatImageView = c2981i2.b) == null) {
            return;
        }
        A.A(appCompatImageView, false, 0, new L9.a(this, 0), 3);
    }
}