导航菜单

页面标题

页面副标题

Crafto v9.3.3 - RouteActivity.java 源代码

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

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


package com.crafto.android.ui.splash;

import Ab.H;
import Ab.M;
import B.O;
import Bb.j;
import Da.RunnableC0231x;
import E7.C0243g;
import Hb.r;
import Hk.q;
import J9.C0808d1;
import L8.C1013a;
import Ob.i;
import Pa.C1232a;
import S.C0;
import a8.C1565r;
import android.app.NotificationManager;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.net.Uri;
import android.os.Build;
import android.os.Handler;
import android.os.LocaleList;
import android.text.TextUtils;
import android.view.WindowManager;
import androidx.activity.ComponentActivity;
import androidx.appcompat.widget.P;
import androidx.lifecycle.J;
import androidx.lifecycle.s0;
import androidx.lifecycle.u0;
import androidx.lifecycle.v0;
import androidx.lifecycle.x0;
import com.android.installreferrer.api.InstallReferrerClient;
import com.android.installreferrer.api.InstallReferrerStateListener;
import com.android.installreferrer.api.ReferrerDetails;
import com.appsflyer.AppsFlyerLib;
import com.clevertap.android.sdk.Constants;
import com.crafto.android.CraftoApp;
import com.crafto.android.ui.force_update.ForceUpdateActivity;
import com.crafto.android.ui.splash.RouteActivity;
import com.crafto.android.usa.ui.force_update.ForceUpdateActivityUsa;
import com.crafto.android.usa.ui.image_enhancer_home.k;
import com.crafto.android.usa.utility.PreferencesHelperUsa;
import com.crafto.android.utility.PreferencesHelper;
import com.crafto.android.utility.a;
import com.google.firebase.analytics.FirebaseAnalytics;
import dl.T;
import do.a;
import e9.C2216g;
import e9.SharedPreferencesOnSharedPreferenceChangeListenerC2218i;
import e9.n;
import e9.w;
import java.net.URLDecoder;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Set;
import kotlin.Metadata;
import kotlin.Pair;
import kotlin.Unit;
import kotlin.collections.CollectionsKt;
import kotlin.collections.Q;
import kotlin.coroutines.CoroutineContext;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Lambda;
import kotlin.jvm.internal.Ref;
import kotlin.jvm.internal.Reflection;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.text.StringsKt;
import kotlin.text.p;
import mb.B;
import org.jetbrains.annotations.NotNull;
import xb.t;

@Metadata
@SourceDebugExtension({"SMAP\nRouteActivity.kt\nKotlin\n*S Kotlin\n*F\n+ 1 RouteActivity.kt\ncom/crafto/android/ui/splash/RouteActivity\n+ 2 ActivityViewModelLazy.kt\nandroidx/activity/ActivityViewModelLazyKt\n+ 3 ArraysJVM.kt\nkotlin/collections/ArraysKt__ArraysJVMKt\n+ 4 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n+ 5 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,2372:1\n75#2,13:2373\n37#3:2386\n36#3,3:2387\n1863#4,2:2390\n1863#4,2:2392\n1872#4,3:2395\n1#5:2394\n*S KotlinDebug\n*F\n+ 1 RouteActivity.kt\ncom/crafto/android/ui/splash/RouteActivity\n*L\n209#1:2373,13\n1927#1:2386\n1927#1:2387,3\n2057#1:2390,2\n2064#1:2392,2\n1765#1:2395,3\n*E\n"})
public final class RouteActivity extends Hilt_RouteActivity implements InstallReferrerStateListener {
    public static boolean V1;
    public SharedPreferences B;
    public SharedPreferencesOnSharedPreferenceChangeListenerC2218i H;
    public X7.a L;
    public FirebaseAnalytics M;
    public long X;
    public boolean Y;
    public boolean Z;
    public boolean e;
    public InstallReferrerClient g;
    public boolean h;
    public C1013a i;
    public C1232a j;
    public Hb.c k;
    public tb.e l;
    public Lb.b m;
    public t n;
    public C2216g o;
    public gb.g p;
    public boolean p1;
    public PreferencesHelper q;
    public PreferencesHelperUsa r;
    public H s;
    public M t;
    public B u;
    public j v;
    public nb.f w;
    public Cb.a x;
    public boolean x1;
    public i y;
    public boolean y1;
    public boolean f = true;

    @NotNull
    public final RunnableC0231x P = new RunnableC0231x(this, 2);
    public Handler I = new Handler();

    @NotNull
    public final u0 Q = new u0(Reflection.getOrCreateKotlinClass(w.class), new g(this), new f(this), new h(this));

    @Mk.e(c = "com.crafto.android.ui.splash.RouteActivity$forceContinueProcessing$1", f = "RouteActivity.kt", l = {1301}, m = "invokeSuspend")
    public static final class a extends Mk.i implements Function2<dl.H, Kk.c<? super Unit>, Object> {
        public int a;

        public a(Kk.c<? super a> cVar) {
            super(2, cVar);
        }

        public final Kk.c<Unit> create(Object obj, Kk.c<?> cVar) {
            return RouteActivity.this.new a(cVar);
        }

        public final Object invoke(Object obj, Object obj2) {
            return create((dl.H) obj, (Kk.c) obj2).invokeSuspend(Unit.a);
        }

