导航菜单

页面标题

页面副标题

Crafto v9.3.3 - i.java 源代码

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

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


package D7;

import Ab.H;
import Eb.X0;
import android.content.ActivityNotFoundException;
import android.content.Context;
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.ui.base.BaseActivity;
import com.crafto.android.ui.custom_view.CustomRatingBar;
import com.crafto.android.utility.PreferencesHelper;
import com.google.android.play.core.review.ReviewInfo;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function3;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import org.jetbrains.annotations.NotNull;
import t7.C2979H;

@Metadata
@SourceDebugExtension({"SMAP\nAppRateBottomSheet.kt\nKotlin\n*S Kotlin\n*F\n+ 1 AppRateBottomSheet.kt\ncom/crafto/android/ui/apprate/AppRateBottomSheet\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,309:1\n1#2:310\n*E\n"})
public final class i extends o {
    public static Function3<? super Integer, ? super Boolean, ? super Boolean, Unit> r;
    public static boolean s;
    public ReviewInfo g;
    public Context h;
    public H i;
    public PreferencesHelper j;
    public C2979H l;
    public String m;
    public String n;
    public boolean o;
    public com.google.android.play.core.review.b q;
    public Handler k = new Handler(Looper.getMainLooper());
    public int p = 1;

    @SourceDebugExtension({"SMAP\nAppRateBottomSheet.kt\nKotlin\n*S Kotlin\n*F\n+ 1 AppRateBottomSheet.kt\ncom/crafto/android/ui/apprate/AppRateBottomSheet$onViewCreated$1\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,309:1\n1#2:310\n*E\n"})
    public static final class a implements CustomRatingBar.a {
        public a() {
        }

        @Override
        public final void a(CustomRatingBar customRatingBar, final int i) {
            Handler handler;
            final i iVar = i.this;
            Intrinsics.checkNotNullParameter(customRatingBar, "ratingBar");
            try {
                do.a.a.c("onRatingChanged " + i, new Object[0]);
                if (!iVar.isAdded() || (handler = iVar.k) == null) {
                    return;
                }
                handler.postDelayed(new Runnable() {
                    @Override
                    public final void run() {
                        final i iVar2 = iVar;
                        Intrinsics.checkNotNullParameter(iVar2, "this$0");
                        final int i2 = i;
                        Jb.a.b((String) null, new Function0() {
                            public final Object invoke() {
                                i iVar3 = iVar2;
                                Intrinsics.checkNotNullParameter(iVar3, "this$0");
                                int i3 = i2;
                                if (i3 > 4) {
                                    iVar3.p = i3;
                                    if (i.s) {
                                        do.a.a.c("openPlayStoreRatingDialog", new Object[0]);
                                        if (iVar3.q == null || iVar3.getActivity() == null || iVar3.g == null) {
                                            iVar3.L();
                                        } else {
                                            Jb.a.b((String) null, new e(iVar3, 0));
                                        }
                                    } else {
                                        iVar3.L();
                                    }
                                } else {
                                    Function3<? super Integer, ? super Boolean, ? super Boolean, Unit> function3 = i.r;
                                    if (function3 != null) {
                                    }
                                }
                                String str = iVar3.m;
                                String valueOf = String.valueOf(i3);
                                String str2 = iVar3.n;
                                if (str2 == null) {
                                    str2 = "";
                                }
                                i.K(iVar3, str2, str, valueOf, "Rated");
                                iVar3.dismissAllowingStateLoss();
                                return Unit.a;
                            }
                        });
                    }
                }, 300L);
            } catch (Exception e) {
                do.a.a.e(e);
            }
        }
    }

    public static void K(i iVar, String str, String str2, String str3, String str4) {
        if (iVar.getActivity() != null) {
            BaseActivity activity = iVar.getActivity();
            if (activity instanceof BaseActivity) {
                activity.N("In App Rating", str, (r24 & 4) != 0 ? null : str2, (r24 & 8) != 0 ? null : str3, (r24 & 16) != 0 ? null : str4, (r24 & 32) != 0 ? false : false, (r24 & 64) != 0 ? -1 : -1, (r24 & 128) != 0 ? -1 : -1, 0, (r24 & 512) != 0 ? null : null);
            }
        }
    }

    public final void L() {
        try {
            StringBuilder sb = new StringBuilder("market://details?id=");
            FragmentActivity activity = getActivity();
            PreferencesHelper preferencesHelper = null;
            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 = getActivity();
                if (activity2 != null) {
                    activity2.startActivity(intent);
                }
            } catch (ActivityNotFoundException unused) {
                FragmentActivity activity3 = getActivity();
                if (activity3 != null) {
                    StringBuilder sb2 = new StringBuilder("http://play.google.com/store/apps/details?id=");
                    FragmentActivity activity4 = getActivity();
                    sb2.append(activity4 != null ? activity4.getPackageName() : null);
                    activity3.startActivity(new Intent("android.intent.action.VIEW", Uri.parse(sb2.toString())));
                }
            }
            this.o = true;
            PreferencesHelper preferencesHelper2 = this.j;
            if (preferencesHelper2 != null) {
                preferencesHelper = preferencesHelper2;
            } else {
                Intrinsics.throwUninitializedPropertyAccessException("preferencesHelper");
            }
            preferencesHelper.a.edit().putBoolean(preferencesHelper.c, true).apply();
            dismissAllowingStateLoss();
        } catch (Exception e) {
            e.printStackTrace();
            do.a.a.e(e);
        }
    }

    @Override
    public final void onAttach(@NotNull Context context) {
        Intrinsics.checkNotNullParameter(context, "context");
        super.onAttach(context);
        this.h = context;
    }

    @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: D7.i.onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle):android.view.View");
    }

    public final void onDestroy() {
        Handler handler = this.k;
        if (handler != null) {
            handler.removeCallbacksAndMessages(null);
        }
        this.k = 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 {
            if (this.o) {
                str = "Yes";
                Function3<? super Integer, ? super Boolean, ? super Boolean, Unit> function3 = r;
                if (function3 != null) {
                }
            } else {
                str = "Skip";
                Function3<? super Integer, ? super Boolean, ? super Boolean, Unit> function32 = r;
                if (function32 != null) {
                }
            }
            String str2 = this.n;
            if (str2 != null) {
                K(this, str2, this.m, 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);
        do.a.a.c("AppRateBottomSheet_ViewCreated", new Object[0]);
        if (s) {
            Jb.a.b((String) null, new b(this, 0));
        }
        C2979H c2979h = this.l;
        if (c2979h != null && (customRatingBar = c2979h.d) != null) {
            customRatingBar.setOnRatingBarChangeListener(new a());
        }
        C2979H c2979h2 = this.l;
        if (c2979h2 == null || (appCompatImageView = c2979h2.b) == null) {
            return;
        }
        X0.T(appCompatImageView, false, 0, new D7.a(this, 0), 3);
    }
}