导航菜单

页面标题

页面副标题

Bhakti v5.4.0 - Q1.java 源代码

正在查看: Bhakti v5.4.0 应用的 Q1.java JAVA 源代码文件

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


package com.vlv.aravali.master.ui;

import android.content.Context;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.Build;
import bj.EnumC0911b;
import com.vlv.aravali.KukuFMApplication;
import com.vlv.aravali.coachMarks.CoachMarkResponse;
import com.vlv.aravali.common.models.DemographicOptions;
import com.vlv.aravali.common.models.FreeTrialResponse;
import com.vlv.aravali.common.models.GuiltData;
import com.vlv.aravali.common.models.Language;
import com.vlv.aravali.common.models.User;
import com.vlv.aravali.common.models.appConfigs.Config;
import com.vlv.aravali.common.models.appConfigs.DynamicPlaceHolder;
import com.vlv.aravali.common.models.appConfigs.FreePlatformConfig;
import com.vlv.aravali.common.models.appConfigs.IsServedMlt;
import com.vlv.aravali.common.models.appConfigs.PaymentFlow;
import com.vlv.aravali.common.models.appConfigs.UpgradePlanData;
import com.vlv.aravali.common.models.user.UserResponse;
import com.vlv.aravali.master.data.MasterConfig;
import in.juspay.hyper.constants.LogCategory;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import kotlin.Pair;
import kotlin.Unit;
import kotlin.coroutines.CoroutineContext;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.StringsKt;
import nl.C2198b;

public final class Q1 extends rp.i implements Function2 {
    public final MasterConfig a;
    public final MasterActivity b;

    public Q1(MasterConfig masterConfig, MasterActivity masterActivity, pp.c cVar) {
        super(2, cVar);
        this.a = masterConfig;
        this.b = masterActivity;
    }

    public final pp.c create(Object obj, pp.c cVar) {
        return new Q1(this.a, this.b, cVar);
    }

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