        public final Object invokeSuspend(Object obj) {
            Lk.a aVar = Lk.a.COROUTINE_SUSPENDED;
            int i = this.a;
            if (i == 0) {
                q.b(obj);
                this.a = 1;
                if (T.b(3000L, this) == aVar) {
                    return aVar;
                }
            } else {
                if (i != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                q.b(obj);
            }
            do.a.a.c("hello", new Object[]{"catching deep link #1: forceContinueProcessing: final"});
            boolean z = RouteActivity.V1;
            RouteActivity.this.d0();
            return Unit.a;
        }
    }

    @Mk.e(c = "com.crafto.android.ui.splash.RouteActivity$onCreate$10$2", f = "RouteActivity.kt", l = {426}, m = "invokeSuspend")
    public static final class b extends Mk.i implements Function2<dl.H, Kk.c<? super Unit>, Object> {
        public int a;
        public final Uri b;
        public final RouteActivity c;

        public b(Uri uri, RouteActivity routeActivity, Kk.c<? super b> cVar) {
            super(2, cVar);
            this.b = uri;
            this.c = routeActivity;
        }

        public final Kk.c<Unit> create(Object obj, Kk.c<?> cVar) {
            return new b(this.b, this.c, cVar);
        }

        public final Object invoke(Object obj, Object obj2) {
            return create((dl.H) obj, (Kk.c) obj2).invokeSuspend(Unit.a);
        }

        public final Object invokeSuspend(Object obj) {
            Uri uri = this.b;
            RouteActivity routeActivity = this.c;
            Lk.a aVar = Lk.a.COROUTINE_SUSPENDED;
            int i = this.a;
            if (i == 0) {
                q.b(obj);
                this.a = 1;
                if (T.b(300L, this) == aVar) {
                    return aVar;
                }
            } else {
                if (i != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                q.b(obj);
            }
            try {
                String uri2 = uri.toString();
                Intrinsics.checkNotNullExpressionValue(uri2, "toString(...)");
                StringBuilder sb = new StringBuilder();
                Cb.a aVar2 = routeActivity.x;
                if (aVar2 == null) {
                    Intrinsics.throwUninitializedPropertyAccessException("deepLinkConstants");
                    aVar2 = null;
                }
                sb.append(aVar2.s);
                sb.append(":/");
                String l = p.l(uri2, sb.toString(), a.e.r2);
                do.a.a.c("hello", new Object[]{"catching deep link #-1: pdl: #4"});
                Uri parse = Uri.parse(l);
                boolean z = RouteActivity.V1;
                routeActivity.e0(parse, "Intent Data");
                HashMap hashMap = new HashMap();
                hashMap.put("Type", a.e.j1);
                hashMap.put("Value", uri.toString());
                routeActivity.M().f("Log", hashMap, false);
            } catch (Exception e) {
                do.a.a.e(e);
            }
            return Unit.a;
        }
    }

    @Mk.e(c = "com.crafto.android.ui.splash.RouteActivity$onCreate$11", f = "RouteActivity.kt", l = {}, m = "invokeSuspend")
    public static final class c extends Mk.i implements Function2<dl.H, Kk.c<? super Unit>, Object> {
        public Object a;

        public c(Kk.c<? super c> cVar) {
            super(2, cVar);
        }

        public final Kk.c<Unit> create(Object obj, Kk.c<?> cVar) {
            c cVar2 = RouteActivity.this.new c(cVar);
            cVar2.a = obj;
            return cVar2;
        }

        public final Object invoke(Object obj, Object obj2) {
            return create((dl.H) obj, (Kk.c) obj2).invokeSuspend(Unit.a);
        }

        public final java.lang.Object invokeSuspend(java.lang.Object r11) {
            throw new UnsupportedOperationException("Method not decompiled: com.crafto.android.ui.splash.RouteActivity.c.invokeSuspend(java.lang.Object):java.lang.Object");
        }
    }

    @Mk.e(c = "com.crafto.android.ui.splash.RouteActivity$onCreate$5", f = "RouteActivity.kt", l = {}, m = "invokeSuspend")
    public static final class d extends Mk.i implements Function2<dl.H, Kk.c<? super Unit>, Object> {
        public d(Kk.c<? super d> cVar) {
            super(2, cVar);
        }

        public final Kk.c<Unit> create(Object obj, Kk.c<?> cVar) {
            return RouteActivity.this.new d(cVar);
        }

        public final Object invoke(Object obj, Object obj2) {
            return create((dl.H) obj, (Kk.c) obj2).invokeSuspend(Unit.a);
        }

        public final Object invokeSuspend(Object obj) {
            Lk.a aVar = Lk.a.COROUTINE_SUSPENDED;
            q.b(obj);
            Jb.a.b((String) null, new k(RouteActivity.this, 1));
            return Unit.a;
        }
    }

    @Mk.e(c = "com.crafto.android.ui.splash.RouteActivity$onInstallReferrerSetupFinished$1", f = "RouteActivity.kt", l = {}, m = "invokeSuspend")
    public static final class e extends Mk.i implements Function2<dl.H, Kk.c<? super Unit>, Object> {
        public final int a;
        public final RouteActivity b;

        public e(int i, RouteActivity routeActivity, Kk.c<? super e> cVar) {
            super(2, cVar);
            this.a = i;
            this.b = routeActivity;
        }

        public final Kk.c<Unit> create(Object obj, Kk.c<?> cVar) {
            return new e(this.a, this.b, cVar);
        }

        public final Object invoke(Object obj, Object obj2) {
            return create((dl.H) obj, (Kk.c) obj2).invokeSuspend(Unit.a);
        }

