正在查看: Mint v5.7.3 应用的 PlanPageActivityRevamp2025.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Mint v5.7.3 应用的 PlanPageActivityRevamp2025.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.htmedia.mint.htsubscription.planpagerewamp.ui.activities;
import android.app.ActivityOptions;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Parcelable;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.Window;
import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import androidx.core.content.res.ResourcesCompat;
import androidx.databinding.DataBindingUtil;
import androidx.recyclerview.widget.LinearLayoutManager;
import com.google.android.gms.common.util.CollectionUtils;
import com.google.firebase.analytics.FirebaseAnalytics;
import com.google.firebase.perf.FirebasePerformance;
import com.google.firebase.perf.network.FirebasePerfUrlConnection;
import com.htmedia.mint.AppController;
import com.htmedia.mint.R;
import com.htmedia.mint.htsubscription.CheckSubscriptionFromLocal;
import com.htmedia.mint.htsubscription.ConvertMintPlanIntoZSPlan;
import com.htmedia.mint.htsubscription.GetSubscriptionIntent;
import com.htmedia.mint.htsubscription.GetUserSubscriptionDetail;
import com.htmedia.mint.htsubscription.SnowplowSubscriptionAnalytices;
import com.htmedia.mint.htsubscription.SubscriptionConverter;
import com.htmedia.mint.htsubscription.SubscriptionPlanSingleton;
import com.htmedia.mint.htsubscription.SubscriptionTrigger;
import com.htmedia.mint.htsubscription.SyncPurchaseWithSession;
import com.htmedia.mint.htsubscription.WebEngageAnalytices;
import com.htmedia.mint.htsubscription.ZSErrorCodeHandling;
import com.htmedia.mint.htsubscription.ZohoInAppConfig;
import com.htmedia.mint.htsubscription.planpagerewamp.Constants;
import com.htmedia.mint.htsubscription.planpagerewamp.adapters.BenefitsOfSubscriptionsAdapter;
import com.htmedia.mint.htsubscription.planpagerewamp.adapters.PPRFaqAdapter;
import com.htmedia.mint.htsubscription.planpagerewamp.adapters.PlansListAdapterRevamp2025;
import com.htmedia.mint.htsubscription.planpagerewamp.adapters.TestimonialsAdapter;
import com.htmedia.mint.htsubscription.planpagerewamp.adapters.YouWillAlsoGetAdapter;
import com.htmedia.mint.htsubscription.planpagerewamp.coupon.CouponModulePlanPageRevamp2025;
import com.htmedia.mint.htsubscription.subsutils.SubscriptionUtils;
import com.htmedia.mint.juspay.JuspayCheckout;
import com.htmedia.mint.piano.PianoAppConstant;
import com.htmedia.mint.piano.PianoCallbackListener;
import com.htmedia.mint.piano.PianoCallbacks;
import com.htmedia.mint.piano.PianoResponse;
import com.htmedia.mint.piano.PianoResponseUtils;
import com.htmedia.mint.pojo.Content;
import com.htmedia.mint.pojo.ForyouPojo;
import com.htmedia.mint.pojo.Metadata;
import com.htmedia.mint.pojo.config.Config;
import com.htmedia.mint.pojo.config.planpage.Android;
import com.htmedia.mint.pojo.config.planpage.Benefit;
import com.htmedia.mint.pojo.config.planpage.ContentsItem;
import com.htmedia.mint.pojo.config.planpage.Cred;
import com.htmedia.mint.pojo.config.planpage.Faq;
import com.htmedia.mint.pojo.config.planpage.Header;
import com.htmedia.mint.pojo.config.planpage.PlanPageV3;
import com.htmedia.mint.pojo.config.planpage.SectionsItem;
import com.htmedia.mint.pojo.config.planpage.StudentOffer;
import com.htmedia.mint.pojo.config.planpage.Testimonial;
import com.htmedia.mint.pojo.mintsubscribenowmodel.SubscribeNowPerant;
import com.htmedia.mint.pojo.planpage.BenefitsV3;
import com.htmedia.mint.pojo.planpage.CredV3;
import com.htmedia.mint.pojo.planpage.FAQsV3;
import com.htmedia.mint.pojo.planpage.FaqResult;
import com.htmedia.mint.pojo.planpage.HeadersV3;
import com.htmedia.mint.pojo.planpage.PaymentMethod;
import com.htmedia.mint.pojo.planpage.PianoPlan;
import com.htmedia.mint.pojo.planpage.PlanPageExperienceV3;
import com.htmedia.mint.pojo.planpage.PlansV3;
import com.htmedia.mint.pojo.planpage.StudentOffersV3;
import com.htmedia.mint.pojo.planpage.TestimonialV3;
import com.htmedia.mint.pojo.planpage.Testimonials;
import com.htmedia.mint.pojo.subscription.ErrorCode;
import com.htmedia.mint.pojo.subscription.SubscriptionError;
import com.htmedia.mint.pojo.subscription.SubscriptionSource;
import com.htmedia.mint.pojo.subscription.plandetail.htapi.MintPlan;
import com.htmedia.mint.pojo.subscription.plandetail.htapi.MintPlanWithZSPlan;
import com.htmedia.mint.pojo.subscription.plandetail.htapi.MintServerPlan;
import com.htmedia.mint.pojo.subscription.plandetail.htapi.Plans;
import com.htmedia.mint.pojo.subscription.plandetail.htapi.SubsPlans;
import com.htmedia.mint.pojo.subscription.userdetail.MintSubscriptionDetail;
import com.htmedia.mint.razorpay.coupon.CouponUtils;
import com.htmedia.mint.razorpay.pojo.coupon.partner.CouponPartner;
import com.htmedia.mint.razorpay.pojo.coupon.partner.PartnersOfferPojo;
import com.htmedia.mint.razorpay.presenter.PartnersOfferPresenter;
import com.htmedia.mint.razorpay.presenter.PartnersOfferViewInterface;
import com.htmedia.mint.razorpay.presenter.TestimonialPresenter;
import com.htmedia.mint.razorpay.presenter.TestimonialViewInterface;
import com.htmedia.mint.razorpay.ui.SubscriptionCheckOutPage;
import com.htmedia.mint.razorpay.utils.RazorPayCheckout;
import com.htmedia.mint.studentoffer.StudentOfferWebView;
import com.htmedia.mint.ui.activity.HomeActivity;
import com.htmedia.mint.utils.f0;
import com.htmedia.mint.utils.n;
import com.htmedia.mint.utils.o0;
import com.htmedia.mint.utils.q;
import com.htmedia.mint.utils.s0;
import com.htmedia.sso.activities.LoginRegisterActivity;
import com.razorpay.PaymentData;
import com.razorpay.PaymentResultWithDataListener;
import com.zoho.zsm.inapppurchase.core.ZSInAppPurchaseKit;
import com.zoho.zsm.inapppurchase.interfaces.PlanDetailsListener;
import com.zoho.zsm.inapppurchase.interfaces.PurchaseUpdationListener;
import com.zoho.zsm.inapppurchase.model.ZSCustomField;
import com.zoho.zsm.inapppurchase.model.ZSError;
import com.zoho.zsm.inapppurchase.model.ZSPlan;
import com.zoho.zsm.inapppurchase.model.ZSSubscriptionDetail;
import java.io.IOException;
import java.io.Serializable;
import java.net.MalformedURLException;
import java.net.ProtocolException;
import java.net.URL;
import java.net.URLConnection;
import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.net.ssl.HttpsURLConnection;
import k6.c1;
import k6.d1;
import l5.c;
import org.json.JSONObject;
import x4.i2;
import x4.kk0;
public class PlanPageActivityRevamp2025 extends com.htmedia.mint.ui.activity.a implements d1, PlanDetailsListener, PianoCallbackListener, PlansListAdapterRevamp2025.PlanSelected, GetUserSubscriptionDetail.OnSubscriptionDetail, PurchaseUpdationListener, PaymentResultWithDataListener {
private static final int SIGN_IN_REQUEST = 1001;
private String adFreeUser;
private Config config;
private Content content;
COUNTRY country;
private CouponModulePlanPageRevamp2025 couponModulePlanPage;
private boolean isNightMode;
private boolean isRazorPayEnabled;
private boolean isToShowAdFreeText;
private JuspayCheckout juspayCheckout;
i2 mBinding;
private boolean mNeedToSetPassword;
String mStringCountry;
private MintPlanWithZSPlan mintPlanWithZSPlan;
private NumberFormat numberFormat;
private ProgressDialog pDialog;
private PlanPageExperienceV3 planPageExperienceV3;
private PlanPageV3 planPageV3;
private PlansListAdapterRevamp2025 plansListAdapter;
private RazorPayCheckout razorPayCheckout;
private PlansV3 renderPlanV3;
private ZSPlan selectedPlan;
String selectedPlanCode;
private long startTimeStamp;
public String paywallReason = "";
String TAG = "PlanPageActivityRevamp2025";
private String recommendedPlan = "";
private String defaultSelectedPlan = "";
private String recommendedText = "";
private LinkedHashMap<String, ArrayList<MintPlanWithZSPlan>> planHashMap = new LinkedHashMap<>();
private ArrayList<MintPlanWithZSPlan> mintOnlyList = new ArrayList<>();
private ArrayList<MintPlanWithZSPlan> wsjOnlyList = new ArrayList<>();
private ArrayList<MintPlanWithZSPlan> mintBarronOnlyList = new ArrayList<>();
private ArrayList<MintPlanWithZSPlan> wsjBarronOnlyList = new ArrayList<>();
private ArrayList<MintPlanWithZSPlan> ecoOnlyList = new ArrayList<>();
private ArrayList<MintPlanWithZSPlan> mintLiteOnlyList = new ArrayList<>();
private ArrayList<PartnersOfferPojo> bankCouponOfferList = new ArrayList<>();
private ArrayList<PartnersOfferPojo> partnerBenefitsList = new ArrayList<>();
private String couponCodePartner = "";
private String couponCodeTemp = "";
private String funnelName = "";
private String premiumStory = "";
private String lastAccessUrl = "";
private SubscriptionConverter.PLAN_CAMPAIGN planCampaign = SubscriptionConverter.PLAN_CAMPAIGN.CAMPAIGN_KNOWN;
private q.d couponModule = q.d.d;
private CouponUtils.COUPONSTATUS couponstatus = CouponUtils.COUPONSTATUS.APPLY;
private String mobileNumber = "";
static class AnonymousClass9 {
static final int[] $SwitchMap$com$htmedia$mint$htsubscription$SubscriptionConverter$PLAN_CAMPAIGN;
static final int[] $SwitchMap$com$htmedia$mint$htsubscription$SubscriptionConverter$PLAN_CATEGORY;
static final int[] $SwitchMap$com$htmedia$mint$utils$AppConstants$PAYMENT_TYPE;
static {
int[] iArr = new int[q.v.values().length];
$SwitchMap$com$htmedia$mint$utils$AppConstants$PAYMENT_TYPE = iArr;
try {
iArr[q.v.a.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$com$htmedia$mint$utils$AppConstants$PAYMENT_TYPE[q.v.e.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
$SwitchMap$com$htmedia$mint$utils$AppConstants$PAYMENT_TYPE[q.v.c.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
$SwitchMap$com$htmedia$mint$utils$AppConstants$PAYMENT_TYPE[q.v.d.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
$SwitchMap$com$htmedia$mint$utils$AppConstants$PAYMENT_TYPE[q.v.b.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
int[] iArr2 = new int[SubscriptionConverter.PLAN_CATEGORY.values().length];
$SwitchMap$com$htmedia$mint$htsubscription$SubscriptionConverter$PLAN_CATEGORY = iArr2;
try {
iArr2[SubscriptionConverter.PLAN_CATEGORY.MINT.ordinal()] = 1;
} catch (NoSuchFieldError unused6) {
}
try {
$SwitchMap$com$htmedia$mint$htsubscription$SubscriptionConverter$PLAN_CATEGORY[SubscriptionConverter.PLAN_CATEGORY.WSJ.ordinal()] = 2;
} catch (NoSuchFieldError unused7) {
}
try {
$SwitchMap$com$htmedia$mint$htsubscription$SubscriptionConverter$PLAN_CATEGORY[SubscriptionConverter.PLAN_CATEGORY.ECO.ordinal()] = 3;
} catch (NoSuchFieldError unused8) {
}
try {
$SwitchMap$com$htmedia$mint$htsubscription$SubscriptionConverter$PLAN_CATEGORY[SubscriptionConverter.PLAN_CATEGORY.MINT_LITE.ordinal()] = 4;
} catch (NoSuchFieldError unused9) {
}
try {
$SwitchMap$com$htmedia$mint$htsubscription$SubscriptionConverter$PLAN_CATEGORY[SubscriptionConverter.PLAN_CATEGORY.BARRONS.ordinal()] = 5;
} catch (NoSuchFieldError unused10) {
}
try {
$SwitchMap$com$htmedia$mint$htsubscription$SubscriptionConverter$PLAN_CATEGORY[SubscriptionConverter.PLAN_CATEGORY.WSJ_BARRONS.ordinal()] = 6;
} catch (NoSuchFieldError unused11) {
}
int[] iArr3 = new int[SubscriptionConverter.PLAN_CAMPAIGN.values().length];
$SwitchMap$com$htmedia$mint$htsubscription$SubscriptionConverter$PLAN_CAMPAIGN = iArr3;
try {
iArr3[SubscriptionConverter.PLAN_CAMPAIGN.CAMPAIGN_ECO.ordinal()] = 1;
} catch (NoSuchFieldError unused12) {
}
try {
$SwitchMap$com$htmedia$mint$htsubscription$SubscriptionConverter$PLAN_CAMPAIGN[SubscriptionConverter.PLAN_CAMPAIGN.CAMPAIGN_WSJ.ordinal()] = 2;
} catch (NoSuchFieldError unused13) {
}
try {
$SwitchMap$com$htmedia$mint$htsubscription$SubscriptionConverter$PLAN_CAMPAIGN[SubscriptionConverter.PLAN_CAMPAIGN.CAMPAIGN_MINT.ordinal()] = 3;
} catch (NoSuchFieldError unused14) {
}
try {
$SwitchMap$com$htmedia$mint$htsubscription$SubscriptionConverter$PLAN_CAMPAIGN[SubscriptionConverter.PLAN_CAMPAIGN.CAMPAIGN_MINT_LITE.ordinal()] = 4;
} catch (NoSuchFieldError unused15) {
}
try {
$SwitchMap$com$htmedia$mint$htsubscription$SubscriptionConverter$PLAN_CAMPAIGN[SubscriptionConverter.PLAN_CAMPAIGN.CAMPAIGN_MINT_BARRON.ordinal()] = 5;
} catch (NoSuchFieldError unused16) {
}
try {
$SwitchMap$com$htmedia$mint$htsubscription$SubscriptionConverter$PLAN_CAMPAIGN[SubscriptionConverter.PLAN_CAMPAIGN.CAMPAIGN_WSJ_BARRON.ordinal()] = 6;
} catch (NoSuchFieldError unused17) {
}
}
}
private class AsyncTaskRunner extends AsyncTask<Void, Void, COUNTRY> {
static final boolean $assertionsDisabled = false;
private AsyncTaskRunner() {
}
@Override
public COUNTRY doInBackground(Void... voidArr) {
URL url = null;
String locationUrl = (AppController.j().g() == null || TextUtils.isEmpty(AppController.j().g().getLocationUrl())) ? null : AppController.j().g().getLocationUrl();
try {
} catch (MalformedURLException e) {
e.printStackTrace();
o0.h(e, locationUrl, e.getMessage());
}
if (locationUrl == null) {
return COUNTRY.Other;
}
url = new URL(locationUrl);
try {
HttpsURLConnection httpsURLConnection = (HttpsURLConnection) ((URLConnection) FirebasePerfUrlConnection.instrument(url.openConnection()));
httpsURLConnection.setRequestMethod(FirebasePerformance.HttpMethod.GET);
httpsURLConnection.setRequestProperty("charset", "utf-8");
httpsURLConnection.connect();
if (httpsURLConnection.getResponseCode() == 200) {
String headerField = httpsURLConnection.getHeaderField("meta-geo");
if (TextUtils.isEmpty(headerField)) {
headerField = "";
}
if (!TextUtils.isEmpty(headerField)) {
if (!headerField.startsWith("us") && !headerField.startsWith("US")) {
if (headerField.startsWith("in") || headerField.startsWith("IN")) {
return COUNTRY.India;
}
}
return COUNTRY.US;
}
}
} catch (ProtocolException e2) {
e2.printStackTrace();
o0.h(e2, locationUrl, e2.getMessage());
} catch (IOException e3) {
e3.printStackTrace();
o0.h(e3, locationUrl, e3.getMessage());
} catch (Exception e7) {
e7.printStackTrace();
o0.h(e7, locationUrl, e7.getMessage());
}
return COUNTRY.Other;
}
@Override
public void onPostExecute(COUNTRY country) {
super.onPostExecute((AsyncTaskRunner) country);
?? r0 = PlanPageActivityRevamp2025.this;
r0.country = country;
f0.e3((Context) r0, country.name());
f0.f3(PlanPageActivityRevamp2025.this, country.name());
PlanPageActivityRevamp2025.this.mStringCountry = country.name();
PlanPageActivityRevamp2025.this.setCouponsBenefitsAndFaQ(country.name());
}
}
public enum COUNTRY {
US,
India,
Other,
NA
}
private void activateBottomSheet(MintSubscriptionDetail mintSubscriptionDetail) {
new l5.c(new c.a() {
@Override
public void onOptionClicked(int i, MintSubscriptionDetail mintSubscriptionDetail2) {
if (i == 0) {
PlanPageActivityRevamp2025.this.openSubscriptionCheckout(null, true);
} else if (i == 1) {
PlanPageActivityRevamp2025.this.initiatePayment(mintSubscriptionDetail2);
}
}
}, mintSubscriptionDetail).show(getSupportFragmentManager(), "PaymentOptionBottomSheet");
}
private void addPlanToMap(String str, LinkedHashMap<String, ArrayList<MintPlanWithZSPlan>> linkedHashMap, ArrayList<MintPlanWithZSPlan> arrayList, Iterator<String> it) {
if ((arrayList != null ? arrayList.size() : 0) > 0) {
linkedHashMap.put(str, arrayList);
} else {
it.remove();
}
}
private void autoApplyCouponCode() {
q.d dVar = this.couponModule;
if (dVar != null) {
if ((dVar == q.d.d || dVar == q.d.a) && !TextUtils.isEmpty(this.couponCodePartner)) {
CouponModulePlanPageRevamp2025 couponModulePlanPageRevamp2025 = this.couponModulePlanPage;
Config config = this.config;
String str = this.couponCodePartner;
MintPlanWithZSPlan mintPlanWithZSPlan = this.mintPlanWithZSPlan;
couponModulePlanPageRevamp2025.couponApply(config, str, null, (mintPlanWithZSPlan == null || mintPlanWithZSPlan.getSubsPlans() == null || TextUtils.isEmpty(this.mintPlanWithZSPlan.getSubsPlans().getPlanCode())) ? "" : this.mintPlanWithZSPlan.getSubsPlans().getPlanCode());
}
}
}
private void benefitsOfSubscriptionUI() {
PlanPageV3 planPageV3 = this.planPageV3;
BenefitsV3 benefitsV3 = null;
Benefit benefit = (planPageV3 == null || planPageV3.getBenefit() == null) ? null : this.planPageV3.getBenefit();
PlanPageExperienceV3 planPageExperienceV3 = this.planPageExperienceV3;
if (planPageExperienceV3 != null && planPageExperienceV3.getBenefits() != null) {
benefitsV3 = this.planPageExperienceV3.getBenefits();
}
boolean isBenefitsOfSubs = PianoResponseUtils.isBenefitsOfSubs(this.planPageExperienceV3, this.config);
this.mBinding.b.setVisibility(isBenefitsOfSubs ? 0 : 8);
if (isBenefitsOfSubs) {
this.mBinding.h.b.setText(PianoResponseUtils.benefitTitleText(benefitsV3, benefit));
List<ContentsItem> benefitsList = PianoResponseUtils.benefitsList(benefitsV3, benefit);
if (CollectionUtils.isEmpty(benefitsList)) {
this.mBinding.b.setVisibility(8);
}
BenefitsOfSubscriptionsAdapter benefitsOfSubscriptionsAdapter = new BenefitsOfSubscriptionsAdapter(this, benefitsList);
this.mBinding.h.a.setLayoutManager(new LinearLayoutManager(this));
this.mBinding.h.a.setAdapter(benefitsOfSubscriptionsAdapter);
}
}
private void callIntent(String str) {
Intent intent = new Intent("android.intent.action.DIAL");
intent.setData(Uri.parse(str));
startActivity(intent);
}
private List<String> checkSubscriberChoiceGroup(String str, List<String> list) {
ArrayList arrayList = new ArrayList();
if (list.contains(str)) {
arrayList.add(str);
}
return arrayList;
}
public void checkZSUserSubscriptionDetail() {
new SyncPurchaseWithSession.SyncPaymentFailureAsyncTask(this).execute(this.selectedPlan);
new GetUserSubscriptionDetail(this, this).fetchUserSubscriptionDetail("subscribenowbutton", q.f0.d, true);
}
private void faqUI() {
PlanPageExperienceV3 planPageExperienceV3 = this.planPageExperienceV3;
List list = null;
FAQsV3 fAQs = (planPageExperienceV3 == null || planPageExperienceV3.getFAQs() == null) ? null : this.planPageExperienceV3.getFAQs();
PlanPageV3 planPageV3 = this.planPageV3;
final Faq faq = (planPageV3 == null || planPageV3.getFaq() == null) ? null : this.planPageV3.getFaq();
boolean isFaq = PianoResponseUtils.isFaq(this.planPageExperienceV3, this.config);
this.mBinding.e.setVisibility(isFaq ? 0 : 8);
if (isFaq) {
this.mBinding.j.c.setText(PianoResponseUtils.faqTitle(fAQs, faq));
n6.c cVar = new n6.c(this, new n6.e() {
public void onError(String str) {
PlanPageActivityRevamp2025.this.dismissProgressDialog();
Faq faq2 = faq;
PlanPageActivityRevamp2025.this.setFaqsDataOnView((faq2 == null || faq2.getAndroid() == null || faq.getAndroid().getSections() == null || faq.getAndroid().getSections().isEmpty()) ? null : faq.getAndroid().getSections());
}
public void onResponse(FaqResult faqResult) {
PlanPageActivityRevamp2025.this.dismissProgressDialog();
if (faqResult != null) {
PlanPageActivityRevamp2025.this.setFaqsDataOnView(faqResult.getResult());
} else {
Faq faq2 = faq;
PlanPageActivityRevamp2025.this.setFaqsDataOnView((faq2 == null || faq2.getAndroid() == null || faq.getAndroid().getSections() == null || faq.getAndroid().getSections().isEmpty()) ? null : faq.getAndroid().getSections());
}
}
});
String faqUrlV3 = SubscriptionTrigger.getFaqUrlV3(this.config, this.planCampaign, this.planPageExperienceV3, this.country);
Log.e(this.TAG, "faqUI: ::::::::::::::::URL:::::" + faqUrlV3);
if (!TextUtils.isEmpty(faqUrlV3)) {
cVar.a(0, "FetchFaq", faqUrlV3, (JSONObject) null, (HashMap) null, false, false);
return;
}
if (faq != null && faq.getAndroid() != null && faq.getAndroid().getSections() != null && !faq.getAndroid().getSections().isEmpty()) {
list = faq.getAndroid().getSections();
}
setFaqsDataOnView(list);
}
}
private void findCountry() {
String E1 = f0.E1(this);
this.mStringCountry = E1;
if (E1 == null) {
this.country = COUNTRY.NA;
return;
}
COUNTRY country = COUNTRY.US;
if (E1.equalsIgnoreCase(country.name())) {
this.country = country;
return;
}
String str = this.mStringCountry;
COUNTRY country2 = COUNTRY.India;
if (str.equalsIgnoreCase(country2.name())) {
this.country = country2;
return;
}
String str2 = this.mStringCountry;
COUNTRY country3 = COUNTRY.Other;
if (str2.equalsIgnoreCase(country3.name())) {
this.country = country3;
}
}
private int getHeightOfScreen() {
DisplayMetrics displayMetrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
return displayMetrics.heightPixels;
}
private SubscriptionConverter.PLAN_CAMPAIGN getPlanCampaignEnum(String str) {
SubscriptionConverter.PLAN_CAMPAIGN[] values = SubscriptionConverter.PLAN_CAMPAIGN.values();
for (int i = 0; i < values.length; i++) {
if (values[i].getPlanCategory().equalsIgnoreCase(str)) {
return values[i];
}
}
return SubscriptionConverter.PLAN_CAMPAIGN.CAMPAIGN_KNOWN;
}
private SubscriptionConverter.PLAN_CATEGORY getPlanCategory(String str) {
if (TextUtils.isEmpty(str)) {
return null;
}
for (SubscriptionConverter.PLAN_CATEGORY plan_category : SubscriptionConverter.PLAN_CATEGORY.values()) {
if (plan_category.getPlanCategory().equalsIgnoreCase(str)) {
return plan_category;
}
}
return null;
}
private MintPlanWithZSPlan getPlanWRTZoho(String str, ArrayList<MintPlanWithZSPlan> arrayList) {
Iterator<MintPlanWithZSPlan> it = arrayList.iterator();
while (it.hasNext()) {
MintPlanWithZSPlan next = it.next();
if (next != null && next.getSubsPlans() != null && str.equalsIgnoreCase(next.getSubsPlans().getPlanCode())) {
return next;
}
}
return null;
}
private MintSubscriptionDetail getUpdatedSubscriptionDetail(Intent intent) {
MintSubscriptionDetail l = AppController.j().l();
if (l == null) {
Bundle extras = intent != null ? intent.getExtras() : null;
if (extras != null) {
l = (MintSubscriptionDetail) extras.getParcelable("Subscription");
if (l.getStatus() == null) {
l.setStatus(extras.getSerializable("Status"));
}
if (l.getSource() == null) {
l.setSource(extras.getSerializable("Source"));
}
if (l.getIntervalUnit() == null) {
l.setIntervalUnit(extras.getSerializable("PlanIntervalUnit"));
}
}
}
return l;
}
private void goBack() {
if (getIntent().getExtras() != null && getIntent().getExtras().containsKey("isNotification") && getIntent().getExtras().getInt("isNotification") > q.m.a.ordinal()) {
startActivity(new Intent((Context) this, (Class<?>) HomeActivity.class));
}
setSubscriptionIntent();
finish();
}
private boolean handleDeeplink(Bundle bundle) {
Set<String> queryParameterNames;
if (bundle == null || !bundle.containsKey("urlPlankey")) {
return true;
}
String string = bundle.getString("urlPlankey", "");
if (TextUtils.isEmpty(string)) {
return true;
}
Uri parse = Uri.parse(string);
String path = parse.getPath();
if ((!path.equalsIgnoreCase(s0.R0.b()) && !path.equalsIgnoreCase(s0.e0.b())) || (queryParameterNames = parse.getQueryParameterNames()) == null || queryParameterNames.isEmpty()) {
return true;
}
this.couponCodePartner = parse.getQueryParameter(FirebaseAnalytics.Param.COUPON);
boolean isCampaignSourceAvailable = isCampaignSourceAvailable(parse.getQueryParameterNames());
this.funnelName = "Campaign";
if (!isCampaignSourceAvailable) {
this.planCampaign = SubscriptionConverter.PLAN_CAMPAIGN.CAMPAIGN_KNOWN;
return true;
}
String queryParameter = parse.getQueryParameter("utm_campaign");
if (TextUtils.isEmpty(queryParameter)) {
this.planCampaign = SubscriptionConverter.PLAN_CAMPAIGN.CAMPAIGN_MINT;
} else {
this.planCampaign = getPlanCampaignEnum(queryParameter);
}
this.defaultSelectedPlan = parse.getQueryParameter("plan_code");
return true;
}
private void initConfigAndUpdateUI() {
this.mBinding.i.a.t();
this.mBinding.i.a.setRepeatCount(-1);
this.numberFormat = SubscriptionTrigger.initNumberFormat();
Config config = this.config;
this.isRazorPayEnabled = config != null && config.getSubscription().isRazorPayEnabled();
this.couponModulePlanPage = new CouponModulePlanPageRevamp2025(this, this.mBinding);
}
private void initCountryAndPlans() {
String str = this.mStringCountry;
if (str == null || str.equalsIgnoreCase(COUNTRY.NA.name())) {
new AsyncTaskRunner().execute(new Void[0]);
} else {
setCouponsBenefitsAndFaQ(this.mStringCountry);
}
}
private void initJuspay() {
JuspayCheckout juspayCheckout = new JuspayCheckout(this, false);
this.juspayCheckout = juspayCheckout;
juspayCheckout.o(this);
}
private void initPianoExp() {
PianoCallbacks pianoCallbacks = new PianoCallbacks(this, this);
HashMap<String, String> hashMap = new HashMap<>();
if (!TextUtils.isEmpty(this.mStringCountry)) {
if (COUNTRY.India.name().equalsIgnoreCase(this.mStringCountry)) {
hashMap.put("Country", "in");
} else {
hashMap.put("Country", this.mStringCountry.toLowerCase());
}
}
pianoCallbacks.checkUserScope(PianoAppConstant.PIANO_PLAN_PAGE_NAME_V3, null, "https://accounts.hindustantimes.com/lm/userplan", hashMap, this.content);
}
private void initPlanPage() {
Bundle extras = getIntent().getExtras();
if (extras == null || !handleDeeplink(extras)) {
return;
}
this.funnelName = extras.getString("funnelName", "");
this.paywallReason = extras.containsKey("paywallReason") ? extras.getString("paywallReason") : "";
SubscriptionPlanSingleton.getInstance().setFunnelName(this.funnelName);
SubscriptionPlanSingleton.getInstance().setPaywallReason(this.paywallReason);
if (this.funnelName.equalsIgnoreCase(WebEngageAnalytices.SUBSCRIPTION_POP_UP)) {
this.content = SubscriptionPlanSingleton.getInstance().getContent();
}
if (extras.containsKey("keyPremiumStrory")) {
this.premiumStory = extras.getString("keyPremiumStrory");
}
if (TextUtils.isEmpty(this.premiumStory)) {
this.premiumStory = this.paywallReason;
}
if (extras.containsKey("lastAceessUrl")) {
this.lastAccessUrl = extras.getString("lastAceessUrl");
}
SnowplowSubscriptionAnalytices.trackLinkClick(extras);
}
private void initPlansWithPiano() {
SubscriptionConverter.PLAN_CAMPAIGN plan_campaign = SubscriptionConverter.PLAN_CAMPAIGN.CAMPAIGN_MINT;
SubscriptionConverter.PLAN_CAMPAIGN plan_campaign2 = this.planCampaign;
if (plan_campaign == plan_campaign2 || SubscriptionConverter.PLAN_CAMPAIGN.CAMPAIGN_ECO == plan_campaign2 || SubscriptionConverter.PLAN_CAMPAIGN.CAMPAIGN_WSJ == plan_campaign2 || SubscriptionConverter.PLAN_CAMPAIGN.CAMPAIGN_MINT_LITE == plan_campaign2) {
initSubscription();
} else {
initPianoExp();
}
initProgressDialogAndShow();
}
private void initProgressDialogAndShow() {
ProgressDialog progressDialog = this.pDialog;
if (progressDialog != null && !progressDialog.isShowing()) {
this.pDialog.show();
return;
}
if (this.pDialog == null) {
ProgressDialog progressDialog2 = new ProgressDialog(this);
this.pDialog = progressDialog2;
progressDialog2.setMessage("Please wait...!");
this.pDialog.setCancelable(false);
if (this.pDialog.isShowing()) {
return;
}
this.pDialog.show();
}
}
private void initSubscription() {
String recommendedPlan;
String recommendedText;
preparePlanV3Response();
PlanPageExperienceV3 planPageExperienceV3 = this.planPageExperienceV3;
if (planPageExperienceV3 == null || planPageExperienceV3.getPlansV3() == null || TextUtils.isEmpty(this.planPageExperienceV3.getPlansV3().getRecommendedPlan())) {
Config config = this.config;
recommendedPlan = (config == null || config.getPlanPageV3() == null || this.config.getPlanPageV3().getPlan() == null || this.config.getPlanPageV3().getPlan().getAndroid() == null || TextUtils.isEmpty(this.config.getPlanPageV3().getPlan().getAndroid().getRecommendedPlan())) ? "" : this.config.getPlanPageV3().getPlan().getAndroid().getRecommendedPlan();
} else {
recommendedPlan = this.planPageExperienceV3.getPlansV3().getRecommendedPlan();
}
this.recommendedPlan = recommendedPlan;
PlanPageExperienceV3 planPageExperienceV32 = this.planPageExperienceV3;
if (planPageExperienceV32 == null || planPageExperienceV32.getPlansV3() == null || TextUtils.isEmpty(this.planPageExperienceV3.getPlansV3().getRecommendedText())) {
Config config2 = this.config;
recommendedText = (config2 == null || config2.getPlanPageV3() == null || this.config.getPlanPageV3().getPlan() == null || this.config.getPlanPageV3().getPlan().getAndroid() == null || TextUtils.isEmpty(this.config.getPlanPageV3().getPlan().getAndroid().getRecommendedText())) ? "" : this.config.getPlanPageV3().getPlan().getAndroid().getRecommendedText();
} else {
recommendedText = this.planPageExperienceV3.getPlansV3().getRecommendedText();
}
this.recommendedText = recommendedText;
this.adFreeUser = this.config.getSso() != null ? this.config.getAdFreeSubscription().getAdFreeValue() : "";
initCountryAndPlans();
}
private void initializeAllRelatedDetails() {
findCountry();
initConfigAndUpdateUI();
initPlanPage();
initPlansWithPiano();
}
public void initiatePayment(MintSubscriptionDetail mintSubscriptionDetail) {
SubscriptionPlanSingleton subscriptionPlanSingleton = SubscriptionPlanSingleton.getInstance();
WebEngageAnalytices.PAYMENTSTORE paymentstore = WebEngageAnalytices.PAYMENTSTORE.PLAY_STORE;
subscriptionPlanSingleton.setPaymentMethod(paymentstore.getStore());
WebEngageAnalytices.trackPaymentStatus(WebEngageAnalytices.SUBSCRIPTION_NOW_CLICK, null, this.mintPlanWithZSPlan, null, this.funnelName, null, paymentstore.getStore(), true);
if (this.selectedPlan == null) {
MintPlanWithZSPlan mintPlanWithZSPlan = this.mintPlanWithZSPlan;
if (mintPlanWithZSPlan == null || mintPlanWithZSPlan.getSubsPlans() == null) {
Toast.makeText((Context) this, (CharSequence) "Something went wrong. Please try later.", 0).show();
return;
} else {
Toast.makeText((Context) this, (CharSequence) "Something went wrong. Please try later.", 0).show();
return;
}
}
MintPlanWithZSPlan mintPlanWithZSPlan2 = this.mintPlanWithZSPlan;
SnowplowSubscriptionAnalytices.trackSubscribeNowButtonClick((mintPlanWithZSPlan2 == null || mintPlanWithZSPlan2.getPlanCategory() == null || !this.mintPlanWithZSPlan.getPlanCategory().equalsIgnoreCase(SubscriptionConverter.PLAN_CATEGORY.WSJ.getPlanCategory())) ? false : true, this.selectedPlan);
String storeOrderId = (mintSubscriptionDetail == null || mintSubscriptionDetail.getSource() == null || mintSubscriptionDetail.getSource() != SubscriptionSource.playstore) ? "" : mintSubscriptionDetail.getStoreOrderId();
String str = TextUtils.isEmpty(storeOrderId) ? "" : storeOrderId;
if (str.equalsIgnoreCase("unknown")) {
MintPlanWithZSPlan mintPlanWithZSPlan3 = this.mintPlanWithZSPlan;
if (mintPlanWithZSPlan3 == null || mintPlanWithZSPlan3.getSubsPlans() == null) {
Toast.makeText((Context) this, (CharSequence) "Something went wrong. Please try later.", 0).show();
return;
} else {
Toast.makeText((Context) this, (CharSequence) "Something went wrong. Please try later.", 0).show();
return;
}
}
ArrayList arrayList = new ArrayList();
ZSCustomField zSCustomField = new ZSCustomField("cf_localized_currency", this.selectedPlan.getSkuDetails().d());
arrayList.add(new ZSCustomField("cf_eco_new_app", "yes"));
arrayList.add(zSCustomField);
ZohoInAppConfig.getInAppPurchaseKit();
ZSInAppPurchaseKit.getInstance().initiateNewPurchase(this, this.selectedPlan, str, arrayList, this);
}
private boolean isCampaignSourceAvailable(Set<String> set) {
Iterator<String> it = set.iterator();
while (it.hasNext()) {
if ("utm_campaign".equals(it.next())) {
return true;
}
}
return false;
}
private boolean isGooglePayAvailable(List<PaymentMethod> list) {
if (list == null || list.isEmpty()) {
return false;
}
Iterator<PaymentMethod> it = list.iterator();
while (it.hasNext()) {
String type = it.next().getType();
if (!TextUtils.isEmpty(type) && q.v.b.name().equalsIgnoreCase(type)) {
return true;
}
}
return false;
}
public void lambda$onFaqClick$4(View view) {
this.mBinding.v.scrollBy(0, view.getHeight() + 50);
}
public void lambda$onFaqClick$5(int i) {
this.mBinding.v.scrollBy(0, i);
}
public void lambda$setFaqsDataOnView$3(int i, SectionsItem sectionsItem, View view) {
int i2 = 0;
while (i2 < this.mBinding.j.b.getChildCount()) {
kk0 kk0Var = (kk0) this.mBinding.j.b.getChildAt(i2).getTag();
if (kk0Var != null) {
setTabStyle(kk0Var.a, i2 == i, this.isNightMode);
}
i2++;
}
updateFaqAdapter(sectionsItem.getContents());
}
public void lambda$setToolbarWithHeaderBanner$0(View view) {
goBack();
}
public void lambda$setToolbarWithHeaderBanner$1(View view) {
if (ContextCompat.checkSelfPermission(this, "android.permission.CALL_PHONE") == 0) {
callIntent(this.mobileNumber);
} else {
ActivityCompat.requestPermissions(this, new String[]{"android.permission.CALL_PHONE"}, 1);
}
}
public void lambda$setViewsClickListener$6(View view) {
this.couponModulePlanPage.removeCoupon();
this.couponCodePartner = "";
updateBottomFooterInitial();
}
public void lambda$studentCredUI$2(View view) {
startActivity(new Intent((Context) this, (Class<?>) StudentOfferWebView.class));
}
private void mapZohoPlansWithMintPlan(ArrayList<ZSPlan> arrayList) {
Iterator<ZSPlan> it = arrayList.iterator();
while (it.hasNext()) {
ZSPlan next = it.next();
String str = next.code;
MintPlanWithZSPlan planWRTZoho = getPlanWRTZoho(str, this.mintOnlyList);
if (planWRTZoho != null) {
planWRTZoho.setZsPlan(next);
} else {
MintPlanWithZSPlan planWRTZoho2 = getPlanWRTZoho(str, this.wsjOnlyList);
if (planWRTZoho2 != null) {
planWRTZoho2.setZsPlan(next);
} else {
MintPlanWithZSPlan planWRTZoho3 = getPlanWRTZoho(str, this.mintLiteOnlyList);
if (planWRTZoho3 != null) {
planWRTZoho3.setZsPlan(next);
} else {
MintPlanWithZSPlan planWRTZoho4 = getPlanWRTZoho(str, this.mintBarronOnlyList);
if (planWRTZoho4 != null) {
planWRTZoho4.setZsPlan(next);
} else {
MintPlanWithZSPlan planWRTZoho5 = getPlanWRTZoho(str, this.wsjBarronOnlyList);
if (planWRTZoho5 != null) {
planWRTZoho5.setZsPlan(next);
}
}
}
}
}
}
}
private void newSubscriptionPage(MintSubscriptionDetail mintSubscriptionDetail) {
SyncPurchaseWithSession.syncPurchaseWithSession(this, mintSubscriptionDetail);
Intent intent = new Intent();
intent.putExtra("Subscription", (Parcelable) mintSubscriptionDetail);
intent.putExtra("Status", (Serializable) mintSubscriptionDetail.getStatus());
intent.putExtra("Source", (Serializable) mintSubscriptionDetail.getSource());
intent.putExtra("PlanIntervalUnit", (Serializable) mintSubscriptionDetail.getIntervalUnit());
Intent intent2 = getIntent();
if (intent2 != null && intent2.getExtras() != null && intent2.getExtras().containsKey("isNotification") && intent2.getExtras().getInt("isNotification") > q.m.a.ordinal()) {
startActivity(new Intent((Context) this, (Class<?>) HomeActivity.class));
}
setResult(-1, intent);
finish();
}
public void onFaqClick(int i, int i2, ContentsItem contentsItem) {
int heightOfScreen = (getHeightOfScreen() * 3) / 4;
int height = this.mBinding.j.a.getHeight();
int scrollY = this.mBinding.v.getScrollY();
int height2 = this.mBinding.v.getHeight();
int[] iArr = new int[2];
if (i == i2 - 1) {
final int i3 = scrollY + height2 + height;
this.mBinding.v.post(new Runnable() {
@Override
public final void run() {
PlanPageActivityRevamp2025.this.lambda$onFaqClick$5(i3);
}
});
return;
}
final View childAt = this.mBinding.j.a.getChildAt(i);
childAt.getLocationInWindow(iArr);
if (heightOfScreen <= iArr[1]) {
this.mBinding.v.post(new Runnable() {
@Override
public final void run() {
PlanPageActivityRevamp2025.this.lambda$onFaqClick$4(childAt);
}
});
} else {
this.mBinding.j.a.scrollToPosition(i);
}
}
private void openCheckoutPage(MintSubscriptionDetail mintSubscriptionDetail) {
SubscriptionPlanSingleton.getInstance().setPaywallReason(this.paywallReason);
WebEngageAnalytices.trackPaymentStatus(WebEngageAnalytices.SUBSCRIPTION_NOW_CLICK, null, this.mintPlanWithZSPlan, null, this.funnelName, this.paywallReason, WebEngageAnalytices.PAYMENTSTORE.UNKOWN.getStore(), false);
MintPlanWithZSPlan mintPlanWithZSPlan = this.mintPlanWithZSPlan;
if (mintPlanWithZSPlan == null || this.selectedPlan == null) {
return;
}
SnowplowSubscriptionAnalytices.trackSubscribeNowButtonClick((mintPlanWithZSPlan == null || mintPlanWithZSPlan.getPlanCategory() == null || !this.mintPlanWithZSPlan.getPlanCategory().equalsIgnoreCase(SubscriptionConverter.PLAN_CATEGORY.WSJ.getPlanCategory())) ? false : true, this.selectedPlan);
SubscriptionPlanSingleton subscriptionPlanSingleton = SubscriptionPlanSingleton.getInstance();
MintPlanWithZSPlan mintPlanWithZSPlan2 = this.mintPlanWithZSPlan;
if (mintPlanWithZSPlan2 != null && mintPlanWithZSPlan2.getZsPlan() == null) {
this.mintPlanWithZSPlan.setZsPlan(this.selectedPlan);
}
subscriptionPlanSingleton.setMintPlanWithZSPlan(this.mintPlanWithZSPlan);
subscriptionPlanSingleton.setSubsscreen(q.g0.a);
subscriptionPlanSingleton.setFunnelName(this.funnelName);
subscriptionPlanSingleton.setPremiumStory(this.premiumStory);
subscriptionPlanSingleton.setPaywallReason(this.paywallReason);
subscriptionPlanSingleton.setLastAccessUrl(this.lastAccessUrl);
subscriptionPlanSingleton.setmNeedToSetPassword(this.mNeedToSetPassword);
subscriptionPlanSingleton.setToShowAdFreeText(this.isToShowAdFreeText);
subscriptionPlanSingleton.setMintSubscriptionDetail(mintSubscriptionDetail);
openRazorPayCheckout(mintSubscriptionDetail, this.mintPlanWithZSPlan);
}
private void openRazorPayCheckout(MintSubscriptionDetail mintSubscriptionDetail, MintPlanWithZSPlan mintPlanWithZSPlan) {
List<PaymentMethod> paymentMethod;
boolean isJuspayEnableForPlanPage = SubscriptionConverter.isJuspayEnableForPlanPage(this.config, this.country.name());
PianoPlan pianoPlan = mintPlanWithZSPlan.getPianoPlan();
if (pianoPlan == null) {
openSubscriptionCheckout(null, isJuspayEnableForPlanPage);
return;
}
COUNTRY country = this.country;
if (country == null || country == COUNTRY.India) {
paymentMethod = pianoPlan.getPaymentMethod();
} else {
paymentMethod = pianoPlan.getOutsideIndiaPaymentMethod();
if (paymentMethod == null) {
paymentMethod = pianoPlan.getPaymentMethod();
}
}
if (paymentMethod == null || paymentMethod.isEmpty()) {
openSubscriptionCheckout(paymentMethod, isJuspayEnableForPlanPage);
return;
}
boolean isGooglePayAvailable = isGooglePayAvailable(paymentMethod);
if (isGooglePayAvailable && isJuspayEnableForPlanPage) {
activateBottomSheet(mintSubscriptionDetail);
return;
}
if (!isGooglePayAvailable && isJuspayEnableForPlanPage) {
openSubscriptionCheckout(null, true);
return;
}
if (paymentMethod.size() != 1) {
openSubscriptionCheckout(paymentMethod, isJuspayEnableForPlanPage);
return;
}
PaymentMethod paymentMethod2 = paymentMethod.get(0);
String type = paymentMethod2.getType();
if (TextUtils.isEmpty(type)) {
openSubscriptionCheckout(paymentMethod, isJuspayEnableForPlanPage);
return;
}
q.v valueOf = q.v.valueOf(type);
String autoRecurring = paymentMethod2.getAutoRecurring();
boolean z = !TextUtils.isEmpty(autoRecurring) && ("1".equalsIgnoreCase(autoRecurring.trim()) || "true".equalsIgnoreCase(autoRecurring.trim()));
int i = AnonymousClass9.$SwitchMap$com$htmedia$mint$utils$AppConstants$PAYMENT_TYPE[valueOf.ordinal()];
if (i == 1) {
SubsPlans subsPlans = mintPlanWithZSPlan.getSubsPlans();
this.razorPayCheckout = new RazorPayCheckout(this, valueOf, (subsPlans == null || subsPlans.getRecurringPrice() < 5000.0d) ? z : false);
return;
}
if (i == 2 || i == 3) {
this.razorPayCheckout = new RazorPayCheckout(this, valueOf, false);
return;
}
if (i == 4) {
this.razorPayCheckout = new RazorPayCheckout(this, valueOf, z);
return;
}
if (i != 5) {
openSubscriptionCheckout(paymentMethod, isJuspayEnableForPlanPage);
} else if (this.selectedPlan != null) {
initiatePayment(mintSubscriptionDetail);
} else {
openSubscriptionCheckout(paymentMethod, isJuspayEnableForPlanPage);
}
}
public void openSubscriptionCheckout(List<PaymentMethod> list, boolean z) {
if (z) {
if (this.juspayCheckout == null) {
initJuspay();
}
JuspayCheckout juspayCheckout = this.juspayCheckout;
if (juspayCheckout != null) {
juspayCheckout.u(this, false, this.mintPlanWithZSPlan);
return;
}
return;
}
if (list != null) {
ArrayList arrayList = new ArrayList();
Iterator<PaymentMethod> it = list.iterator();
while (it.hasNext()) {
arrayList.add(it.next().getType());
}
SubscriptionPlanSingleton.getInstance().setPaymentOptions(arrayList);
}
Intent intent = new Intent((Context) this, (Class<?>) SubscriptionCheckOutPage.class);
intent.putExtras(getIntent());
getIntent().putExtra("needSetPassword", this.mNeedToSetPassword);
startActivityForResult(intent, 20524);
}
private void preparePlanV3Response() {
PlanPageExperienceV3 planPageExperienceV3 = this.planPageExperienceV3;
if (planPageExperienceV3 == null || planPageExperienceV3.getPlansV3() == null) {
this.renderPlanV3 = new PlansV3();
} else {
this.renderPlanV3 = this.planPageExperienceV3.getPlansV3();
}
PlanPageV3 planPageV3 = this.planPageV3;
List list = null;
Android android = (planPageV3 == null || planPageV3.getPlan() == null) ? null : this.planPageV3.getPlan().getAndroid();
if (android != null) {
PlansV3 plansV3 = this.renderPlanV3;
String str = "";
if (TextUtils.isEmpty((plansV3 == null || TextUtils.isEmpty(plansV3.getCouponCode())) ? "" : this.renderPlanV3.getCouponCode())) {
if (TextUtils.isEmpty(this.planPageV3.getPlan().getAndroid().getCouponCode())) {
this.renderPlanV3.setCouponCode("");
} else {
this.renderPlanV3.setCouponCode(this.planPageV3.getPlan().getAndroid().getCouponCode());
}
}
PlansV3 plansV32 = this.renderPlanV3;
if (TextUtils.isEmpty((plansV32 == null || TextUtils.isEmpty(plansV32.getDefaultSelectedPlan())) ? "" : this.renderPlanV3.getDefaultSelectedPlan())) {
this.renderPlanV3.setDefaultSelectedPlan(android.getDefaultSelectedPlan());
}
PlansV3 plansV33 = this.renderPlanV3;
if (TextUtils.isEmpty((plansV33 == null || TextUtils.isEmpty(plansV33.getDefaultSelectedGroup())) ? "" : this.renderPlanV3.getDefaultSelectedGroup())) {
this.renderPlanV3.setDefaultSelectedGroup(android.getDefaultSelectedGroup());
}
PlansV3 plansV34 = this.renderPlanV3;
if (TextUtils.isEmpty((plansV34 == null || TextUtils.isEmpty(plansV34.getRecommendedPlan())) ? "" : this.renderPlanV3.getRecommendedPlan())) {
this.renderPlanV3.setRecommendedPlan(android.getRecommendedPlan());
}
PlansV3 plansV35 = this.renderPlanV3;
if (TextUtils.isEmpty((plansV35 == null || TextUtils.isEmpty(plansV35.getRecommendedText())) ? "" : this.renderPlanV3.getRecommendedText())) {
this.renderPlanV3.setRecommendedText(android.getRecommendedText());
}
PlansV3 plansV36 = this.renderPlanV3;
if ((plansV36 != null ? plansV36.getCouponShowOutsideIndia() : 0) == 0) {
this.renderPlanV3.setCouponShowOutsideIndia(android.getCouponShowOutsideIndia().intValue());
}
PlansV3 plansV37 = this.renderPlanV3;
if ((plansV37 != null ? plansV37.getCouponShowInsideIndia() : 0) == 0) {
this.renderPlanV3.setCouponShowInsideIndia(android.getCouponShowInsideIndia().intValue());
}
PlansV3 plansV38 = this.renderPlanV3;
Map planOfferText = (plansV38 == null || plansV38.getPlanOfferText() == null || this.renderPlanV3.getPlanOfferText().isEmpty()) ? null : this.renderPlanV3.getPlanOfferText();
if (planOfferText == null || planOfferText.isEmpty()) {
this.renderPlanV3.setPlanOfferText(android.getPlanOfferText());
}
PlansV3 plansV39 = this.renderPlanV3;
if (((plansV39 == null || plansV39.getSubscriberChoiceGroup() == null || CollectionUtils.isEmpty(this.renderPlanV3.getSubscriberChoiceGroup())) ? null : this.renderPlanV3.getSubscriberChoiceGroup()) == null) {
this.renderPlanV3.setSubscriberChoiceGroup(android.getSubscriberChoiceGroup());
}
PlansV3 plansV310 = this.renderPlanV3;
Map selectedPlanPerGroup = (plansV310 == null || plansV310.getSelectedPlanPerGroup() == null || this.renderPlanV3.getSelectedPlanPerGroup().isEmpty()) ? null : this.renderPlanV3.getSelectedPlanPerGroup();
if (selectedPlanPerGroup == null || selectedPlanPerGroup.isEmpty()) {
this.renderPlanV3.setSelectedPlanPerGroup(android.getSelectedPlanPerGroup());
}
PlansV3 plansV311 = this.renderPlanV3;
Map agencyDefaultSelectedPlan = (plansV311 == null || plansV311.getAgencyDefaultSelectedPlan() == null || this.renderPlanV3.getAgencyDefaultSelectedPlan().isEmpty()) ? null : this.renderPlanV3.getAgencyDefaultSelectedPlan();
if (agencyDefaultSelectedPlan == null || agencyDefaultSelectedPlan.isEmpty()) {
this.renderPlanV3.setAgencyDefaultSelectedPlan(android.getAgencyDefaultSelectedPlan());
}
PlansV3 plansV312 = this.renderPlanV3;
List mintLitePlan = (plansV312 == null || plansV312.getMintLitePlan() == null || this.renderPlanV3.getMintLitePlan().isEmpty()) ? null : this.renderPlanV3.getMintLitePlan();
if ((mintLitePlan == null || mintLitePlan.isEmpty()) && android.getAndroidMintLitePlan() != null) {
this.renderPlanV3.setMintLitePlan(android.getAndroidMintLitePlan().getPlanList());
}
PlansV3 plansV313 = this.renderPlanV3;
List mintPlan = (plansV313 == null || plansV313.getMintPlan() == null || this.renderPlanV3.getMintPlan().isEmpty()) ? null : this.renderPlanV3.getMintPlan();
if ((mintPlan == null || mintPlan.isEmpty()) && android.getAndroidMintPlan() != null) {
this.renderPlanV3.setMintPlan(android.getAndroidMintPlan().getPlanList());
}
PlansV3 plansV314 = this.renderPlanV3;
List wsjPlan = (plansV314 == null || plansV314.getWsjPlan() == null || this.renderPlanV3.getWsjPlan().isEmpty()) ? null : this.renderPlanV3.getWsjPlan();
if ((wsjPlan == null || wsjPlan.isEmpty()) && android.getAndroidWsjPlan() != null) {
this.renderPlanV3.setWsjPlan(android.getAndroidWsjPlan().getPlanList());
}
PlansV3 plansV315 = this.renderPlanV3;
List mintBarronPlan = (plansV315 == null || plansV315.getMintBarronPlan() == null || this.renderPlanV3.getMintBarronPlan().isEmpty()) ? null : this.renderPlanV3.getMintBarronPlan();
if ((mintBarronPlan == null || mintBarronPlan.isEmpty()) && android.getAndroidMintBarronPlan() != null) {
this.renderPlanV3.setMintBarronPlan(android.getAndroidWsjPlan().getPlanList());
}
PlansV3 plansV316 = this.renderPlanV3;
List wsjBarronPlan = (plansV316 == null || plansV316.getWsjBarronPlan() == null || this.renderPlanV3.getWsjBarronPlan().isEmpty()) ? null : this.renderPlanV3.getWsjBarronPlan();
if ((wsjBarronPlan == null || wsjBarronPlan.isEmpty()) && android.getAndroidWsjBarronPlan() != null) {
this.renderPlanV3.setWsjBarronPlan(android.getAndroidWsjBarronPlan().getPlanList());
}
PlansV3 plansV317 = this.renderPlanV3;
if (plansV317 != null && plansV317.getEcoPlan() != null && !this.renderPlanV3.getEcoPlan().isEmpty()) {
list = this.renderPlanV3.getEcoPlan();
}
if ((list == null || list.isEmpty()) && android.getAndroidEcoPlan() != null) {
this.renderPlanV3.setEcoPlan(android.getAndroidEcoPlan().getPlanList());
}
PlansV3 plansV318 = this.renderPlanV3;
if (plansV318 != null && !TextUtils.isEmpty(plansV318.getCouponCode())) {
str = this.renderPlanV3.getCouponCode();
}
if (!TextUtils.isEmpty(str) || TextUtils.isEmpty(android.getCouponCode())) {
return;
}
this.renderPlanV3.setCouponCode(android.getCouponCode());
}
}
private void setBankCoupon() {
String bankOffer;
PartnersOfferPresenter partnersOfferPresenter = new PartnersOfferPresenter(this, new PartnersOfferViewInterface() {
public void fetchPartnersOffer(CouponPartner couponPartner) {
PlanPageActivityRevamp2025.this.dismissProgressDialog();
if (couponPartner.getData() == null || couponPartner.getData().size() <= 0) {
return;
}
PlanPageActivityRevamp2025.this.bankCouponOfferList = (ArrayList) couponPartner.getData();
}
public void onPartnersOfferError(String str) {
PlanPageActivityRevamp2025.this.dismissProgressDialog();
}
});
q.d dVar = this.couponModule;
if (dVar != null) {
if (dVar == q.d.d || dVar == q.d.a) {
PlanPageExperienceV3 planPageExperienceV3 = this.planPageExperienceV3;
if (planPageExperienceV3 == null || planPageExperienceV3.getOthers() == null || TextUtils.isEmpty(this.planPageExperienceV3.getOthers().getBankOffer())) {
Config config = this.config;
bankOffer = (config == null || config.getPlanPageV3() == null || TextUtils.isEmpty(this.config.getPlanPageV3().getBankOffer())) ? "" : this.config.getPlanPageV3().getBankOffer();
} else {
bankOffer = this.planPageExperienceV3.getOthers().getBankOffer();
}
String str = bankOffer;
if (TextUtils.isEmpty(str)) {
return;
}
partnersOfferPresenter.fetchPartnersOffers(0, "FetchBankOffer", str, (JSONObject) null, (HashMap) null, false, false);
}
}
}
public void setCouponsBenefitsAndFaQ(String str) {
setUpCouponsAndBenefitsVisibility(str);
fetchPlansFromMintServer();
}
public void setFaqsDataOnView(List<SectionsItem> list) {
if (list == null || list.isEmpty()) {
this.mBinding.e.setVisibility(8);
return;
}
this.mBinding.j.b.removeAllViews();
updateFaqAdapter(list.get(0).getContents());
final int i = 0;
while (i < list.size()) {
final SectionsItem sectionsItem = list.get(i);
kk0 c = kk0.c(LayoutInflater.from(this), this.mBinding.j.b, false);
c.a.setText(sectionsItem.getTitle());
setTabStyle(c.a, i == 0, this.isNightMode);
c.getRoot().setTag(c);
c.getRoot().setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
PlanPageActivityRevamp2025.this.lambda$setFaqsDataOnView$3(i, sectionsItem, view);
}
});
this.mBinding.j.b.addView(c.getRoot());
i++;
}
}
private void setPartnerBenefits() {
String partnerOffer;
boolean isBenefitsAlsoGet = PianoResponseUtils.isBenefitsAlsoGet(this.planPageExperienceV3, this.config);
this.mBinding.a.setVisibility(isBenefitsAlsoGet ? 0 : 8);
if (isBenefitsAlsoGet) {
PartnersOfferPresenter partnersOfferPresenter = new PartnersOfferPresenter(this, new PartnersOfferViewInterface() {
public void fetchPartnersOffer(CouponPartner couponPartner) {
PlanPageActivityRevamp2025.this.dismissProgressDialog();
if (couponPartner == null) {
PlanPageActivityRevamp2025.this.mBinding.a.setVisibility(8);
return;
}
List data = couponPartner.getData();
boolean z = (data == null || data.isEmpty()) ? false : true;
if (CollectionUtils.isEmpty(data)) {
PlanPageActivityRevamp2025.this.mBinding.a.setVisibility(8);
}
PlanPageActivityRevamp2025.this.mBinding.g.c.setText(!TextUtils.isEmpty(couponPartner.getTitle()) ? couponPartner.getTitle() : "You’ll also get!");
if (z) {
PlanPageActivityRevamp2025.this.setUpBenefitsAlsoGetAdapter(new ArrayList(data));
}
}
public void onPartnersOfferError(String str) {
PlanPageActivityRevamp2025.this.mBinding.a.setVisibility(8);
PlanPageActivityRevamp2025.this.dismissProgressDialog();
}
});
q.d dVar = this.couponModule;
if (dVar != null) {
if (dVar == q.d.d || dVar == q.d.b) {
PlanPageExperienceV3 planPageExperienceV3 = this.planPageExperienceV3;
if (planPageExperienceV3 == null || planPageExperienceV3.getOthers() == null || TextUtils.isEmpty(this.planPageExperienceV3.getOthers().getPartnerOffer())) {
Config config = this.config;
partnerOffer = (config == null || config.getPlanPageV3() == null || TextUtils.isEmpty(this.config.getPlanPageV3().getPartnerOffer())) ? "" : this.config.getPlanPageV3().getPartnerOffer();
} else {
partnerOffer = this.planPageExperienceV3.getOthers().getPartnerOffer();
}
String str = partnerOffer;
if (TextUtils.isEmpty(str)) {
return;
}
partnersOfferPresenter.fetchPartnersOffers(0, "FetchPartnersOffer", str, (JSONObject) null, (HashMap) null, false, false);
}
}
}
}
private void setStatusBar() {
Window window = getWindow();
window.clearFlags(67108864);
window.addFlags(Integer.MIN_VALUE);
window.setStatusBarColor(ContextCompat.getColor(this, this.isNightMode ? R.color.statusBarColorNight : R.color.statusBarColorDay));
if (this.isNightMode) {
window.getDecorView().setSystemUiVisibility(1280);
} else {
window.getDecorView().setSystemUiVisibility(9472);
}
}
private List<String> setSubscriberChoiceGroup(String str, List<String> list, List<String> list2) {
if (list.contains(str) && !list2.contains(str)) {
list2.add(str);
}
return list2;
}
private void setSubscriptionIntent() {
MintSubscriptionDetail l = AppController.j().l();
if (l != null && l.isSubscriptionActive()) {
f0.K("l1_menu_order", this);
}
if (GetSubscriptionIntent.getSubscriptionIntent() != null) {
setResult(-1, GetSubscriptionIntent.getSubscriptionIntent());
} else {
setResult(-1);
}
}
private void setTabStyle(TextView textView, boolean z, boolean z2) {
if (z) {
textView.setTypeface(ResourcesCompat.getFont(this, R.font.inter_bold));
textView.setBackgroundResource(z2 ? R.drawable.ppr_faq_tab_select_night : R.drawable.ppr_faq_tab_select_day);
textView.setTextColor(ContextCompat.getColor(this, z2 ? R.color.pprTextNight : R.color.pprTextDay));
} else {
textView.setTypeface(ResourcesCompat.getFont(this, R.font.inter_regular));
textView.setBackgroundResource(z2 ? R.drawable.ppr_faq_tab_unselect_night : R.drawable.ppr_faq_tab_unselect_day);
textView.setTextColor(ContextCompat.getColor(this, z2 ? R.color.pprUnselectNight : R.color.pprUnselectDay));
}
}
public void setTestimonialsAdapter(Testimonials testimonials) {
if (testimonials == null) {
this.mBinding.x.setVisibility(8);
return;
}
List data = testimonials.getData();
if (data == null || data.isEmpty()) {
this.mBinding.x.setVisibility(8);
return;
}
TestimonialsAdapter testimonialsAdapter = new TestimonialsAdapter(this, data);
this.mBinding.q.a.setLayoutManager(new LinearLayoutManager(this, 0, false));
this.mBinding.q.a.setAdapter(testimonialsAdapter);
}
private void setToolbarWithHeaderBanner() {
String title;
String subtitle;
PlanPageExperienceV3 planPageExperienceV3 = this.planPageExperienceV3;
HeadersV3 headers = planPageExperienceV3 != null ? planPageExperienceV3.getHeaders() : null;
PlanPageV3 planPageV3 = this.planPageV3;
Header header = planPageV3 != null ? planPageV3.getHeader() : null;
Android android = header != null ? header.getAndroid() : null;
if (TextUtils.isEmpty(headers != null ? headers.getTitle() : null)) {
title = !TextUtils.isEmpty(android != null ? android.getTitle() : null) ? android.getTitle() : "Investment in Mint this\nX’mas for better wisdom!";
} else {
title = headers.getTitle();
}
if (TextUtils.isEmpty(headers != null ? headers.getSubtitle() : null)) {
subtitle = !TextUtils.isEmpty(android != null ? android.getSubtitle() : null) ? android.getSubtitle() : "Now get offers of up to 30% discount!";
} else {
subtitle = headers.getSubtitle();
}
this.mBinding.r.c.setText(title);
this.mBinding.r.d.setText(subtitle);
String bgColorDark = (headers == null || TextUtils.isEmpty(headers.getBgColorDark())) ? (android == null || TextUtils.isEmpty(android.getBgColorDark())) ? "#1A202C" : android.getBgColorDark() : headers.getBgColorDark();
String bgColorLight = (headers == null || TextUtils.isEmpty(headers.getBgColorLight())) ? (android == null || TextUtils.isEmpty(android.getBgColorLight())) ? "#FDFDFE" : android.getBgColorLight() : headers.getBgColorLight();
if (!this.isNightMode) {
bgColorDark = bgColorLight;
}
try {
this.mBinding.v.setBackgroundColor(Color.parseColor(bgColorDark));
} catch (Exception unused) {
this.mBinding.v.setBackgroundColor(Color.parseColor(this.isNightMode ? "#1A202C" : "#FDFDFE"));
}
this.mBinding.r.b.setVisibility(headers != null ? headers.getShowCallUsButton() : android != null ? android.getShowCallUsButton().booleanValue() : false ? 0 : 8);
this.mBinding.r.b.setImageResource(this.isNightMode ? R.drawable.ppr_call_to_buy_night : R.drawable.ppr_call_to_buy_day);
String str = "";
this.mobileNumber = "tel:" + ((headers == null || TextUtils.isEmpty(headers.getCallUsNumber())) ? (android == null || TextUtils.isEmpty(android.getCallUsNumber())) ? "" : android.getCallUsNumber() : headers.getCallUsNumber());
String imageDark = (headers == null || TextUtils.isEmpty(headers.getImageDark())) ? (android == null || TextUtils.isEmpty(android.getImageDark())) ? "" : android.getImageDark() : headers.getImageDark();
if (headers != null && !TextUtils.isEmpty(headers.getImageLight())) {
str = headers.getImageLight();
} else if (android != null && !TextUtils.isEmpty(android.getImageLight())) {
str = android.getImageLight();
}
boolean z = this.isNightMode;
if (!z) {
imageDark = str;
}
int i = z ? R.drawable.ppr_bg_dark : R.drawable.ppr_bg_light;
if (TextUtils.isEmpty(imageDark) || !imageDark.contains("http")) {
this.mBinding.f.setImageResource(i);
} else {
PartnersOfferPojo.loadImage(this.mBinding.f, imageDark);
}
this.mBinding.r.a.setImageResource(this.isNightMode ? R.drawable.ppr_back_night : R.drawable.ppr_back_day);
this.mBinding.r.a.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
PlanPageActivityRevamp2025.this.lambda$setToolbarWithHeaderBanner$0(view);
}
});
this.mBinding.r.b.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
PlanPageActivityRevamp2025.this.lambda$setToolbarWithHeaderBanner$1(view);
}
});
}
public void setUpBenefitsAlsoGetAdapter(ArrayList<PartnersOfferPojo> arrayList) {
if (arrayList == null || arrayList.isEmpty() || arrayList.size() <= 0) {
this.mBinding.a.setVisibility(8);
return;
}
YouWillAlsoGetAdapter youWillAlsoGetAdapter = new YouWillAlsoGetAdapter(this, arrayList);
this.mBinding.g.a.setLayoutManager(new LinearLayoutManager(this, 0, false));
this.mBinding.g.a.setAdapter(youWillAlsoGetAdapter);
}
private void setUpCouponsAndBenefitsVisibility(String str) {
int intValue;
int intValue2;
if (str == null || !str.equalsIgnoreCase(COUNTRY.India.name())) {
PlanPageExperienceV3 planPageExperienceV3 = this.planPageExperienceV3;
int i = 1;
if (planPageExperienceV3 == null || planPageExperienceV3.getPlansV3() == null || this.planPageExperienceV3.getPlansV3().getCouponShowOutsideIndia() >= 4) {
Config config = this.config;
intValue = (config == null || config.getPlanPageV3() == null || this.config.getPlanPageV3().getPlan() == null || this.config.getPlanPageV3().getPlan().getAndroid() == null || this.config.getPlanPageV3().getPlan().getAndroid().getCouponShowOutsideIndia().intValue() >= 4) ? 1 : this.config.getPlanPageV3().getPlan().getAndroid().getCouponShowOutsideIndia().intValue();
} else {
intValue = this.planPageExperienceV3.getPlansV3().getCouponShowOutsideIndia();
}
if (intValue < q.d.values().length && intValue >= 0) {
i = intValue;
}
this.couponModule = q.d.values()[i];
return;
}
PlanPageExperienceV3 planPageExperienceV32 = this.planPageExperienceV3;
int i2 = 3;
if (planPageExperienceV32 == null || planPageExperienceV32.getPlansV3() == null || this.planPageExperienceV3.getPlansV3().getCouponShowInsideIndia() >= 4) {
Config config2 = this.config;
intValue2 = (config2 == null || config2.getPlanPageV3() == null || this.config.getPlanPageV3().getPlan() == null || this.config.getPlanPageV3().getPlan().getAndroid() == null || this.config.getPlanPageV3().getPlan().getAndroid().getCouponShowInsideIndia().intValue() >= 4) ? 3 : this.config.getPlanPageV3().getPlan().getAndroid().getCouponShowInsideIndia().intValue();
} else {
intValue2 = this.planPageExperienceV3.getPlansV3().getCouponShowInsideIndia();
}
if (intValue2 < q.d.values().length && intValue2 >= 0) {
i2 = intValue2;
}
this.couponModule = q.d.values()[i2];
}
private void setUpPlansAdapter() {
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);
this.mBinding.o.a.setNestedScrollingEnabled(false);
this.mBinding.o.a.setLayoutManager(linearLayoutManager);
PlansListAdapterRevamp2025 plansListAdapterRevamp2025 = new PlansListAdapterRevamp2025(this, this.planHashMap, this.renderPlanV3, this);
this.plansListAdapter = plansListAdapterRevamp2025;
plansListAdapterRevamp2025.setCountry(this.country);
this.mBinding.o.a.setVisibility(0);
this.mBinding.o.a.setAdapter(this.plansListAdapter);
}
private void setViewsClickListener() {
this.mBinding.i.d.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if ("Apply coupon".equalsIgnoreCase(PlanPageActivityRevamp2025.this.mBinding.i.d.getText().toString())) {
Intent intent = new Intent((Context) PlanPageActivityRevamp2025.this, (Class<?>) CouponsBenefitsActivityRevamp2025.class);
Bundle bundle = new Bundle();
if (PlanPageActivityRevamp2025.this.partnerBenefitsList != null && !PlanPageActivityRevamp2025.this.partnerBenefitsList.isEmpty()) {
bundle.putParcelableArrayList(Constants.PP_BENEFITS_LIST, PlanPageActivityRevamp2025.this.partnerBenefitsList);
}
if (PlanPageActivityRevamp2025.this.bankCouponOfferList != null && !PlanPageActivityRevamp2025.this.bankCouponOfferList.isEmpty()) {
bundle.putParcelableArrayList(Constants.PP_COUPON_LIST, PlanPageActivityRevamp2025.this.bankCouponOfferList);
}
bundle.putString(Constants.PP_TYPE, Constants.PP_TYPE_COUPON);
bundle.putInt(Constants.KEY_COUPON_STATUS, PlanPageActivityRevamp2025.this.getCouponstatus() == null ? 0 : PlanPageActivityRevamp2025.this.getCouponstatus().ordinal());
bundle.putString(Constants.COUPON_CODE_ONLY, PlanPageActivityRevamp2025.this.couponCodePartner);
bundle.putString(Constants.KEY_PLAN_CODE_COUPON, (PlanPageActivityRevamp2025.this.mintPlanWithZSPlan == null || PlanPageActivityRevamp2025.this.mintPlanWithZSPlan.getSubsPlans() == null || TextUtils.isEmpty(PlanPageActivityRevamp2025.this.mintPlanWithZSPlan.getSubsPlans().getPlanCode())) ? "" : PlanPageActivityRevamp2025.this.mintPlanWithZSPlan.getSubsPlans().getPlanCode());
bundle.putInt(Constants.KEY_COUPON_SHOWN, PlanPageActivityRevamp2025.this.couponModule != null ? PlanPageActivityRevamp2025.this.couponModule.ordinal() : 0);
intent.putExtras(bundle);
PlanPageActivityRevamp2025.this.overridePendingTransition(R.anim.slide_in_up, R.anim.slide_out_up);
PlanPageActivityRevamp2025.this.startActivityForResult(intent, Constants.COUPON_BENEFITS_REQUEST, ActivityOptions.makeCustomAnimation(PlanPageActivityRevamp2025.this, R.anim.slide_in_up, R.anim.slide_out_up).toBundle());
}
}
});
this.mBinding.i.f.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
PlanPageActivityRevamp2025.this.lambda$setViewsClickListener$6(view);
}
});
this.mBinding.i.b.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (PlanPageActivityRevamp2025.this.mintPlanWithZSPlan != null) {
PlanPageActivityRevamp2025 planPageActivityRevamp2025 = PlanPageActivityRevamp2025.this;
planPageActivityRevamp2025.selectedPlan = planPageActivityRevamp2025.mintPlanWithZSPlan.getZsPlan();
SubscriptionPlanSingleton.getInstance().setFunnelName(PlanPageActivityRevamp2025.this.funnelName);
Content content = PlanPageActivityRevamp2025.this.funnelName.equalsIgnoreCase(WebEngageAnalytices.SUBSCRIPTION_POP_UP) ? SubscriptionPlanSingleton.getInstance().getContent() : null;
SubscriptionPlanSingleton.getInstance().setSelectedPlan(PlanPageActivityRevamp2025.this.selectedPlan);
Content content2 = content;
n.A(PlanPageActivityRevamp2025.this, n.g1, "plan_page", n.s0, content2, (String) null);
f5.a.e(PlanPageActivityRevamp2025.this, "plan_detail_page_subscribe_button_click", f5.a.d, f5.a.e, content2, null);
if (f0.G1(PlanPageActivityRevamp2025.this, "userName") != null) {
PlanPageActivityRevamp2025.this.checkZSUserSubscriptionDetail();
} else {
WebEngageAnalytices.trackClickEvents("Subscribe Now", null, "Sign In Initiate", null, "Subscription Funnel", "", "");
PlanPageActivityRevamp2025.this.openLoginPage("Subscription Funnel");
}
}
}
});
}
private void studentCredUI() {
PlanPageExperienceV3 planPageExperienceV3 = this.planPageExperienceV3;
StudentOffersV3 studentOffers = (planPageExperienceV3 == null || planPageExperienceV3.getStudentOffers() == null) ? null : this.planPageExperienceV3.getStudentOffers();
PlanPageExperienceV3 planPageExperienceV32 = this.planPageExperienceV3;
CredV3 cred = (planPageExperienceV32 == null || planPageExperienceV32.getCred() == null) ? null : this.planPageExperienceV3.getCred();
PlanPageV3 planPageV3 = this.planPageV3;
StudentOffer studentOffer = planPageV3 != null ? planPageV3.getStudentOffer() : null;
PlanPageV3 planPageV32 = this.planPageV3;
Cred cred2 = planPageV32 != null ? planPageV32.getCred() : null;
boolean isShowStudentOffer = PianoResponseUtils.isShowStudentOffer(this.planPageExperienceV3, this.config);
boolean isShowCredOffer = PianoResponseUtils.isShowCredOffer(this.planPageExperienceV3, this.config);
if (!isShowStudentOffer && !isShowCredOffer) {
this.mBinding.w.setVisibility(8);
return;
}
String bgDoubleStudentUrl = PianoResponseUtils.bgDoubleStudentUrl(this.isNightMode, studentOffers, studentOffer);
String bgSingleStudentUrl = PianoResponseUtils.bgSingleStudentUrl(this.isNightMode, studentOffers, studentOffer);
PianoResponseUtils.bgDoubleCredUrl(this.isNightMode, cred, cred2);
PianoResponseUtils.bgSingleCredUrl(this.isNightMode, cred, cred2);
int i = this.isNightMode ? R.drawable.ppr_cs_single_bg_night : R.drawable.ppr_cs_single_bg_day;
this.mBinding.w.setVisibility(0);
if (isShowStudentOffer) {
this.mBinding.p.f.setVisibility(8);
this.mBinding.p.q.setVisibility(isShowStudentOffer ? 0 : 8);
if (TextUtils.isEmpty(bgDoubleStudentUrl) || !bgDoubleStudentUrl.contains("http")) {
this.mBinding.p.h.setImageResource(i);
} else {
PartnersOfferPojo.loadImage(this.mBinding.p.h, bgSingleStudentUrl);
}
}
String sTitleText = PianoResponseUtils.sTitleText(studentOffers, studentOffer);
String sOfferText = PianoResponseUtils.sOfferText(studentOffers, studentOffer);
String sCTAText = PianoResponseUtils.sCTAText(studentOffers, studentOffer);
this.mBinding.p.o.setText(sTitleText);
this.mBinding.p.j.setText(sOfferText);
this.mBinding.p.i.setText(sCTAText);
this.mBinding.p.i.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
PlanPageActivityRevamp2025.this.lambda$studentCredUI$2(view);
}
});
}
private void testimonialUI() {
PlanPageExperienceV3 planPageExperienceV3 = this.planPageExperienceV3;
Testimonial testimonial = null;
TestimonialV3 testimonial2 = (planPageExperienceV3 == null || planPageExperienceV3.getTestimonial() == null) ? null : this.planPageExperienceV3.getTestimonial();
PlanPageV3 planPageV3 = this.planPageV3;
if (planPageV3 != null && planPageV3.getTestimonial() != null) {
testimonial = this.planPageV3.getTestimonial();
}
boolean isTestimonial = PianoResponseUtils.isTestimonial(this.planPageExperienceV3, this.config);
this.mBinding.x.setVisibility(isTestimonial ? 0 : 8);
if (isTestimonial) {
this.mBinding.q.b.setText(PianoResponseUtils.testimonialTitle(testimonial2, testimonial));
TestimonialPresenter testimonialPresenter = new TestimonialPresenter(this, new TestimonialViewInterface() {
public void onError(String str) {
PlanPageActivityRevamp2025.this.dismissProgressDialog();
PlanPageActivityRevamp2025.this.mBinding.x.setVisibility(8);
}
public void onResponse(Testimonials testimonials) {
PlanPageActivityRevamp2025.this.dismissProgressDialog();
PlanPageActivityRevamp2025.this.setTestimonialsAdapter(testimonials);
}
});
String testimonialUrl = PianoResponseUtils.getTestimonialUrl(testimonial2, testimonial);
if (TextUtils.isEmpty(testimonialUrl)) {
this.mBinding.x.setVisibility(8);
} else {
testimonialPresenter.getTestimonials(0, "Testimonials", testimonialUrl, (JSONObject) null, (HashMap) null, false, false);
}
}
}
private void updateBottomFooterWithCoupon() {
String string;
String couponCode = getCouponCode();
boolean z = true;
boolean z2 = !TextUtils.isEmpty(couponCode);
CouponUtils.COUPONSTATUS couponstatus = this.couponstatus;
boolean z3 = couponstatus != null && couponstatus == CouponUtils.COUPONSTATUS.INVALID;
q.d dVar = this.couponModule;
if (dVar != q.d.d && dVar != q.d.a) {
z = false;
}
this.mBinding.i.f.setVisibility(8);
this.mBinding.i.d.setVisibility(8);
if (z2) {
this.mBinding.i.f.setText(getString(R.string.remove_coupon));
this.mBinding.i.f.setVisibility(0);
} else if (z) {
this.mBinding.i.d.setText(getString(R.string.apply_coupon));
this.mBinding.i.d.setVisibility(0);
}
if (z3 && z) {
this.mBinding.i.f.setTextColor(ContextCompat.getColor(this, R.color.pprRed));
this.mBinding.i.f.setText(getString(R.string.invalid_coupon_));
this.mBinding.i.f.setVisibility(0);
this.mBinding.i.d.setText(getString(R.string.apply_coupon));
this.mBinding.i.d.setVisibility(0);
return;
}
if (z3) {
return;
}
this.mBinding.i.d.setTextColor(ContextCompat.getColor(this, this.isNightMode ? R.color.pprTextNight : R.color.pprTextDay));
TextView textView = this.mBinding.i.d;
if (z2) {
string = "'" + couponCode + "' applied";
} else {
string = getString(R.string.apply_coupon);
}
textView.setText(string);
this.mBinding.i.d.setVisibility(0);
}
private void updateFaqAdapter(List<ContentsItem> list) {
if (list == null || list.isEmpty()) {
this.mBinding.e.setVisibility(8);
return;
}
PPRFaqAdapter pPRFaqAdapter = new PPRFaqAdapter(this, list, new PPRFaqAdapter.OnPPRFaqItemClick() {
@Override
public void onPPRFaqClick(int i, int i2, ContentsItem contentsItem) {
PlanPageActivityRevamp2025.this.onFaqClick(i, i2, contentsItem);
}
});
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);
linearLayoutManager.setOrientation(1);
this.mBinding.j.a.setLayoutManager(linearLayoutManager);
this.mBinding.j.a.setAdapter(pPRFaqAdapter);
}
private void updateMap(Map<String, String> map, String str, String str2) {
if (map == null || !map.containsKey(str) || TextUtils.isEmpty(str2)) {
return;
}
map.put(str, str2);
}
private void updateMasterPlanList(Config config) {
String planCategory;
if (config == null) {
AppController.j().g();
}
PlansV3 plansV3 = this.renderPlanV3;
List<String> subscriberChoiceGroup = (plansV3 == null || CollectionUtils.isEmpty(plansV3.getSubscriberChoiceGroup())) ? null : this.renderPlanV3.getSubscriberChoiceGroup();
if (subscriberChoiceGroup == null || subscriberChoiceGroup.size() <= 0) {
subscriberChoiceGroup = new ArrayList<>();
subscriberChoiceGroup.add(SubscriptionConverter.PLAN_CATEGORY.MINT.getPlanCategory());
subscriberChoiceGroup.add(SubscriptionConverter.PLAN_CATEGORY.WSJ.getPlanCategory());
subscriberChoiceGroup.add(SubscriptionConverter.PLAN_CATEGORY.ECO.getPlanCategory());
subscriberChoiceGroup.add(SubscriptionConverter.PLAN_CATEGORY.MINT_LITE.getPlanCategory());
subscriberChoiceGroup.add(SubscriptionConverter.PLAN_CATEGORY.BARRONS.getPlanCategory());
subscriberChoiceGroup.add(SubscriptionConverter.PLAN_CATEGORY.WSJ_BARRONS.getPlanCategory());
}
if (!subscriberChoiceGroup.isEmpty() && this.planCampaign != null) {
List<String> arrayList = new ArrayList<>();
switch (AnonymousClass9.$SwitchMap$com$htmedia$mint$htsubscription$SubscriptionConverter$PLAN_CAMPAIGN[this.planCampaign.ordinal()]) {
case 1:
SubscriptionConverter.PLAN_CATEGORY plan_category = SubscriptionConverter.PLAN_CATEGORY.ECO;
planCategory = plan_category.getPlanCategory();
arrayList = setSubscriberChoiceGroup(SubscriptionConverter.PLAN_CATEGORY.WSJ_BARRONS.getPlanCategory(), subscriberChoiceGroup, setSubscriberChoiceGroup(SubscriptionConverter.PLAN_CATEGORY.BARRONS.getPlanCategory(), subscriberChoiceGroup, setSubscriberChoiceGroup(SubscriptionConverter.PLAN_CATEGORY.MINT_LITE.getPlanCategory(), subscriberChoiceGroup, setSubscriberChoiceGroup(SubscriptionConverter.PLAN_CATEGORY.WSJ.getPlanCategory(), subscriberChoiceGroup, setSubscriberChoiceGroup(SubscriptionConverter.PLAN_CATEGORY.MINT.getPlanCategory(), subscriberChoiceGroup, checkSubscriberChoiceGroup(plan_category.getPlanCategory(), subscriberChoiceGroup))))));
break;
case 2:
SubscriptionConverter.PLAN_CATEGORY plan_category2 = SubscriptionConverter.PLAN_CATEGORY.WSJ;
planCategory = plan_category2.getPlanCategory();
arrayList = setSubscriberChoiceGroup(SubscriptionConverter.PLAN_CATEGORY.WSJ_BARRONS.getPlanCategory(), subscriberChoiceGroup, setSubscriberChoiceGroup(SubscriptionConverter.PLAN_CATEGORY.BARRONS.getPlanCategory(), subscriberChoiceGroup, setSubscriberChoiceGroup(SubscriptionConverter.PLAN_CATEGORY.MINT_LITE.getPlanCategory(), subscriberChoiceGroup, setSubscriberChoiceGroup(SubscriptionConverter.PLAN_CATEGORY.ECO.getPlanCategory(), subscriberChoiceGroup, setSubscriberChoiceGroup(SubscriptionConverter.PLAN_CATEGORY.MINT.getPlanCategory(), subscriberChoiceGroup, checkSubscriberChoiceGroup(plan_category2.getPlanCategory(), subscriberChoiceGroup))))));
break;
case 3:
SubscriptionConverter.PLAN_CATEGORY plan_category3 = SubscriptionConverter.PLAN_CATEGORY.MINT;
planCategory = plan_category3.getPlanCategory();
arrayList = setSubscriberChoiceGroup(SubscriptionConverter.PLAN_CATEGORY.WSJ_BARRONS.getPlanCategory(), subscriberChoiceGroup, setSubscriberChoiceGroup(SubscriptionConverter.PLAN_CATEGORY.BARRONS.getPlanCategory(), subscriberChoiceGroup, setSubscriberChoiceGroup(SubscriptionConverter.PLAN_CATEGORY.MINT_LITE.getPlanCategory(), subscriberChoiceGroup, setSubscriberChoiceGroup(SubscriptionConverter.PLAN_CATEGORY.ECO.getPlanCategory(), subscriberChoiceGroup, setSubscriberChoiceGroup(SubscriptionConverter.PLAN_CATEGORY.WSJ.getPlanCategory(), subscriberChoiceGroup, checkSubscriberChoiceGroup(plan_category3.getPlanCategory(), subscriberChoiceGroup))))));
break;
case 4:
SubscriptionConverter.PLAN_CATEGORY plan_category4 = SubscriptionConverter.PLAN_CATEGORY.MINT_LITE;
planCategory = plan_category4.getPlanCategory();
arrayList = setSubscriberChoiceGroup(SubscriptionConverter.PLAN_CATEGORY.WSJ_BARRONS.getPlanCategory(), subscriberChoiceGroup, setSubscriberChoiceGroup(SubscriptionConverter.PLAN_CATEGORY.BARRONS.getPlanCategory(), subscriberChoiceGroup, setSubscriberChoiceGroup(SubscriptionConverter.PLAN_CATEGORY.ECO.getPlanCategory(), subscriberChoiceGroup, setSubscriberChoiceGroup(SubscriptionConverter.PLAN_CATEGORY.WSJ.getPlanCategory(), subscriberChoiceGroup, setSubscriberChoiceGroup(SubscriptionConverter.PLAN_CATEGORY.MINT.getPlanCategory(), subscriberChoiceGroup, checkSubscriberChoiceGroup(plan_category4.getPlanCategory(), subscriberChoiceGroup))))));
break;
case 5:
SubscriptionConverter.PLAN_CATEGORY plan_category5 = SubscriptionConverter.PLAN_CATEGORY.BARRONS;
planCategory = plan_category5.getPlanCategory();
arrayList = setSubscriberChoiceGroup(SubscriptionConverter.PLAN_CATEGORY.WSJ_BARRONS.getPlanCategory(), subscriberChoiceGroup, setSubscriberChoiceGroup(SubscriptionConverter.PLAN_CATEGORY.ECO.getPlanCategory(), subscriberChoiceGroup, setSubscriberChoiceGroup(SubscriptionConverter.PLAN_CATEGORY.WSJ.getPlanCategory(), subscriberChoiceGroup, setSubscriberChoiceGroup(SubscriptionConverter.PLAN_CATEGORY.MINT.getPlanCategory(), subscriberChoiceGroup, checkSubscriberChoiceGroup(plan_category5.getPlanCategory(), subscriberChoiceGroup)))));
break;
case 6:
SubscriptionConverter.PLAN_CATEGORY plan_category6 = SubscriptionConverter.PLAN_CATEGORY.WSJ_BARRONS;
planCategory = plan_category6.getPlanCategory();
arrayList = setSubscriberChoiceGroup(SubscriptionConverter.PLAN_CATEGORY.BARRONS.getPlanCategory(), subscriberChoiceGroup, setSubscriberChoiceGroup(SubscriptionConverter.PLAN_CATEGORY.ECO.getPlanCategory(), subscriberChoiceGroup, setSubscriberChoiceGroup(SubscriptionConverter.PLAN_CATEGORY.WSJ.getPlanCategory(), subscriberChoiceGroup, setSubscriberChoiceGroup(SubscriptionConverter.PLAN_CATEGORY.MINT.getPlanCategory(), subscriberChoiceGroup, checkSubscriberChoiceGroup(plan_category6.getPlanCategory(), subscriberChoiceGroup)))));
break;
default:
planCategory = "";
break;
}
if (arrayList != null && arrayList.size() > 0) {
this.renderPlanV3.setSubscriberChoiceGroup(arrayList);
this.renderPlanV3.setDefaultSelectedPlan(this.defaultSelectedPlan);
updateMap(this.renderPlanV3.getSelectedPlanPerGroup(), planCategory, this.defaultSelectedPlan);
subscriberChoiceGroup = arrayList;
}
}
if (!subscriberChoiceGroup.isEmpty()) {
if (this.planHashMap == null) {
this.planHashMap = new LinkedHashMap<>();
}
Iterator<String> it = subscriberChoiceGroup.iterator();
while (it.hasNext()) {
String next = it.next();
SubscriptionConverter.PLAN_CATEGORY planCategory2 = getPlanCategory(next);
if (planCategory2 != null) {
ArrayList<MintPlanWithZSPlan> arrayList2 = new ArrayList<>();
switch (AnonymousClass9.$SwitchMap$com$htmedia$mint$htsubscription$SubscriptionConverter$PLAN_CATEGORY[planCategory2.ordinal()]) {
case 1:
arrayList2 = this.mintOnlyList;
break;
case 2:
arrayList2 = this.wsjOnlyList;
break;
case 3:
arrayList2 = this.ecoOnlyList;
break;
case 4:
arrayList2 = this.mintLiteOnlyList;
break;
case 5:
arrayList2 = this.mintBarronOnlyList;
break;
case 6:
arrayList2 = this.wsjBarronOnlyList;
break;
}
addPlanToMap(next, this.planHashMap, arrayList2, it);
}
}
}
if (this.planHashMap.isEmpty()) {
this.mBinding.t.setVisibility(8);
} else {
setUpPlansAdapter();
}
}
private void updateRevampUI() {
setToolbarWithHeaderBanner();
studentCredUI();
benefitsOfSubscriptionUI();
setBankCoupon();
setPartnerBenefits();
autoApplyCouponCode();
faqUI();
testimonialUI();
n.z(this, f0.S2(this, System.currentTimeMillis(), this.startTimeStamp), true);
}
private void validateUserSubscriptionAndInitatePayment(MintSubscriptionDetail mintSubscriptionDetail) {
SubscriptionPlanSingleton.getInstance().setSelectedPlan(this.selectedPlan);
if ((mintSubscriptionDetail != null && mintSubscriptionDetail.isSubscriptionActive()) || SubscriptionConverter.isSKUPlanActive(mintSubscriptionDetail)) {
AppController.j().V(mintSubscriptionDetail);
f0.c4(this, mintSubscriptionDetail);
goBack();
} else {
if (!this.isRazorPayEnabled) {
initiatePayment(mintSubscriptionDetail);
return;
}
MintPlanWithZSPlan mintPlanWithZSPlan = this.mintPlanWithZSPlan;
if (mintPlanWithZSPlan == null || mintPlanWithZSPlan.getSubsPlans() == null) {
initiatePayment(mintSubscriptionDetail);
} else {
openCheckoutPage(mintSubscriptionDetail);
}
}
}
public void dismissProgressDialog() {
try {
ProgressDialog progressDialog = this.pDialog;
if (progressDialog != null && progressDialog.isShowing()) {
this.pDialog.dismiss();
}
} catch (IllegalArgumentException unused) {
} catch (Throwable th2) {
this.pDialog = null;
throw th2;
}
this.pDialog = null;
}
public void fetchPlansFromMintServer() {
Config g = AppController.j().g();
String str = (g.getSso() != null ? g.getSso().getPlanFetch() : "") + "?device=android&country=IN";
HashMap hashMap = new HashMap();
hashMap.put("ProductId", getResources().getString(R.string.zs_product_id));
new c1(this, this).a(0, "FetchPlan", str, hashMap, (JSONObject) null, false, false, false, "");
}
public ArrayList<PartnersOfferPojo> getBankCouponOfferList() {
return this.bankCouponOfferList;
}
public String getCouponCode() {
return this.couponCodePartner;
}
public CouponUtils.COUPONSTATUS getCouponstatus() {
return this.couponstatus;
}
public ArrayList<MintPlanWithZSPlan> getEcoOnlyList() {
return this.ecoOnlyList;
}
public ArrayList<MintPlanWithZSPlan> getMintOnlyList() {
return this.mintOnlyList;
}
public void getMintPlan(MintPlan mintPlan) {
Plans plans;
List arrayList;
List arrayList2;
List arrayList3;
List arrayList4;
List arrayList5;
List arrayList6;
if (mintPlan == null || (plans = mintPlan.getPlans()) == null) {
return;
}
List mintOnly = plans.getMintOnly();
if (this.config == null) {
this.config = AppController.j().g();
}
PlanPageExperienceV3 planPageExperienceV3 = this.planPageExperienceV3;
if (planPageExperienceV3 == null || planPageExperienceV3.getPlansV3() == null || this.planPageExperienceV3.getPlansV3().getMintPlan() == null) {
Config config = this.config;
arrayList = (config == null || config.getPlanPageV3() == null || this.config.getPlanPageV3().getPlan() == null || this.config.getPlanPageV3().getPlan().getAndroid() == null || this.config.getPlanPageV3().getPlan().getAndroid().getAndroidMintPlan() == null) ? new ArrayList() : this.config.getPlanPageV3().getPlan().getAndroid().getAndroidMintPlan().getPlanList();
} else {
arrayList = this.planPageExperienceV3.getPlansV3().getMintPlan();
}
List list = arrayList;
if (mintOnly != null && list != null && !mintOnly.isEmpty() && !list.isEmpty()) {
String plan = ConvertMintPlanIntoZSPlan.MINT_PLAN_CODES.LM_BI.getPlan();
String str = this.adFreeUser;
String str2 = this.recommendedPlan;
String str3 = this.recommendedText;
COUNTRY country = this.country;
if (country == null) {
country = COUNTRY.Other;
}
this.mintOnlyList = SubscriptionUtils.getMintPlanWithZSPlan(plan, str, str2, str3, mintOnly, list, country.name());
}
List mintLite = plans.getMintLite();
PlanPageExperienceV3 planPageExperienceV32 = this.planPageExperienceV3;
if (planPageExperienceV32 == null || planPageExperienceV32.getPlansV3() == null || this.planPageExperienceV3.getPlansV3().getMintLitePlan() == null) {
Config config2 = this.config;
arrayList2 = (config2 == null || config2.getPlanPageV3() == null || this.config.getPlanPageV3().getPlan() == null || this.config.getPlanPageV3().getPlan().getAndroid() == null || this.config.getPlanPageV3().getPlan().getAndroid().getAndroidMintLitePlan() == null) ? new ArrayList() : this.config.getPlanPageV3().getPlan().getAndroid().getAndroidMintLitePlan().getPlanList();
} else {
arrayList2 = this.planPageExperienceV3.getPlansV3().getMintLitePlan();
}
List list2 = arrayList2;
if (mintLite != null && list2 != null && !mintLite.isEmpty() && !list2.isEmpty()) {
String str4 = this.adFreeUser;
String str5 = this.recommendedPlan;
String str6 = this.recommendedText;
COUNTRY country2 = this.country;
if (country2 == null) {
country2 = COUNTRY.Other;
}
this.mintLiteOnlyList = SubscriptionUtils.getMintPlanWithZSPlan("", str4, str5, str6, mintLite, list2, country2.name());
}
if (COUNTRY.US != this.country) {
List mintWsj = plans.getMintWsj();
PlanPageExperienceV3 planPageExperienceV33 = this.planPageExperienceV3;
if (planPageExperienceV33 == null || planPageExperienceV33.getPlansV3() == null || this.planPageExperienceV3.getPlansV3() == null || this.planPageExperienceV3.getPlansV3().getWsjPlan() == null) {
Config config3 = this.config;
arrayList4 = (config3 == null || config3.getPlanPageV3() == null || this.config.getPlanPageV3().getPlan() == null || this.config.getPlanPageV3().getPlan().getAndroid() == null || this.config.getPlanPageV3().getPlan().getAndroid().getAndroidWsjPlan() == null) ? new ArrayList() : this.config.getPlanPageV3().getPlan().getAndroid().getAndroidWsjPlan().getPlanList();
} else {
arrayList4 = this.planPageExperienceV3.getPlansV3().getWsjPlan();
}
List list3 = arrayList4;
if (mintWsj != null && list3 != null && !mintWsj.isEmpty() && !list3.isEmpty()) {
String plan2 = ConvertMintPlanIntoZSPlan.MINT_PLAN_CODES.WSJ_BI.getPlan();
String str7 = this.adFreeUser;
String str8 = this.recommendedPlan;
String str9 = this.recommendedText;
COUNTRY country3 = this.country;
if (country3 == null) {
country3 = COUNTRY.Other;
}
this.wsjOnlyList = SubscriptionUtils.getMintPlanWithZSPlan(plan2, str7, str8, str9, mintWsj, list3, country3.name());
}
List mintBarron = plans.getMintBarron();
PlanPageExperienceV3 planPageExperienceV34 = this.planPageExperienceV3;
if (planPageExperienceV34 == null || planPageExperienceV34.getPlansV3() == null || this.planPageExperienceV3.getPlansV3() == null || this.planPageExperienceV3.getPlansV3().getMintBarronPlan() == null) {
Config config4 = this.config;
arrayList5 = (config4 == null || config4.getPlanPageV3() == null || this.config.getPlanPageV3().getPlan() == null || this.config.getPlanPageV3().getPlan().getAndroid() == null || this.config.getPlanPageV3().getPlan().getAndroid().getAndroidMintBarronPlan() == null) ? new ArrayList() : this.config.getPlanPageV3().getPlan().getAndroid().getAndroidMintBarronPlan().getPlanList();
} else {
arrayList5 = this.planPageExperienceV3.getPlansV3().getMintBarronPlan();
}
List list4 = arrayList5;
if (mintBarron != null && list4 != null && !mintBarron.isEmpty() && !list4.isEmpty()) {
String plan3 = ConvertMintPlanIntoZSPlan.MINT_PLAN_CODES.BARRONS.getPlan();
String str10 = this.adFreeUser;
String str11 = this.recommendedPlan;
String str12 = this.recommendedText;
COUNTRY country4 = this.country;
if (country4 == null) {
country4 = COUNTRY.Other;
}
this.mintBarronOnlyList = SubscriptionUtils.getMintPlanWithZSPlan(plan3, str10, str11, str12, mintBarron, list4, country4.name());
}
List wsjBarron = plans.getWsjBarron();
PlanPageExperienceV3 planPageExperienceV35 = this.planPageExperienceV3;
if (planPageExperienceV35 == null || planPageExperienceV35.getPlansV3() == null || this.planPageExperienceV3.getPlansV3() == null || this.planPageExperienceV3.getPlansV3().getWsjBarronPlan() == null) {
Config config5 = this.config;
arrayList6 = (config5 == null || config5.getPlanPageV3() == null || this.config.getPlanPageV3().getPlan() == null || this.config.getPlanPageV3().getPlan().getAndroid() == null || this.config.getPlanPageV3().getPlan().getAndroid().getAndroidWsjBarronPlan() == null) ? new ArrayList() : this.config.getPlanPageV3().getPlan().getAndroid().getAndroidWsjBarronPlan().getPlanList();
} else {
arrayList6 = this.planPageExperienceV3.getPlansV3().getWsjBarronPlan();
}
List list5 = arrayList6;
if (wsjBarron != null && list5 != null && !wsjBarron.isEmpty() && !list5.isEmpty()) {
String plan4 = ConvertMintPlanIntoZSPlan.MINT_PLAN_CODES.WSJ_BARRONS.getPlan();
String str13 = this.adFreeUser;
String str14 = this.recommendedPlan;
String str15 = this.recommendedText;
COUNTRY country5 = this.country;
if (country5 == null) {
country5 = COUNTRY.Other;
}
this.wsjBarronOnlyList = SubscriptionUtils.getMintPlanWithZSPlan(plan4, str13, str14, str15, wsjBarron, list5, country5.name());
}
}
if (COUNTRY.India == this.country) {
List mintEco = plans.getMintEco();
PlanPageExperienceV3 planPageExperienceV36 = this.planPageExperienceV3;
if (planPageExperienceV36 == null || planPageExperienceV36.getPlansV3() == null || this.planPageExperienceV3.getPlansV3().getEcoPlan() == null) {
Config config6 = this.config;
arrayList3 = (config6 == null || config6.getPlanPageV3() == null || this.config.getPlanPageV3().getPlan() == null || this.config.getPlanPageV3().getPlan().getAndroid() == null || this.config.getPlanPageV3().getPlan().getAndroid().getAndroidEcoPlan() == null) ? new ArrayList() : this.config.getPlanPageV3().getPlan().getAndroid().getAndroidEcoPlan().getPlanList();
} else {
arrayList3 = this.planPageExperienceV3.getPlansV3().getEcoPlan();
}
List list6 = arrayList3;
if (mintEco != null && list6 != null && !mintEco.isEmpty() && !list6.isEmpty()) {
String plan5 = ConvertMintPlanIntoZSPlan.MINT_PLAN_CODES.ECO_YEAR.getPlan();
String str16 = this.adFreeUser;
String str17 = this.recommendedPlan;
String str18 = this.recommendedText;
COUNTRY country6 = this.country;
if (country6 == null) {
country6 = COUNTRY.Other;
}
this.ecoOnlyList = SubscriptionUtils.getMintPlanWithZSPlan(plan5, str16, str17, str18, mintEco, list6, country6.name());
}
}
ZohoInAppConfig.getInAppPurchaseKit().getPlans(this);
}
public void getMintServerPlan(MintServerPlan mintServerPlan) {
}
@Override
public void getPianoResponse(String str, ForyouPojo foryouPojo, PianoResponse pianoResponse) {
if (pianoResponse != null) {
PlanPageExperienceV3 planPageExperienceV3 = pianoResponse.getPlanPageExperienceV3();
this.planPageExperienceV3 = planPageExperienceV3;
if (planPageExperienceV3 != null && planPageExperienceV3.getPlansV3() != null && !TextUtils.isEmpty(this.planPageExperienceV3.getPlansV3().getCouponCode())) {
String couponCode = this.planPageExperienceV3.getPlansV3().getCouponCode();
this.couponCodePartner = couponCode;
this.couponCodeTemp = couponCode;
}
}
initSubscription();
}
public PlansListAdapterRevamp2025 getPlansListAdapter() {
return this.plansListAdapter;
}
public void getPremiumPlan(SubscribeNowPerant subscribeNowPerant) {
}
@Override
public void getUserSubscriptionDetail(MintSubscriptionDetail mintSubscriptionDetail) {
validateUserSubscriptionAndInitatePayment(mintSubscriptionDetail);
}
public ArrayList<MintPlanWithZSPlan> getWsjOnlyList() {
return this.wsjOnlyList;
}
protected void onActivityResult(int i, int i2, @Nullable Intent intent) {
super/*androidx.fragment.app.FragmentActivity*/.onActivityResult(i, i2, intent);
boolean z = false;
z = false;
z = false;
if (i == 1234 && i2 == -1) {
if (intent == null || !intent.hasExtra(Constants.COUPON_CODE_ONLY)) {
return;
}
String stringExtra = intent.getStringExtra(Constants.COUPON_CODE_ONLY);
String str = "";
if (TextUtils.isEmpty(stringExtra)) {
setCouponCode("");
this.couponModulePlanPage.removeCoupon();
PlansListAdapterRevamp2025 plansListAdapterRevamp2025 = this.plansListAdapter;
if (plansListAdapterRevamp2025 != null) {
plansListAdapterRevamp2025.notifyAdapter();
return;
}
return;
}
int intExtra = intent.getIntExtra(Constants.KEY_COUPON_STATUS, 0);
CouponUtils.COUPONSTATUS couponstatus = CouponUtils.COUPONSTATUS.values()[(intExtra >= 0 || intExtra < CouponUtils.COUPONSTATUS.values().length) ? intExtra : 0];
this.couponstatus = couponstatus;
if (couponstatus == null || (couponstatus != null && couponstatus == CouponUtils.COUPONSTATUS.APPLY)) {
CouponModulePlanPageRevamp2025 couponModulePlanPageRevamp2025 = this.couponModulePlanPage;
Config config = this.config;
MintPlanWithZSPlan mintPlanWithZSPlan = this.mintPlanWithZSPlan;
if (mintPlanWithZSPlan != null && mintPlanWithZSPlan.getSubsPlans() != null && !TextUtils.isEmpty(this.mintPlanWithZSPlan.getSubsPlans().getPlanCode())) {
str = this.mintPlanWithZSPlan.getSubsPlans().getPlanCode();
}
couponModulePlanPageRevamp2025.couponApply(config, stringExtra, null, str);
return;
}
if (TextUtils.isEmpty(this.couponCodePartner) || !this.couponCodePartner.equalsIgnoreCase(stringExtra)) {
setCouponCode(stringExtra);
MintPlanWithZSPlan mintPlanWithZSPlan2 = this.mintPlanWithZSPlan;
if (mintPlanWithZSPlan2 != null && mintPlanWithZSPlan2.getSubsPlans() != null) {
str = this.mintPlanWithZSPlan.getSubsPlans().getPlanCode();
}
this.couponModulePlanPage.getCouponPlanFromAnotherScreen(stringExtra, str, Constants.couponPlan);
return;
}
return;
}
if (i == SIGN_IN_REQUEST && i2 == -1) {
if (intent != null && intent.hasExtra("isSignUp")) {
this.mNeedToSetPassword = intent.getBooleanExtra("isSignUp", false);
}
HashMap hashMap = new HashMap();
String F1 = f0.F1(this);
if (F1 != null) {
hashMap.put("userEmail", F1);
}
if (f0.G1(this, "userName") != null) {
hashMap.put("userName", f0.G1(this, "userName"));
}
if (!hashMap.isEmpty()) {
o0.i(hashMap);
}
checkZSUserSubscriptionDetail();
return;
}
if (i != 1003 || i2 != -1) {
if (i == 1002 && i2 == -1) {
SubscriptionTrigger.openOnBoardJourneyVideo(this);
return;
}
if (i == 20524 && i2 == -1) {
newSubscriptionPage(getUpdatedSubscriptionDetail(intent));
return;
} else {
if (i == 1004 && i2 == -1) {
setSubscriptionIntent();
finish();
return;
}
return;
}
}
Intent intent2 = getIntent();
if (intent2 != null && intent2.getExtras() != null && intent2.getExtras().containsKey("needSetPassword")) {
z = intent2.getExtras().getBoolean("needSetPassword");
}
if (z) {
Intent intent3 = new Intent((Context) this, (Class<?>) LoginRegisterActivity.class);
intent3.putExtra("origin", "Subscription After");
intent3.setFlags(603979776);
startActivityForResult(intent3, PlanPageActivity.AFTER_SUBSCRIPTION_REQUEST);
return;
}
if (f0.R0(this) == q.n.c) {
SubscriptionTrigger.openOnBoardJourneyVideo(this);
return;
}
Intent intent4 = new Intent((Context) this, (Class<?>) LoginRegisterActivity.class);
intent4.putExtra("origin", "Linking");
intent4.putExtra("linkingType", f0.R0(this).ordinal());
intent4.setFlags(603979776);
startActivityForResult(intent4, PlanPageActivity.AFTER_SUBSCRIPTION_REQUEST);
}
public void onBackPressed() {
JuspayCheckout juspayCheckout = this.juspayCheckout;
if (juspayCheckout == null || !(juspayCheckout == null || juspayCheckout.r())) {
goBack();
}
}
protected void onCreate(Bundle bundle) {
super/*androidx.fragment.app.FragmentActivity*/.onCreate(bundle);
this.startTimeStamp = System.currentTimeMillis();
getWindow().setSoftInputMode(32);
this.mBinding = (i2) DataBindingUtil.setContentView(this, R.layout.activity_plan_page_revamp);
boolean E = AppController.j().E();
this.isNightMode = E;
this.mBinding.c(Boolean.valueOf(E));
setStatusBar();
Config g = AppController.j().g();
this.config = g;
this.planPageV3 = (g == null || g.getPlanPageV3() == null) ? null : this.config.getPlanPageV3();
initializeAllRelatedDetails();
initJuspay();
setViewsClickListener();
}
public void onError(@NonNull ZSError zSError) {
}
public void onError(String str, String str2) {
dismissProgressDialog();
}
public void onPaymentError(int i, String str, PaymentData paymentData) {
this.razorPayCheckout.onPaymentError(i, str, paymentData);
}
public void onPaymentSuccess(String str, PaymentData paymentData) {
this.razorPayCheckout.onPaymentSuccess(str, paymentData);
}
public void onPlanDetailsFetched(@NonNull ArrayList<ZSPlan> arrayList) {
if (arrayList == null || arrayList.size() <= 0) {
return;
}
mapZohoPlansWithMintPlan(SubscriptionConverter.getFilterPlanByCustomField(SubscriptionUtils.filterActivePlanFromZOHO(arrayList)));
dismissProgressDialog();
updateMasterPlanList(this.config);
updateRevampUI();
}
@Override
public void onPlanSelected(MintPlanWithZSPlan mintPlanWithZSPlan) {
this.mintPlanWithZSPlan = mintPlanWithZSPlan;
updateBottomFooterInitial();
}
public void onPurchaseSyncedWithServer(@NonNull ZSSubscriptionDetail zSSubscriptionDetail) {
dismissProgressDialog();
MintSubscriptionDetail convertZSSubsDetailWithMintSubs = GetUserSubscriptionDetail.convertZSSubsDetailWithMintSubs(zSSubscriptionDetail);
SyncPurchaseWithSession.syncPurchaseWithSession(this, convertZSSubsDetailWithMintSubs);
Content content = this.funnelName.equalsIgnoreCase(WebEngageAnalytices.SUBSCRIPTION_POP_UP) ? SubscriptionPlanSingleton.getInstance().getContent() : null;
n.A(this, n.h1, "plan_page", n.t0, content, (String) null);
f5.a.e(this, "payment_success", f5.a.d, f5.a.f, content, null);
WebEngageAnalytices.trackPaymentStatus(WebEngageAnalytices.PAYMENT_SUCESS, zSSubscriptionDetail, this.mintPlanWithZSPlan, null, this.funnelName, this.premiumStory, WebEngageAnalytices.PAYMENTSTORE.PLAY_STORE.getStore(), true);
getIntent().putExtra("needSetPassword", this.mNeedToSetPassword);
GetUserSubscriptionDetail.SyncSubscriptionAsyncTask syncSubscriptionAsyncTask = new GetUserSubscriptionDetail.SyncSubscriptionAsyncTask(this);
if (!TextUtils.isEmpty(this.premiumStory)) {
syncSubscriptionAsyncTask.setPremiumStory(this.premiumStory);
}
if (!TextUtils.isEmpty(this.funnelName)) {
syncSubscriptionAsyncTask.setFunnelEntry(this.funnelName);
}
syncSubscriptionAsyncTask.setPianoExp(SubscriptionPlanSingleton.getInstance().getPianoExpName());
syncSubscriptionAsyncTask.setZsPlan(this.selectedPlan);
syncSubscriptionAsyncTask.setMintPlanWithZSPlan(this.mintPlanWithZSPlan);
syncSubscriptionAsyncTask.setUserSubscriptionStatus("New");
syncSubscriptionAsyncTask.execute(convertZSSubsDetailWithMintSubs);
}
public void onRequestPermissionsResult(int i, @NonNull String[] strArr, @NonNull int[] iArr) {
super/*androidx.fragment.app.FragmentActivity*/.onRequestPermissionsResult(i, strArr, iArr);
if (i == 1) {
if (iArr.length <= 0 || iArr[0] != 0) {
Toast.makeText((Context) this, (CharSequence) "Permission Denied", 0).show();
} else {
callIntent(this.mobileNumber);
}
}
}
protected void onResume() {
super/*androidx.fragment.app.FragmentActivity*/.onResume();
n.q0(this, WebEngageAnalytices.PLAN_DETAIL_SCREEN);
n.A(this, n.f1, "plan_page", n.s0, this.content, (String) null);
WebEngageAnalytices.trackActivityLandEvent(WebEngageAnalytices.PLAN_DETAIL_SCREEN, this.funnelName, this.content, this.paywallReason);
}
protected void onStart() {
super/*androidx.appcompat.app.AppCompatActivity*/.onStart();
}
public void onStorePurchaseCompleted() {
f0.w3(this, "issubscribedmint", true);
Toast.makeText((Context) this, (CharSequence) "Purchase Completed Successfully.", 0).show();
initProgressDialogAndShow();
}
@Override
public void onSubscriptionError(SubscriptionError subscriptionError) {
if (subscriptionError.getErrorCode() == ErrorCode.TOKEN_API_FAILED || subscriptionError.getErrorCode() == ErrorCode.UNKNOWN_ERROR) {
Toast.makeText((Context) this, (CharSequence) "Something went wrong. Please try later.", 0).show();
} else if (subscriptionError.getErrorCode() == ErrorCode.TOKEN_EXPIRE) {
WebEngageAnalytices.trackClickEvents("Sign In", null, "Sign In Initiate", null, "Subscription Funnel", "", "");
openLoginPage("Subscription Funnel");
} else if (subscriptionError.getErrorCode() == ErrorCode.ITEM_ALREADY_PURCHASED) {
Toast.makeText((Context) this, (CharSequence) ZSErrorCodeHandling.ZSErrorCodeMessages.PURCHASE_ALREADY_PROCESSED, 1).show();
}
o0.e(subscriptionError.getErrorCode().name(), subscriptionError.getMessage(), getClass().getName());
if (CheckSubscriptionFromLocal.isSubscribedUser(this)) {
setSubscriptionIntent();
finish();
}
}
public void openLoginPage(String str) {
Intent intent = new Intent((Context) this, (Class<?>) LoginRegisterActivity.class);
intent.putExtra("ssoReason", "plans_page");
intent.putExtra("origin", str);
if (!TextUtils.isEmpty(this.premiumStory) && this.premiumStory.equalsIgnoreCase("premium")) {
intent.putExtra("premiumStory", true);
}
intent.setFlags(603979776);
if (str.equals("Subscription After")) {
startActivityForResult(intent, PlanPageActivity.AFTER_SUBSCRIPTION_REQUEST);
} else {
startActivityForResult(intent, SIGN_IN_REQUEST);
}
}
@Override
public void pianoError(String str, ForyouPojo foryouPojo, PianoResponse pianoResponse) {
Metadata metadata;
Content content = this.content;
if (content != null && (metadata = content.getMetadata()) != null) {
String agency = metadata.getAgency();
if ("Economist".equalsIgnoreCase(agency)) {
this.planCampaign = SubscriptionConverter.PLAN_CAMPAIGN.CAMPAIGN_ECO;
} else if ("WSJ".equalsIgnoreCase(agency)) {
this.planCampaign = SubscriptionConverter.PLAN_CAMPAIGN.CAMPAIGN_WSJ;
}
}
initSubscription();
}
public void setBankCouponOfferList(ArrayList<PartnersOfferPojo> arrayList) {
this.bankCouponOfferList = arrayList;
}
public void setCouponCode(String str) {
this.couponCodePartner = str;
}
public void setCouponstatus(CouponUtils.COUPONSTATUS couponstatus) {
this.couponstatus = couponstatus;
}
public void setEcoOnlyList(ArrayList<MintPlanWithZSPlan> arrayList) {
this.ecoOnlyList = arrayList;
}
public void setMintOnlyList(ArrayList<MintPlanWithZSPlan> arrayList) {
this.mintOnlyList = arrayList;
}
public void setPlansListAdapter(PlansListAdapterRevamp2025 plansListAdapterRevamp2025) {
this.plansListAdapter = plansListAdapterRevamp2025;
}
public void setWsjOnlyList(ArrayList<MintPlanWithZSPlan> arrayList) {
this.wsjOnlyList = arrayList;
}
public void showProgressDialog() {
ProgressDialog progressDialog = this.pDialog;
if (progressDialog == null || progressDialog.isShowing()) {
return;
}
this.pDialog.show();
}
public void updateBottomFooterInitial() {
MintPlanWithZSPlan mintPlanWithZSPlan;
MintPlanWithZSPlan mintPlanWithZSPlan2 = this.mintPlanWithZSPlan;
if (mintPlanWithZSPlan2 != null) {
if (mintPlanWithZSPlan2 != null && this.couponstatus != CouponUtils.COUPONSTATUS.APPLY) {
if (mintPlanWithZSPlan2.isCouponApplied()) {
this.couponstatus = CouponUtils.COUPONSTATUS.APPLIED;
} else {
this.couponstatus = CouponUtils.COUPONSTATUS.INVALID;
}
}
MintPlanWithZSPlan mintPlanWithZSPlan3 = this.mintPlanWithZSPlan;
if (mintPlanWithZSPlan3 != null && mintPlanWithZSPlan3.getSubsPlans() != null && this.mintPlanWithZSPlan.getSubsPlans().getPlanCode() != null) {
this.selectedPlanCode = this.mintPlanWithZSPlan.getSubsPlans().getPlanCode();
}
SubscriptionConverter.PLAN_CATEGORY.MINT.getPlanCategory().equals(this.mintPlanWithZSPlan.getPlanCategory());
SubsPlans subsPlans = this.mintPlanWithZSPlan.getSubsPlans();
if (subsPlans != null) {
subsPlans.getName();
boolean isCouponApplied = this.mintPlanWithZSPlan.isCouponApplied();
int actualPrice = (int) this.mintPlanWithZSPlan.getActualPrice();
double recurringPrice = subsPlans.getRecurringPrice();
double discountPrice = this.mintPlanWithZSPlan.getDiscountPrice();
String format = this.numberFormat.format(this.mintPlanWithZSPlan.getActualPrice());
String currencySymbol = subsPlans.getCurrencySymbol();
String str = currencySymbol + (isCouponApplied ? this.numberFormat.format(discountPrice) : this.numberFormat.format(recurringPrice));
if (isCouponApplied) {
boolean isTrialCoupon = this.mintPlanWithZSPlan.isTrialCoupon();
this.mBinding.i.c.setVisibility(0);
if (isTrialCoupon) {
this.mBinding.i.c.setText(currencySymbol + format);
} else {
this.mBinding.i.c.setText(currencySymbol + this.numberFormat.format((int) recurringPrice));
}
TextView textView = this.mBinding.i.c;
textView.setPaintFlags(textView.getPaintFlags() | 16);
} else if (recurringPrice == actualPrice || (mintPlanWithZSPlan = this.mintPlanWithZSPlan) == null || mintPlanWithZSPlan.getPianoPlan() == null || !this.mintPlanWithZSPlan.getPianoPlan().isStrikeOffText()) {
this.mBinding.i.c.setVisibility(8);
} else {
this.mBinding.i.c.setVisibility(0);
this.mBinding.i.c.setText(currencySymbol + format);
TextView textView2 = this.mBinding.i.c;
textView2.setPaintFlags(textView2.getPaintFlags() | 16);
}
COUNTRY country = this.country;
if (country == null || country == COUNTRY.India) {
this.mBinding.i.e.setText("Subscribe for " + str);
if (!isCouponApplied) {
this.mBinding.i.e.setText("Subscribe for " + str);
} else if (this.mintPlanWithZSPlan.isTrialCoupon()) {
this.mBinding.i.e.setText("Subscribe for " + currencySymbol + this.numberFormat.format(recurringPrice));
} else {
this.mBinding.i.e.setText("Subscribe for " + str);
}
} else {
MintPlanWithZSPlan mintPlanWithZSPlan4 = this.mintPlanWithZSPlan;
List outsideIndiaPaymentMethod = (mintPlanWithZSPlan4 == null || mintPlanWithZSPlan4.getPianoPlan() == null) ? null : this.mintPlanWithZSPlan.getPianoPlan().getOutsideIndiaPaymentMethod();
if (outsideIndiaPaymentMethod != null && outsideIndiaPaymentMethod.size() == 1 && "GOOGLE_PLAY".equalsIgnoreCase(((PaymentMethod) outsideIndiaPaymentMethod.get(0)).getType())) {
MintPlanWithZSPlan mintPlanWithZSPlan5 = this.mintPlanWithZSPlan;
ZSPlan zsPlan = mintPlanWithZSPlan5 != null ? mintPlanWithZSPlan5.getZsPlan() : null;
if (zsPlan != null && zsPlan.getSkuDetails() != null) {
str = zsPlan.getSkuDetails().d();
}
this.mBinding.i.e.setText("Subscribe for " + str);
} else {
this.mBinding.i.e.setText("Subscribe for " + str);
if (!isCouponApplied) {
this.mBinding.i.e.setText("Subscribe for " + str);
} else if (this.mintPlanWithZSPlan.isTrialCoupon()) {
this.mBinding.i.e.setText("Subscribe for " + currencySymbol + this.numberFormat.format(recurringPrice));
} else {
this.mBinding.i.e.setText("Subscribe for " + str);
}
}
}
if (TextUtils.isEmpty(this.couponCodeTemp)) {
updateBottomFooterWithCoupon();
}
this.couponCodeTemp = "";
}
}
}
}