    public final Object invokeSuspend(Object obj) {
        List<CoachMarkResponse> coachMarks;
        Vk.w0 mMasterViewModel;
        Integer ttl;
        Config config;
        MasterConfig.CampaignData campaignData;
        FreeTrialResponse freeTrialResponse;
        UserResponse userResponse;
        Vk.w0 mMasterViewModel2;
        Config config2;
        Object obj2;
        qp.a aVar = qp.a.COROUTINE_SUSPENDED;
        z5.K.w(obj);
        Ai.p pVar = KukuFMApplication.x;
        androidx.datastore.preferences.protobuf.o.r(pVar, "master_config_success");
        MasterConfig masterConfig = this.a;
        ?? r8 = this.b;
        if (masterConfig != null && (config2 = masterConfig.getConfig()) != null) {
            uj.d h = pVar.B().h();
            Intrinsics.checkNotNullParameter(config2, "config");
            h.d = config2;
            Sp.f fVar = Kp.V.a;
            Kp.p.w(Kp.p.b(Sp.e.c), (CoroutineContext) null, (Kp.J) null, new uj.b(h, config2, null), 3);
            Intrinsics.checkNotNullParameter(config2, "config");
            Qn.e.f = config2;
            uj.d h2 = pVar.B().h();
            String accountInviteMsg = config2.getAccountInviteMsg();
            if (accountInviteMsg == null) {
                accountInviteMsg = "";
            }
            SharedPreferences.Editor edit = h2.a.a.edit();
            edit.putString("account_invite_msg", accountInviteMsg);
            edit.apply();
            SharedPreferences.Editor edit2 = pVar.B().h().a.a.edit();
            edit2.putBoolean("fb_link_processed", true);
            edit2.apply();
            pVar.B().j = false;
            ArrayList<Language> languages = config2.getLanguages();
            if (languages != null) {
                pVar.B().h().P(languages);
            }
            Boolean isVipOnly = config2.isVipOnly();
            if (isVipOnly != null) {
                pVar.B().h().b0(isVipOnly.booleanValue());
            }
            uj.d h3 = pVar.B().h();
            Boolean isOtpAuthAvailable = config2.isOtpAuthAvailable();
            boolean booleanValue = isOtpAuthAvailable != null ? isOtpAuthAvailable.booleanValue() : true;
            SharedPreferences.Editor edit3 = h3.a.a.edit();
            edit3.putBoolean("should_use_be_otp_service", booleanValue);
            edit3.apply();
            uj.d h4 = pVar.B().h();
            ArrayList<String> otpCountryCodes = config2.getOtpCountryCodes();
            if (otpCountryCodes == null) {
                otpCountryCodes = new ArrayList<>();
            }
            Intrinsics.checkNotNullParameter(otpCountryCodes, "otpCountryCodeList");
            String h5 = new com.google.gson.d().h(otpCountryCodes);
            SharedPreferences.Editor edit4 = h4.a.a.edit();
            edit4.putString("otp_country_codes", h5);
            edit4.apply();
            GuiltData guiltData = config2.getGuiltData();
            GuiltData guiltDataForRNPL = config2.getGuiltDataForRNPL();
            Qn.e.d = guiltData;
            Qn.e.e = guiltDataForRNPL;
            int i = pVar.B().h().a.a.getInt("guilt_dialog_version", 1);
            int b = (int) Pk.j.b("guilt_popup_version");
            if (b > i) {
                SharedPreferences.Editor edit5 = pVar.B().h().a.a.edit();
                edit5.putInt("guilt_dialog_shown_count", 0);
                edit5.apply();
                SharedPreferences.Editor edit6 = pVar.B().h().a.a.edit();
                edit6.putInt("guilt_dialog_shown_today_count", 0);
                edit6.apply();
                SharedPreferences.Editor edit7 = pVar.B().h().a.a.edit();
                edit7.putInt("guilt_dialog_version", b);
                edit7.apply();
                Bi.k l = pVar.B().d().l("guilt_popup_version_reset");
                l.c(String.valueOf(i), "prev_version");
                l.c(String.valueOf(b), "new_version");
                l.d();
            }
            uj.d h6 = pVar.B().h();
            String paymentPendingMsg = config2.getPaymentPendingMsg();
            h6.e0(paymentPendingMsg != null ? paymentPendingMsg : "");
            uj.d h7 = pVar.B().h();
            String h8 = new com.google.gson.d().h(config2.getSystemUpgradeData());
            SharedPreferences.Editor edit8 = h7.a.a.edit();
            edit8.putString("system_upgrade_data", h8);
            edit8.apply();
            pVar.B().h().M(config2.getBottomNavMenuItems());
            DemographicOptions demographicOptions = config2.getDemographicOptions();
            if (demographicOptions != null) {
                uj.d h9 = pVar.B().h();
                ArrayList<String> age_bracket = demographicOptions.getAge_bracket();
                Intrinsics.checkNotNullParameter(age_bracket, "otpCountryCodeList");
                String h10 = new com.google.gson.d().h(age_bracket);
                SharedPreferences.Editor edit9 = h9.a.a.edit();
                edit9.putString("age_bracket", h10);
                edit9.apply();
                uj.d h11 = pVar.B().h();
                ArrayList<String> occupation = demographicOptions.getOccupation();
                Intrinsics.checkNotNullParameter(occupation, "otpCountryCodeList");
                Ai.o.B(h11.a.a, "occupation", new com.google.gson.d().h(occupation));
            }
            Boolean isInternationalSession = config2.isInternationalSession();
            if (isInternationalSession != null) {
                Ai.o.C(pVar.B().h().a.a, "is_international_user", isInternationalSession.booleanValue());
            }
            List<DynamicPlaceHolder> dynamicPlaceHolders = config2.getDynamicPlaceHolders();
            if (dynamicPlaceHolders != null) {
                Intrinsics.checkNotNullParameter(dynamicPlaceHolders, "dynamicPlaceHolder");
                Qn.e.m = dynamicPlaceHolders;
            }
            String headPhoneNudgeText = config2.getHeadPhoneNudgeText();
            if (headPhoneNudgeText != null) {
                Qn.e.n = headPhoneNudgeText;
            }
            Qn.e.o = config2.getShow7DaysFtNudge();
            ArrayList<String> searchTabItems = config2.getSearchTabItems();
            if (searchTabItems != null) {
                Intrinsics.checkNotNullParameter(searchTabItems, "searchTabItems");
                Qn.e.q = searchTabItems;
            }
            Qn.e.r = config2.getUdcPlayStoreNudge();
            Qn.e.u = config2.getHideMiniPlayerCrossIcon();
            Qn.e.y = config2.getShowCommentAnimation();
            String bgPlayEnabledNudgeText = config2.getBgPlayEnabledNudgeText();
            if (bgPlayEnabledNudgeText != null) {
                Qn.e.z = bgPlayEnabledNudgeText;
            }
            Qn.e.A = config2.isTangentialShowsSupported();
            UpgradePlanData upgradePlanData = config2.getUpgradePlanData();
            if (upgradePlanData != null) {
                Intrinsics.checkNotNullParameter(upgradePlanData, "data");
                Qn.e.B = upgradePlanData;
            }
            List<PaymentFlow> paymentFlows = config2.getPaymentFlows();
            List<PaymentFlow> list = paymentFlows;
            if (list != null && !list.isEmpty()) {
                ArrayList arrayList = new ArrayList();
                for (PaymentFlow paymentFlow : paymentFlows) {
                    Iterator it = EnumC0911b.getEntries().iterator();
                    while (true) {
                        if (!it.hasNext()) {
                            obj2 = null;
                            break;
                        }
                        obj2 = it.next();
                        if (Intrinsics.c(((EnumC0911b) obj2).getValue(), paymentFlow.getType())) {
                            break;
                        }
                    }
                    EnumC0911b enumC0911b = (EnumC0911b) obj2;
                    Pair pair = enumC0911b != null ? new Pair(enumC0911b, paymentFlow.getFlow()) : null;
                    if (pair != null) {
                        arrayList.add(pair);
                    }
                }
                Qn.e.C = kotlin.collections.S.k(arrayList);
            }
            Intrinsics.checkNotNullParameter((Object) r8, LogCategory.CONTEXT);
            Intrinsics.checkNotNullParameter((Object) r8, LogCategory.CONTEXT);
            SharedPreferences sharedPreferences = r8.getSharedPreferences("com.vlv.aravali.bhakti", 0);
            Intrinsics.checkNotNullExpressionValue(sharedPreferences, "getSharedPreferences(...)");
            Intrinsics.checkNotNullParameter((Object) r8, LogCategory.CONTEXT);
            Intrinsics.checkNotNullExpressionValue(r8.getSharedPreferences("PersistentSharedPref", 0), "getSharedPreferences(...)");
            boolean showUdcQuestions = config2.getShowUdcQuestions();
            SharedPreferences.Editor edit10 = sharedPreferences.edit();
            edit10.putBoolean("shouldShowUDCConfig", showUdcQuestions);
            edit10.apply();
            Intrinsics.checkNotNullParameter((Object) r8, LogCategory.CONTEXT);
            Intrinsics.checkNotNullParameter((Object) r8, LogCategory.CONTEXT);
            SharedPreferences sharedPreferences2 = r8.getSharedPreferences("com.vlv.aravali.bhakti", 0);
            Intrinsics.checkNotNullExpressionValue(sharedPreferences2, "getSharedPreferences(...)");
            Intrinsics.checkNotNullParameter((Object) r8, LogCategory.CONTEXT);
            Intrinsics.checkNotNullExpressionValue(r8.getSharedPreferences("PersistentSharedPref", 0), "getSharedPreferences(...)");
            int udcDelayTimer = config2.getUdcDelayTimer();
            SharedPreferences.Editor edit11 = sharedPreferences2.edit();
            edit11.putInt("udcDelayTimer", udcDelayTimer);
            edit11.apply();
            Intrinsics.checkNotNullParameter((Object) r8, LogCategory.CONTEXT);
            Intrinsics.checkNotNullParameter((Object) r8, LogCategory.CONTEXT);
            SharedPreferences sharedPreferences3 = r8.getSharedPreferences("com.vlv.aravali.bhakti", 0);
            Intrinsics.checkNotNullExpressionValue(sharedPreferences3, "getSharedPreferences(...)");
            Intrinsics.checkNotNullParameter((Object) r8, LogCategory.CONTEXT);
            Intrinsics.checkNotNullExpressionValue(r8.getSharedPreferences("PersistentSharedPref", 0), "getSharedPreferences(...)");
            boolean isUdcDismissible = config2.isUdcDismissible();
            SharedPreferences.Editor edit12 = sharedPreferences3.edit();
            edit12.putBoolean("should_allow_dismiss_udc_config", isUdcDismissible);
            edit12.apply();
            IsServedMlt isServedMlt = config2.isServedMlt();
            if (isServedMlt != null) {
                Intrinsics.checkNotNullParameter((Object) r8, LogCategory.CONTEXT);
                Intrinsics.checkNotNullParameter((Object) r8, LogCategory.CONTEXT);
                SharedPreferences sharedPreferences4 = r8.getSharedPreferences("com.vlv.aravali.bhakti", 0);
                Intrinsics.checkNotNullExpressionValue(sharedPreferences4, "getSharedPreferences(...)");
                Intrinsics.checkNotNullParameter((Object) r8, LogCategory.CONTEXT);
                Intrinsics.checkNotNullExpressionValue(r8.getSharedPreferences("PersistentSharedPref", 0), "getSharedPreferences(...)");
                boolean onScrollUp = isServedMlt.getOnScrollUp();
                SharedPreferences.Editor edit13 = sharedPreferences4.edit();
                edit13.putBoolean("onScrollUpMlt", onScrollUp);
                edit13.apply();
                Intrinsics.checkNotNullParameter((Object) r8, LogCategory.CONTEXT);
                Intrinsics.checkNotNullParameter((Object) r8, LogCategory.CONTEXT);
                SharedPreferences sharedPreferences5 = r8.getSharedPreferences("com.vlv.aravali.bhakti", 0);
                Intrinsics.checkNotNullExpressionValue(sharedPreferences5, "getSharedPreferences(...)");
                Intrinsics.checkNotNullParameter((Object) r8, LogCategory.CONTEXT);
                Intrinsics.checkNotNullExpressionValue(r8.getSharedPreferences("PersistentSharedPref", 0), "getSharedPreferences(...)");
                Ai.o.C(sharedPreferences5, "onBackPressMlt", isServedMlt.getOnBackSwipe());
            }
        }
        if (masterConfig != null && (userResponse = masterConfig.getUserResponse()) != null) {
            mMasterViewModel2 = r8.getMMasterViewModel();
            mMasterViewModel2.getClass();
            Intrinsics.checkNotNullParameter(userResponse, "response");
            mMasterViewModel2.e = userResponse;
            Intrinsics.checkNotNullParameter(userResponse, "response");
            ArrayList arrayList2 = Qn.e.a;
            String unlockEpisodeSaleBadgeMessage = userResponse.getUnlockEpisodeSaleBadgeMessage();
            UserResponse.DiscountRibbonData discountRibbonData = userResponse.getDiscountRibbonData();
            Qn.e.g = new Pair(unlockEpisodeSaleBadgeMessage, discountRibbonData != null ? discountRibbonData.getDeeplink() : null);
            Ai.p pVar2 = KukuFMApplication.x;
            Tf.d dVar = pVar2.B().h().a;
            int i2 = dVar.a.getInt("no_of_times_app_opened", 0) + 1;
            SharedPreferences.Editor edit14 = dVar.a.edit();
            edit14.putInt("no_of_times_app_opened", i2);
            edit14.apply();
            User user = userResponse.getUser();
            if (user != null) {
                pVar2.B().h().o0(user);
                List list2 = Qn.m.a;
                Qn.m.a = user.getExperiments();
            }
            UserResponse.SettingsData settingsData = userResponse.getSettingsData();
            if (settingsData != null) {
                pVar2.B().h().f0(settingsData);
            }
        }
        if (masterConfig != null && (freeTrialResponse = masterConfig.getFreeTrialResponse()) != null) {
            r8.onFreeTrialSuccess(freeTrialResponse);
        }
        if (masterConfig != null && (campaignData = masterConfig.getCampaignData()) != null) {
            ArrayList arrayList3 = Qn.e.a;
            Intrinsics.checkNotNullParameter(campaignData, "data");
            Qn.e.p = campaignData;
            String i3 = KukuFMApplication.x.B().h().i();
            String navigationUri = campaignData.getNavigationUri();
            if ((navigationUri == null || StringsKt.H(navigationUri)) && !StringsKt.y(i3, "is_coin_referral=true", false)) {
                r8.getIntent().setData(Uri.EMPTY);
            }
        }
        if (((masterConfig == null || (config = masterConfig.getConfig()) == null) ? null : config.getFreePlatformConfig()) != null) {
            FreePlatformConfig freePlatformConfig = masterConfig.getConfig().getFreePlatformConfig();
            if (freePlatformConfig != null) {
                ArrayList arrayList4 = Qn.e.a;
                Intrinsics.checkNotNullParameter(freePlatformConfig, "freeUserSessionData");
                Qn.e.w = freePlatformConfig;
                r8.initDynamicAppShortcutFeatures(freePlatformConfig.getShowFreeSessionShortcut());
                if (freePlatformConfig.getTtl() != null && ((ttl = freePlatformConfig.getTtl()) == null || ttl.intValue() != 0)) {
                    Ai.p pVar3 = KukuFMApplication.x;
                    uj.d h12 = pVar3.B().h();
                    Integer ttl2 = freePlatformConfig.getTtl();
                    Intrinsics.e(ttl2);
                    int intValue = ttl2.intValue();
                    SharedPreferences.Editor edit15 = h12.a.a.edit();
                    edit15.putInt("user_free_session_duration", intValue);
                    edit15.apply();
                    uj.d h13 = pVar3.B().h();
                    int currentTimeMillis = (int) (System.currentTimeMillis() / 1000);
                    SharedPreferences.Editor edit16 = h13.a.a.edit();
                    edit16.putInt("user_free_session_start_time", currentTimeMillis);
                    edit16.apply();
                    kp.b bVar = nl.a.a;
                    nl.a.b(new C2198b(ij.i.INIT_FREE_SESSION_WORKER, new Object[0]));
                }
            }
        } else {
            Intrinsics.checkNotNullParameter((Object) r8, LogCategory.CONTEXT);
            Intrinsics.checkNotNullParameter("free_session", "shortcutId");
            int i4 = Build.VERSION.SDK_INT;
            if (i4 >= 25) {
                List c = kotlin.collections.x.c("free_session");
                if (i4 >= 25) {
                    V1.e.g(V1.e.c(r8.getSystemService(V1.e.d())), c);
                }
                V1.g.y((Context) r8).getClass();
                Iterator it2 = ((ArrayList) V1.g.x((Context) r8)).iterator();
                if (it2.hasNext()) {
                    Ii.b.w(it2.next());
                    throw null;
                }
            }
        }
        if (masterConfig != null && (coachMarks = masterConfig.getCoachMarks()) != null) {
            mMasterViewModel = r8.getMMasterViewModel();
            mMasterViewModel.getClass();
            Intrinsics.checkNotNullParameter(coachMarks, "coachMarkData");
            V2.a k = androidx.lifecycle.i0.k(mMasterViewModel);
            Sp.f fVar2 = Kp.V.a;
            Kp.p.w(k, Sp.e.c, (Kp.J) null, new Vk.i0(mMasterViewModel, coachMarks, null), 2);
        }
        r8.initializeNavController();
        r8.initBottomPlayer();
        r8.initMediaViewModel();
        r8.initReels();
        r8.initRemainingHomeFeatures(masterConfig);
        r8.initUdc();
        Ai.p pVar4 = KukuFMApplication.x;
        Bi.k r = io.sentry.config.d.r(pVar4, "main_activity_on_create");
        r.c(Bi.y.a(), "timestamp");
        r.j(true);
        Ai.o.C(pVar4.B().h().a.a, "is_main_activity_created", true);
        return Unit.a;
    }
}