        public final Object invokeSuspend(Object obj) {
            RouteActivity routeActivity = this.b;
            Lk.a aVar = Lk.a.COROUTINE_SUSPENDED;
            q.b(obj);
            try {
                int i = this.a;
                if (i == 0) {
                    try {
                        do.a.a.c("InstallReferrer conneceted", new Object[0]);
                        InstallReferrerClient installReferrerClient = routeActivity.g;
                        RouteActivity.I(routeActivity, installReferrerClient != null ? installReferrerClient.getInstallReferrer() : null);
                        InstallReferrerClient installReferrerClient2 = routeActivity.g;
                        if (installReferrerClient2 != null) {
                            installReferrerClient2.endConnection();
                            Unit unit = Unit.a;
                        }
                    } catch (Exception e) {
                        do.a.a.e(e);
                        Unit unit2 = Unit.a;
                    }
                } else if (i == 1) {
                    do.a.a.j("Unable to connect to the service", new Object[0]);
                } else if (i != 2) {
                    do.a.a.j("responseCode not found.", new Object[0]);
                } else {
                    do.a.a.j("InstallReferrer not supported", new Object[0]);
                }
            } catch (Exception e2) {
                do.a.a.e(e2);
            }
            return Unit.a;
        }
    }

    public static final class f extends Lambda implements Function0<v0.b> {
        public final ComponentActivity a;

        public f(ComponentActivity componentActivity) {
            super(0);
            this.a = componentActivity;
        }

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

    public static final class g extends Lambda implements Function0<x0> {
        public final ComponentActivity a;

        public g(ComponentActivity componentActivity) {
            super(0);
            this.a = componentActivity;
        }

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

    public static final class h extends Lambda implements Function0<y2.a> {
        public final ComponentActivity a;

        public h(ComponentActivity componentActivity) {
            super(0);
            this.a = componentActivity;
        }

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

    public static final void H(RouteActivity routeActivity, RouteActivity routeActivity2) {
        routeActivity.getClass();
        do.a.a.c("cancelAllNotification", new Object[0]);
        try {
            Object systemService = routeActivity2.getSystemService("notification");
            Intrinsics.checkNotNull(systemService, "null cannot be cast to non-null type android.app.NotificationManager");
            ((NotificationManager) systemService).cancelAll();
        } catch (Exception e2) {
            do.a.a.e(e2);
        }
    }

    public static final void I(RouteActivity routeActivity, ReferrerDetails referrerDetails) {
        int i;
        int i2 = 0;
        routeActivity.getClass();
        do.a.a.c("response " + referrerDetails + ' ', new Object[0]);
        try {
            HashMap hashMap = new HashMap();
            hashMap.put("Type", a.e.g1);
            hashMap.put("Value", String.valueOf(referrerDetails));
            routeActivity.M().f("Log", hashMap, false);
        } catch (Exception e2) {
            do.a.a.e(e2);
        }
        if (referrerDetails != null) {
            String installReferrer = referrerDetails.getInstallReferrer();
            long referrerClickTimestampSeconds = referrerDetails.getReferrerClickTimestampSeconds();
            long installBeginTimestampSeconds = referrerDetails.getInstallBeginTimestampSeconds();
            a.a aVar = do.a.a;
            aVar.c("referrerUrl - " + installReferrer + " referrerClickTime - " + referrerClickTimestampSeconds + " appInstallTime - " + installBeginTimestampSeconds, new Object[0]);
            String decode = URLDecoder.decode(installReferrer, "UTF-8");
            HashMap hashMap2 = new HashMap();
            String str = a.e.g1;
            hashMap2.put("Type", str);
            hashMap2.put("referrerUtf", decode);
            hashMap2.put("referrerUrl", installReferrer);
            routeActivity.M().f("Log", hashMap2, false);
            Intrinsics.checkNotNull(decode);
            aVar.c("logAdsData", new Object[0]);
            Jb.a.b((String) null, new n(i2, routeActivity, decode));
            String str2 = a.e.I1;
            String[] strArr = (String[]) StringsKt.T(decode, new String[]{"&"}, 0, 6).toArray(new String[0]);
            HashMap b2 = androidx.appcompat.widget.c.b("Type", str);
            b2.put("utmParts", strArr);
            routeActivity.M().f("Log", b2, false);
            int length = strArr.length;
            String str3 = str2;
            String str4 = str3;
            String str5 = str4;
            String str6 = str5;
            String str7 = str6;
            String str8 = str7;
            int i3 = 0;
            while (i3 < length) {
                String str9 = strArr[i3];
                do.a.a.d(C1.e.a("UTM Part : ", str9), new Object[0]);
                if (StringsKt.C(str9, "utm_source", false)) {
                    str2 = str9.substring(StringsKt.I(str9, "=", 0, false, 6) + 1);
                    Intrinsics.checkNotNullExpressionValue(str2, "substring(...)");
                }
                if (StringsKt.C(str9, "utm_medium", false)) {
                    str8 = str9.substring(StringsKt.I(str9, "=", 0, false, 6) + 1);
                    Intrinsics.checkNotNullExpressionValue(str8, "substring(...)");
                }
                if (StringsKt.C(str9, "utm_campaign", false)) {
                    str3 = str9.substring(StringsKt.I(str9, "=", 0, false, 6) + 1);
                    Intrinsics.checkNotNullExpressionValue(str3, "substring(...)");
                }
                if (StringsKt.C(str9, "utm_content", false)) {
                    str4 = str9.substring(StringsKt.I(str9, "=", 0, false, 6) + 1);
                    Intrinsics.checkNotNullExpressionValue(str4, "substring(...)");
                }
                if (StringsKt.C(str9, "utm_term", false)) {
                    str5 = str9.substring(StringsKt.I(str9, "=", 0, false, 6) + 1);
                    Intrinsics.checkNotNullExpressionValue(str5, "substring(...)");
                }
                if (StringsKt.C(str9, a.e.o2, false)) {
                    str6 = str9.substring(StringsKt.I(str9, "=", 0, false, 6) + 1);
                    Intrinsics.checkNotNullExpressionValue(str6, "substring(...)");
                }
                if (StringsKt.C(str9, a.e.x1, false)) {
                    i = 1;
                    String substring = str9.substring(StringsKt.I(str9, "=", 0, false, 6) + 1);
                    Intrinsics.checkNotNullExpressionValue(substring, "substring(...)");
                    str7 = substring;
                } else {
                    i = 1;
                }
                i3 += i;
            }
            HashMap hashMap3 = new HashMap();
            if (!p.h(str2, a.e.I1, true)) {
                try {
                    hashMap3.put("play_store_utm_source", str2);
                    String str10 = (String) CollectionsKt.K(StringsKt.T(str2, new String[]{"_"}, 0, 6));
                    if (str10.length() > 0 && TextUtils.isDigitsOnly(str10)) {
                        StringBuilder sb = new StringBuilder();
                        sb.append(a.e.r2);
                        Cb.a aVar2 = routeActivity.x;
                        if (aVar2 == null) {
                            Intrinsics.throwUninitializedPropertyAccessException("deepLinkConstants");
                            aVar2 = null;
                        }
                        sb.append(aVar2.d);
                        sb.append('/');
                        sb.append(str10);
                        Cb.a aVar3 = routeActivity.x;
                        if (aVar3 == null) {
                            Intrinsics.throwUninitializedPropertyAccessException("deepLinkConstants");
                            aVar3 = null;
                        }
                        sb.append(aVar3.k);
                        sb.append(a.e.m2);
                        sb.append('=');
                        sb.append(str2);
                        String sb2 = sb.toString();
                        do.a.a.c("hello", new Object[]{"catching deep link #-1: pdl: #1"});
                        routeActivity.e0(Uri.parse(sb2), "Install Referrer");
                    }
                } catch (Exception e3) {
                    do.a.a.e(e3);
                }
            }
            String str11 = a.e.I1;
            if (!p.h(str8, str11, true)) {
                hashMap3.put("play_store_utm_medium", str8);
            }
            if (!p.h(str3, str11, true)) {
                hashMap3.put("play_store_utm_campaign", str3);
            }
            if (!p.h(str4, str11, true)) {
                hashMap3.put("play_store_utm_content", str4);
            }
            if (!p.h(str5, str11, true)) {
                hashMap3.put("play_store_utm_term", str5);
            }
            if (!p.h(str6, str11, true)) {
                hashMap3.put(a.e.o2, str6);
                routeActivity.V().getClass();
                routeActivity.W().getClass();
                PreferencesHelper T = routeActivity.T();
                if (str6 != null) {
                    Xf.i.b(T.a, "referralcode", str6);
                } else {
                    T.getClass();
                }
                PreferencesHelperUsa U = routeActivity.U();
                if (str6 != null) {
                    Xf.i.b(U.a, "referralcode", str6);
                } else {
                    U.getClass();
                }
            }
            hashMap3.put("device_resolution", C1565r.b(routeActivity) + " * " + C1565r.a(routeActivity));
            hashMap3.put("device_width", Integer.valueOf(C1565r.b(routeActivity)));
            hashMap3.put("device_height", Integer.valueOf(C1565r.a(routeActivity)));
            hashMap3.put("device_available_storage", r.b());
            hashMap3.put("device_ram", r.f(routeActivity));
            hashMap3.put("device_processor", r.d());
            hashMap3.put("device_clock_speed", r.c());
            hashMap3.put("device_refresh_rate", r.e(routeActivity));
            j M = routeActivity.M();
            WindowManager windowManager = routeActivity.getWindowManager();
            Intrinsics.checkNotNullExpressionValue(windowManager, "getWindowManager(...)");
            M.getClass();
            hashMap3.put("screen_size_in_inches", Double.valueOf(j.d(routeActivity, windowManager)));
            if (!p.h(str7, str11, true)) {
                do.a.a.c("hello", new Object[]{"catching deep link #-1: pdl: #2"});
                routeActivity.e0(Uri.parse(str7), "Install Referrer");
            }
            if (hashMap3.size() <= 0) {
                do.a.a.c("profileUpdate empty", new Object[0]);
                return;
            }
            do.a.a.c("profileUpdate " + hashMap3, new Object[0]);
            routeActivity.M().m(hashMap3);
        }
    }

    public static Uri J(Uri uri, String str, String str2) {
        Set<String> queryParameterNames = uri.getQueryParameterNames();
        Uri.Builder clearQuery = uri.buildUpon().clearQuery();
        for (String str3 : queryParameterNames) {
            clearQuery.appendQueryParameter(str3, uri.getQueryParameter(str3));
        }
        return clearQuery.appendQueryParameter(str, str2).build();
    }

    public final void K(boolean z) {
        a.a aVar = do.a.a;
        aVar.c("continueProcessing", new Object[0]);
        if (this.Z) {
            return;
        }
        if (!this.Y) {
            if (z) {
                return;
            }
            this.p1 = true;
            aVar.c("hello", new Object[]{"catching deep link #1: continue processing"});
            d0();
            return;
        }
        this.p1 = true;
        if (Z() || Y()) {
            Intrinsics.checkNotNullParameter(this, "context");
            startActivity(new Intent((Context) this, (Class<?>) ForceUpdateActivityUsa.class));
        } else {
            Intrinsics.checkNotNullParameter(this, "context");
            startActivity(new Intent((Context) this, (Class<?>) ForceUpdateActivity.class));
        }
    }

    public final void L() {
        a.a aVar = do.a.a;
        aVar.c("forceContinueProcessing", new Object[0]);
        if (this.p1) {
            return;
        }
        this.Z = true;
        aVar.c("hello", new Object[]{"catching deep link #1: forceContinueProcessing"});
        if (this.f) {
            dl.g.b(J.a(this), (CoroutineContext) null, (dl.J) null, new a(null), 3);
        } else {
            aVar.c("hello", new Object[]{"catching deep link #1: forceContinueProcessing: final"});
            d0();
        }
    }

    @NotNull
    public final j M() {
        j jVar = this.v;
        if (jVar != null) {
            return jVar;
        }
        Intrinsics.throwUninitializedPropertyAccessException("analyticsUtil");
        return null;
    }

    @NotNull
    public final nb.f N() {
        nb.f fVar = this.w;
        if (fVar != null) {
            return fVar;
        }
        Intrinsics.throwUninitializedPropertyAccessException("analyticsUtilUs");
        return null;
    }

    public final void O(long j) {
        do.a.a.c(J1.c.c(j, "getAuthToken "), new Object[0]);
        try {
            HashMap hashMap = new HashMap();
            hashMap.put("Type", a.e.f1);
            M().f("Log", hashMap, false);
        } catch (Exception e2) {
            try {
                do.a.a.e(e2);
            } catch (Exception e3) {
                do.a.a.e(e3);
            }
        }
    }

    @NotNull
    public final C2216g Q() {
        C2216g c2216g = this.o;
        if (c2216g != null) {
            return c2216g;
        }
        Intrinsics.throwUninitializedPropertyAccessException("navigator");
        return null;
    }

    @NotNull
    public final gb.g R() {
        gb.g gVar = this.p;
        if (gVar != null) {
            return gVar;
        }
        Intrinsics.throwUninitializedPropertyAccessException("navigatorUs");
        return null;
    }

    @NotNull
    public final H S() {
        H h2 = this.s;
        if (h2 != null) {
            return h2;
        }
        Intrinsics.throwUninitializedPropertyAccessException("paramsConstants");
        return null;
    }

    @NotNull
    public final PreferencesHelper T() {
        PreferencesHelper preferencesHelper = this.q;
        if (preferencesHelper != null) {
            return preferencesHelper;
        }
        Intrinsics.throwUninitializedPropertyAccessException("sharedPreferencesHelper");
        return null;
    }

    @NotNull
    public final PreferencesHelperUsa U() {
        PreferencesHelperUsa preferencesHelperUsa = this.r;
        if (preferencesHelperUsa != null) {
            return preferencesHelperUsa;
        }
        Intrinsics.throwUninitializedPropertyAccessException("sharedPreferencesHelperUsa");
        return null;
    }

    @NotNull
    public final M V() {
        M m = this.t;
        if (m != null) {
            return m;
        }
        Intrinsics.throwUninitializedPropertyAccessException("singletonData");
        return null;
    }

    @NotNull
    public final B W() {
        B b2 = this.u;
        if (b2 != null) {
            return b2;
        }
        Intrinsics.throwUninitializedPropertyAccessException("singletonDataUs");
        return null;
    }

    public final boolean X() {
        String str;
        String f2 = T().f();
        String c2 = U().c();
        String str2 = null;
        if (f2 != null) {
            str = f2.toLowerCase(Locale.ROOT);
            Intrinsics.checkNotNullExpressionValue(str, "toLowerCase(...)");
        } else {
            str = null;
        }
        List list = a.e.a;
        String str3 = a.e.E0;
        Locale locale = Locale.ROOT;
        if (!O.c(str3, locale, "toLowerCase(...)", str)) {
            if (c2 != null) {
                str2 = c2.toLowerCase(locale);
                Intrinsics.checkNotNullExpressionValue(str2, "toLowerCase(...)");
            }
            if (!O.c(str3, locale, "toLowerCase(...)", str2)) {
                return false;
            }
        }
        return true;
    }

    public final boolean Y() {
        String str;
        String f2 = T().f();
        String c2 = U().c();
        String str2 = null;
        if (f2 != null) {
            str = f2.toLowerCase(Locale.ROOT);
            Intrinsics.checkNotNullExpressionValue(str, "toLowerCase(...)");
        } else {
            str = null;
        }
        List list = a.e.a;
        String str3 = a.e.K0;
        Locale locale = Locale.ROOT;
        if (!O.c(str3, locale, "toLowerCase(...)", str)) {
            if (c2 != null) {
                str2 = c2.toLowerCase(locale);
                Intrinsics.checkNotNullExpressionValue(str2, "toLowerCase(...)");
            }
            if (!O.c(str3, locale, "toLowerCase(...)", str2)) {
                return false;
            }
        }
        return true;
    }

    public final boolean Z() {
        String str;
        String f2 = T().f();
        String c2 = U().c();
        String str2 = null;
        if (f2 != null) {
            str = f2.toLowerCase(Locale.ROOT);
            Intrinsics.checkNotNullExpressionValue(str, "toLowerCase(...)");
        } else {
            str = null;
        }
        List list = a.e.a;
        String str3 = a.e.J0;
        Locale locale = Locale.ROOT;
        if (!O.c(str3, locale, "toLowerCase(...)", str)) {
            if (c2 != null) {
                str2 = c2.toLowerCase(locale);
                Intrinsics.checkNotNullExpressionValue(str2, "toLowerCase(...)");
            }
            if (!O.c(str3, locale, "toLowerCase(...)", str2)) {
                return false;
            }
        }
        return true;
    }

    public final boolean a0() {
        String str;
        String f2 = T().f();
        String c2 = U().c();
        String str2 = null;
        if (f2 != null) {
            str = f2.toLowerCase(Locale.ROOT);
            Intrinsics.checkNotNullExpressionValue(str, "toLowerCase(...)");
        } else {
            str = null;
        }
        List list = a.e.a;
        String str3 = a.e.L0;
        Locale locale = Locale.ROOT;
        if (!O.c(str3, locale, "toLowerCase(...)", str)) {
            if (c2 != null) {
                str2 = c2.toLowerCase(locale);
                Intrinsics.checkNotNullExpressionValue(str2, "toLowerCase(...)");
            }
            if (!O.c(str3, locale, "toLowerCase(...)", str2)) {
                return false;
            }
        }
        return true;
    }

    public final void b0() {
        List<String> pathSegments;
        try {
            Intent intent = getIntent();
            List list = a.e.a;
            String stringExtra = intent.getStringExtra(a.e.Y1);
            Uri data = getIntent().getData();
            HashMap hashMap = new HashMap();
            if (data != null && (pathSegments = data.getPathSegments()) != null && pathSegments.contains("q")) {
                hashMap.put("utm_source", "shareredirect_" + data.getQueryParameter(S().C));
            }
            if (stringExtra == null && this.h) {
                stringExtra = a.e.h1;
            }
            if (stringExtra != null) {
                hashMap.put("Type", stringExtra);
            }
            if (data != null) {
                hashMap.put("Value", data.toString());
            }
            M().f("App Launch", hashMap, false);
            AppsFlyerLib.getInstance().logEvent(getApplicationContext(), "App Launch", new HashMap());
        } catch (Exception e2) {
            do.a.a.e(e2);
        }
    }

    public final void c0(String str, String str2) {
        try {
            HashMap hashMap = new HashMap();
            hashMap.put("Type", str);
            hashMap.put("Screen Name", "ROUTE Screen");
            if (str2 != null) {
                hashMap.put("Value", str2);
            }
            M().f("logFbAdsEvents", hashMap, false);
        } catch (Exception e2) {
            do.a.a.e(e2);
        }
    }

    public final void d0() {
        throw new UnsupportedOperationException("Method not decompiled: com.crafto.android.ui.splash.RouteActivity.d0():void");
    }

    public final void e0(Uri uri, String str) {
        String str2;
        long j;
        boolean z = true;
        String str3 = "toLowerCase(...)";
        a.a aVar = do.a.a;
        aVar.c("processDeeplink_2", new Object[0]);
        try {
            T().X(String.valueOf(uri));
            PreferencesHelperUsa U = U();
            String valueOf = String.valueOf(uri);
            U.getClass();
            aVar.c("setDeepLink ".concat(valueOf), new Object[0]);
            U.a.edit().putString(U.z, valueOf).apply();
            if (uri != null) {
                try {
                    String queryParameter = uri.getQueryParameter(S().O);
                    if (queryParameter != null) {
                        M().m(Q.f(new Pair[]{new Pair(S().O, queryParameter)}));
                        for (String str4 : a.e.a) {
                            if (StringsKt.C(queryParameter, str4, z)) {
                                a.a aVar2 = do.a.a;
                                StringBuilder sb = new StringBuilder();
                                sb.append("got params : : : 1 true ");
                                String upperCase = str4.toUpperCase(Locale.ROOT);
                                Intrinsics.checkNotNullExpressionValue(upperCase, "toUpperCase(...)");
                                sb.append(upperCase);
                                aVar2.c(sb.toString(), new Object[0]);
                                T().Y(true);
                            }
                            z = true;
                        }
                        Iterator it = a.e.T2.iterator();
                        while (it.hasNext()) {
                            String str5 = (String) it.next();
                            Locale locale = Locale.ROOT;
                            String lowerCase = queryParameter.toLowerCase(locale);
                            Intrinsics.checkNotNullExpressionValue(lowerCase, str3);
                            Iterator it2 = it;
                            String lowerCase2 = str5.toLowerCase(locale);
                            Intrinsics.checkNotNullExpressionValue(lowerCase2, str3);
                            String str6 = queryParameter;
                            if (StringsKt.C(lowerCase, lowerCase2, false)) {
                                a.a aVar3 = do.a.a;
                                StringBuilder sb2 = new StringBuilder();
                                sb2.append("got params : : : 1 true ");
                                String upperCase2 = str5.toUpperCase(locale);
                                Intrinsics.checkNotNullExpressionValue(upperCase2, "toUpperCase(...)");
                                sb2.append(upperCase2);
                                str2 = str3;
                                aVar3.c(sb2.toString(), new Object[0]);
                                T().f0(str5);
                                PreferencesHelperUsa U2 = U();
                                String upperCase3 = str5.toUpperCase(locale);
                                Intrinsics.checkNotNullExpressionValue(upperCase3, "toUpperCase(...)");
                                U2.x(upperCase3);
                                PreferencesHelper T = T();
                                String upperCase4 = str5.toUpperCase(locale);
                                Intrinsics.checkNotNullExpressionValue(upperCase4, "toUpperCase(...)");
                                T.Q(upperCase4);
                                T().b0(true);
                            } else {
                                str2 = str3;
                            }
                            it = it2;
                            queryParameter = str6;
                            str3 = str2;
                        }
                    }
                } catch (Exception e2) {
                    do.a.a.e(e2);
                }
            }
            if (uri != null) {
                String uri2 = uri.toString();
                Intrinsics.checkNotNullExpressionValue(uri2, "toString(...)");
                if (StringsKt.C(uri2, "beautification", false)) {
                    N().k(Q.f(new Pair[]{new Pair("Beauty App", Boolean.TRUE)}));
                    U().a.edit().putBoolean("keyIsBeautificationFlow", true).apply();
                }
            }
            try {
                j = System.currentTimeMillis() - this.X;
            } catch (Exception unused) {
                j = -1;
            }
            try {
                M().f("Log", Q.f(new Pair[]{new Pair("Type", a.e.i1), new Pair("Value", str), new Pair("Location", String.valueOf(uri)), new Pair("responseDuration", Long.valueOf(j))}), false);
                try {
                    M().m(Q.f(new Pair[]{new Pair(a.e.t1, str)}));
                } catch (Exception unused2) {
                }
            } catch (Exception e3) {
                do.a.a.e(e3);
            }
            HashMap hashMap = new HashMap();
            hashMap.put("Type", a.e.h1);
            hashMap.put("Value", String.valueOf(uri));
            M().f("Log", hashMap, false);
        } catch (Exception e4) {
            do.a.a.e(e4);
        }
        if (uri != null) {
            Intent intent = getIntent();
            if (intent != null) {
                intent.setData(uri);
            }
            do.a.a.c("hello", new Object[]{P.b(uri, "catching deep link #-1: storing deep link: ")});
            String uri3 = uri.toString();
            Intrinsics.checkNotNullExpressionValue(uri3, "toString(...)");
            if (uri3.length() > 0) {
                U().B(uri.toString());
            }
            V().d = uri;
            W().e = uri;
            U().L(uri.toString());
            U().D(true);
            T().j0(uri.toString());
            T().c0(true);
        }
        do.a.a.c(P.b(uri, "processDeeplink deepLink "), new Object[0]);
        if (uri != null) {
            try {
                Set<String> queryParameterNames = uri.getQueryParameterNames();
                if (queryParameterNames != null) {
                    HashMap hashMap2 = new HashMap();
                    for (String str7 : queryParameterNames) {
                        String queryParameter2 = uri.getQueryParameter(str7);
                        if (queryParameter2 != null) {
                            hashMap2.put(str7, queryParameter2);
                            if (p.h(str7, a.e.o2, true)) {
                                V().getClass();
                                W().getClass();
                                U().a.edit().putString("referralcode", queryParameter2).apply();
                                T().a.edit().putString("referralcode", queryParameter2).apply();
                            }
                        }
                    }
                    if (hashMap2.size() > 0) {
                        a.a aVar4 = do.a.a;
                        aVar4.c("profileUpdate " + hashMap2, new Object[0]);
                        if (T().c() == null) {
                            aVar4.c("pushProfile profileUpdate " + hashMap2, new Object[0]);
                            M().m(hashMap2);
                        }
                        if (U().a.getString("authToken", null) == null) {
                            aVar4.c("pushProfile profileUpdate " + hashMap2, new Object[0]);
                            N().k(hashMap2);
                        }
                    }
                }
            } catch (Exception e5) {
                do.a.a.e(e5);
            }
        }
        do.a.a.c("hello", new Object[]{"catching deep link #1: continue processing (process deep link)"});
        K(false);
    }

    public final void f0(String str, String str2, String str3, String str4, String str5) {
        try {
            do.a.a.c("sendNotificationClickEvent ".concat(str), new Object[0]);
            HashMap hashMap = new HashMap();
            hashMap.put("Type", "Click");
            hashMap.put("Location", str);
            hashMap.put("Tag", str2);
            List list = a.b.a;
            hashMap.put("displayImageUrl", str3);
            hashMap.put("sourceImageUrl", str4);
            hashMap.put(Constants.KEY_TITLE, str5);
            M().f("Notification Action", hashMap, false);
        } catch (Exception e2) {
            do.a.a.e(e2);
        }
    }

    public final void g0(String str) {
        try {
            M().m(Q.f(new Pair[]{new Pair("Country Name", str)}));
        } catch (Exception unused) {
        }
    }

    public final void h0() {
        final Uri data;
        final Uri data2 = getIntent().getData();
        U().L(String.valueOf(data2));
        T().j0(String.valueOf(data2));
        U().D(true);
        T().c0(true);
        V().e = String.valueOf(data2);
        W().f = String.valueOf(data2);
        final Ref.ObjectRef objectRef = new Ref.ObjectRef();
        final Ref.ObjectRef objectRef2 = new Ref.ObjectRef();
        final Ref.ObjectRef objectRef3 = new Ref.ObjectRef();
        Intent intent = getIntent();
        if (intent != null && (data = intent.getData()) != null) {
            do.a.a.c(P.b(data, "mytag uri is "), new Object[0]);
            Jb.a.b((String) null, new Function0() {
                public final Object invoke() {
                    List<String> pathSegments;
                    List<String> pathSegments2;
                    boolean z = RouteActivity.V1;
                    Uri uri = data;
                    Intrinsics.checkNotNullParameter(uri, "$it");
                    Intrinsics.checkNotNullParameter("referral_code", "$paramReferralCode");
                    Ref.ObjectRef objectRef4 = objectRef;
                    Intrinsics.checkNotNullParameter(objectRef4, "$referCode");
                    Ref.ObjectRef objectRef5 = objectRef3;
                    Intrinsics.checkNotNullParameter(objectRef5, "$resourceType");
                    Ref.ObjectRef objectRef6 = objectRef2;
                    Intrinsics.checkNotNullParameter(objectRef6, "$resourceId");
                    RouteActivity routeActivity = this;
                    Intrinsics.checkNotNullParameter(routeActivity, "this$0");
                    String uri2 = uri.toString();
                    Intrinsics.checkNotNullExpressionValue(uri2, "toString(...)");
                    if (StringsKt.C(uri2, "referral_code", false)) {
                        objectRef4.element = uri.getQueryParameter("referral_code");
                    }
                    if (((String) objectRef4.element) == null) {
                        return null;
                    }
                    Uri uri3 = data2;
                    int size = (uri3 == null || (pathSegments2 = uri3.getPathSegments()) == null) ? 0 : pathSegments2.size();
                    boolean z2 = size % 2 != 0;
                    if (uri3 != null && (pathSegments = uri3.getPathSegments()) != null) {
                        int i = 0;
                        for (Object obj : pathSegments) {
                            int i2 = i + 1;
                            if (i < 0) {
                                kotlin.collections.t.m();
                                throw null;
                            }
                            String str = (String) obj;
                            if (i != size - 1 || !z2) {
                                objectRef5.element = objectRef6.element;
                                objectRef6.element = str;
                            }
                            i = i2;
                        }
                    }
                    do.a.a.c("mytag resource type " + ((String) objectRef5.element) + " resource id " + ((String) objectRef6.element), new Object[0]);
                    w wVar = (w) routeActivity.Q.getValue();
                    Object obj2 = objectRef4.element;
                    Intrinsics.checkNotNull(obj2);
                    String str2 = (String) obj2;
                    String str3 = (String) objectRef5.element;
                    String str4 = (String) objectRef6.element;
                    wVar.getClass();
                    Intrinsics.checkNotNullParameter(str2, "referCode");
                    boolean z3 = CraftoApp.y;
                    HashMap hashMap = new HashMap();
                    H h2 = wVar.b;
                    hashMap.put(h2.m0, str2);
                    if (str3 != null) {
                        hashMap.put(h2.z0, str3);
                    }
                    if (str4 != null) {
                        hashMap.put(h2.A0, str4);
                    }
                    dl.g.b(s0.a(wVar), (CoroutineContext) null, (dl.J) null, new x(wVar, hashMap, null), 3);
                    return Unit.a;
                }
            });
        }
        if (Z() || Y()) {
            gb.g R = R();
            Intent intent2 = getIntent();
            Intrinsics.checkNotNullExpressionValue(intent2, "getIntent(...)");
            gb.g.t(R, this, intent2, false, false, 12);
            return;
        }
        C2216g Q = Q();
        Intent intent3 = getIntent();
        Intrinsics.checkNotNullExpressionValue(intent3, "getIntent(...)");
        C2216g.w(Q, this, intent3, false, false, null, 28);
    }

    public final void i0(@NotNull Context context, @NotNull String str) {
        Intrinsics.checkNotNullParameter(context, "context");
        Intrinsics.checkNotNullParameter(str, "localeStr");
        try {
            a.a aVar = do.a.a;
            aVar.c("updateLocale " + str + ' ', new Object[0]);
            aVar.c("LOCALE : ".concat(str), new Object[0]);
            if (Intrinsics.areEqual("", str)) {
                return;
            }
            Resources resources = context.getResources();
            Configuration configuration = resources.getConfiguration();
            Locale locale = new Locale(str);
            Locale.setDefault(locale);
            if (Build.VERSION.SDK_INT >= 24) {
                C0243g.b();
                LocaleList a2 = C0.a(new Locale[]{locale});
                LocaleList.setDefault(a2);
                l.n.a(configuration, a2);
                context.createConfigurationContext(configuration);
            } else {
                configuration.locale = locale;
                resources.updateConfiguration(configuration, resources.getDisplayMetrics());
            }
            T().f0(str);
            U().G(str);
        } catch (Exception e2) {
            do.a.a.e(e2);
        }
    }

    @Override
    public final void onCreate(android.os.Bundle r13) {
        throw new UnsupportedOperationException("Method not decompiled: com.crafto.android.ui.splash.RouteActivity.onCreate(android.os.Bundle):void");
    }

    @Override
    public final void onDestroy() {
        super.onDestroy();
        Handler handler = this.I;
        if (handler != null) {
            handler.removeCallbacks(this.P);
        }
        this.I = null;
    }

    public final void onInstallReferrerServiceDisconnected() {
        do.a.a.c("onInstallReferrerServiceDisconnected", new Object[0]);
    }

    public final void onInstallReferrerSetupFinished(int i) {
        dl.g.b(J.a(this), (CoroutineContext) null, (dl.J) null, new e(i, this, null), 3);
    }

    public final void onNewIntent(@NotNull Intent intent) {
        Intrinsics.checkNotNullParameter(intent, "intent");
        super/*androidx.activity.ComponentActivity*/.onNewIntent(intent);
        setIntent(intent);
    }

    public final void onStart() {
        super.onStart();
        do.a.a.c("NDlogs onStart", new Object[0]);
        SharedPreferences sharedPreferences = this.B;
        if (sharedPreferences != null) {
            sharedPreferences.registerOnSharedPreferenceChangeListener(this.H);
        }
    }

    public final void onStop() {
        super.onStop();
        Jb.a.b((String) null, new C0808d1(this, 2));
    }
}