MD5 校验值:facd8e3913e14e36e7daf9e69fbd45cb
AbstractActivityC0173i.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。
package b2; import B2.o; import G1.C; import a2.C0144a; import android.os.Bundle; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.ScrollView; import android.widget.TextView; import androidx.activity.result.ActivityResultLauncher; import androidx.activity.result.contract.ActivityResultContracts$StartActivityForResult; import androidx.viewbinding.ViewBindings; import com.google.android.gms.common.internal.safeparcel.vhdT.pxdtmJzwAB; import com.revenuecat.purchases.CustomerInfo; import com.revenuecat.purchases.ListenerConversionsCommonKt; import com.revenuecat.purchases.ListenerConversionsKt; import com.revenuecat.purchases.Package; import com.revenuecat.purchases.PackageType; import com.revenuecat.purchases.PurchaseParams; import com.revenuecat.purchases.Purchases; import com.revenuecat.purchases.common.Constants; import com.revenuecat.purchases.common.UtilsKt; import com.revenuecat.purchases.models.GoogleProrationMode; import com.revenuecat.purchases.models.Price; import com.revenuecat.purchases.models.StoreProduct; import com.revenuecat.purchases.models.SubscriptionOption; import com.revenuecat.purchases.models.SubscriptionOptions; import com.revenuecat.purchases.models.Transaction; import it.Ettore.spesaelettrica.R; import it.Ettore.spesaelettrica.ui.activity.ActivityBilling; import it.ettoregallina.butils.ui.BenefitView; import it.ettoregallina.butils.ui.SkuView; import it.ettoregallina.butils.ui.TrialButtonView; import java.text.NumberFormat; import java.util.ArrayList; import java.util.Arrays; import java.util.Currency; import java.util.Iterator; import java.util.List; import n2.AbstractC0372g; public abstract class AbstractActivityC0173i extends AbstractActivityC0174j { public C0144a f1762a; public final String f1763b = Constants.GOOGLE_PLAY_MANAGEMENT_URL; public final String f1764c = "https://www.egalnetsoftwares.com/privacy-policy/"; public final String f1765d = "https://www.egalnetsoftwares.com/terms_of_service_app/"; public final String e = pxdtmJzwAB.zbgiCwC; public final String f = "https://support.google.com/googleplay/answer/7018481"; public final boolean g = true; public final ActivityResultLauncher h; public AbstractActivityC0173i() { ActivityResultLauncher registerForActivityResult = registerForActivityResult(new ActivityResultContracts$StartActivityForResult(), new D0.b((ActivityBilling) this, 16)); kotlin.jvm.internal.k.d(registerForActivityResult, "registerForActivityResult(...)"); this.h = registerForActivityResult; } public static final void f(final AbstractActivityC0173i abstractActivityC0173i, final Package r18, Package r19, final SkuView skuView, final CustomerInfo customerInfo) { String str; Currency currency; boolean z3; StoreProduct product; Price price; StoreProduct product2; Price price2; StoreProduct product3; Price price3; abstractActivityC0173i.getClass(); if (r18 != null) { boolean z4 = r18.getProduct().getPrice().getAmountMicros() < ((r19 == null || (product3 = r19.getProduct()) == null || (price3 = product3.getPrice()) == null) ? 0L : price3.getAmountMicros()); skuView.setSale(z4); skuView.setVisibility(0); PackageType packageType = r18.getPackageType(); int[] iArr = AbstractC0166b.f1748a; int i = iArr[packageType.ordinal()]; String str2 = null; skuView.setNomeSku(i != 1 ? i != 2 ? i != 3 ? null : abstractActivityC0173i.getString(R.string.butils_lifetime) : abstractActivityC0173i.getString(R.string.butils_anno1) : abstractActivityC0173i.getString(R.string.butils_mesi3)); skuView.setPrezzoOriginaleSku((!z4 || r19 == null || (product2 = r19.getProduct()) == null || (price2 = product2.getPrice()) == null) ? null : price2.getFormatted()); skuView.setPrezzoSku(r18.getProduct().getPrice().getFormatted()); if (r18.getPackageType() == PackageType.LIFETIME) { str = abstractActivityC0173i.getString(R.string.butils_lifetime_descr); } else { int i4 = iArr[r18.getPackageType().ordinal()]; Integer num = i4 != 1 ? i4 != 2 ? i4 != 4 ? i4 != 5 ? i4 != 6 ? null : 6 : 2 : 1 : 12 : 3; if (num != null) { int intValue = num.intValue(); StoreProduct product4 = r18.getProduct(); kotlin.jvm.internal.k.e(product4, "product"); long amountMicros = product4.getPrice().getAmountMicros(); String currencyCode = product4.getPrice().getCurrencyCode(); kotlin.jvm.internal.k.e(currencyCode, "currencyCode"); double d2 = amountMicros / UtilsKt.MICROS_MULTIPLIER; double d4 = d2 / intValue; NumberFormat numberFormat = NumberFormat.getInstance(); int i5 = d2 < 300.0d ? 2 : 0; numberFormat.setMaximumFractionDigits(i5); numberFormat.setMinimumFractionDigits(i5); try { currency = Currency.getInstance(currencyCode); } catch (Exception unused) { currency = null; } if (currency != null) { numberFormat.setCurrency(currency); } str = String.format("%s %s / %s", Arrays.copyOf(new Object[]{numberFormat.format(d4), currencyCode, abstractActivityC0173i.getString(R.string.butils_mese)}, 3)); } else { str = null; } } skuView.setDescrizioneSku(str); if (z4) { if (((r19 == null || (product = r19.getProduct()) == null || (price = product.getPrice()) == null) ? null : Long.valueOf(price.getAmountMicros())) != null) { double d5 = 100; double amountMicros2 = d5 - ((r18.getProduct().getPrice().getAmountMicros() * d5) / r3.longValue()); if (amountMicros2 > 0.0d && amountMicros2 < 100.0d) { str2 = abstractActivityC0173i.getString(R.string.butils_risparmio, String.format("%d%s", Arrays.copyOf(new Object[]{Integer.valueOf((int) Math.ceil(amountMicros2)), abstractActivityC0173i.getString(R.string.punt_percent)}, 2))); } skuView.setBanner(str2); } else { skuView.setBanner(null); } } skuView.setOnClickListener(new View.OnClickListener() { @Override public final void onClick(View view) { AbstractActivityC0173i this$0 = AbstractActivityC0173i.this; kotlin.jvm.internal.k.e(this$0, "this$0"); SkuView skuView2 = skuView; kotlin.jvm.internal.k.e(skuView2, "$skuView"); CustomerInfo purchaserInfo = customerInfo; kotlin.jvm.internal.k.e(purchaserInfo, "$purchaserInfo"); Package r22 = r18; boolean z5 = true; if (r22.getPackageType() == PackageType.LIFETIME) { List<Transaction> nonSubscriptionTransactions = purchaserInfo.getNonSubscriptionTransactions(); ArrayList arrayList = new ArrayList(l2.l.H(nonSubscriptionTransactions, 10)); Iterator<T> it2 = nonSubscriptionTransactions.iterator(); while (it2.hasNext()) { arrayList.add(((Transaction) it2.next()).getProductIdentifier()); } if (arrayList.contains(r22.getProduct().getId())) { String string = this$0.getString(R.string.butils_impossibile_gestire_acquisti); kotlin.jvm.internal.k.d(string, "getString(...)"); o.a0(this$0, 1, string).show(); } skuView2.setEnabled(false); skuView2.setLoading(true); SubscriptionOptions subscriptionOptions = r22.getProduct().getSubscriptionOptions(); SubscriptionOption basePlan = subscriptionOptions == null ? subscriptionOptions.getBasePlan() : null; PurchaseParams.Builder builder = basePlan == null ? new PurchaseParams.Builder(this$0, basePlan) : new PurchaseParams.Builder(this$0, r22); if (r22.getPackageType() != PackageType.LIFETIME || purchaserInfo.getActiveSubscriptions().size() != 1) { z5 = false; } if (z5) { String str3 = (String) l2.j.N(purchaserInfo.getActiveSubscriptions()); if (D2.m.R(str3, Constants.SUBS_ID_BASE_PLAN_ID_SEPARATOR, false)) { str3 = (String) D2.m.l0(str3, new String[]{Constants.SUBS_ID_BASE_PLAN_ID_SEPARATOR}).get(0); } builder.oldProductId(str3); builder.googleProrationMode(GoogleProrationMode.IMMEDIATE_WITH_TIME_PRORATION); } ListenerConversionsCommonKt.purchaseWith(Purchases.Companion.getSharedInstance(), builder.build(), new C0170f(skuView2, this$0), new C0171g(this$0, z5, skuView2)); } else { if (purchaserInfo.getActiveSubscriptions().size() > 1) { String string2 = this$0.getString(R.string.butils_impossibile_gestire_acquisti); kotlin.jvm.internal.k.d(string2, "getString(...)"); o.a0(this$0, 1, string2).show(); } skuView2.setEnabled(false); skuView2.setLoading(true); SubscriptionOptions subscriptionOptions2 = r22.getProduct().getSubscriptionOptions(); if (subscriptionOptions2 == null) { } if (basePlan == null) { } if (r22.getPackageType() != PackageType.LIFETIME) { } z5 = false; if (z5) { } ListenerConversionsCommonKt.purchaseWith(Purchases.Companion.getSharedInstance(), builder.build(), new C0170f(skuView2, this$0), new C0171g(this$0, z5, skuView2)); } } }); if (!customerInfo.getActiveSubscriptions().contains(r18.getProduct().getId())) { List<Transaction> nonSubscriptionTransactions = customerInfo.getNonSubscriptionTransactions(); ArrayList arrayList = new ArrayList(l2.l.H(nonSubscriptionTransactions, 10)); Iterator<T> it2 = nonSubscriptionTransactions.iterator(); while (it2.hasNext()) { arrayList.add(((Transaction) it2.next()).getProductIdentifier()); } if (!arrayList.contains(r18.getProduct().getId())) { z3 = false; skuView.setActive(z3); skuView.setEnabled(!z3); skuView.setLoading(false); } } z3 = true; skuView.setActive(z3); skuView.setEnabled(!z3); skuView.setLoading(false); } } public final C0144a g() { C0144a c0144a = this.f1762a; if (c0144a != null) { return c0144a; } kotlin.jvm.internal.k.j("binding"); throw null; } public abstract Z1.a h(); public final void i(String str) { o.a0(this, 1, str).show(); } public final void j(boolean z3) { if (z3) { g().f1587p.setText(R.string.butils_piano_corrente); g().n.setText(R.string.butils_gestisci_piano_corrente_msg); g().n.setVisibility(0); g().f1588q.setVisibility(8); return; } g().f1587p.setText(R.string.butils_aggiorna_pro); g().n.setText((CharSequence) null); g().n.setVisibility(8); g().f1588q.setVisibility(0); } @Override public void onCreate(Bundle bundle) { int i = h().f1533c; if (i != 0) { setTheme(i); } super.onCreate(bundle); View inflate = getLayoutInflater().inflate(R.layout.activity_billing, (ViewGroup) null, false); int i4 = R.id.autorenew_terms_textview; TextView textView = (TextView) ViewBindings.findChildViewById(inflate, R.id.autorenew_terms_textview); if (textView != null) { i4 = R.id.benefit_view; BenefitView benefitView = (BenefitView) ViewBindings.findChildViewById(inflate, R.id.benefit_view); if (benefitView != null) { i4 = R.id.cancel_subscription_textview; TextView textView2 = (TextView) ViewBindings.findChildViewById(inflate, R.id.cancel_subscription_textview); if (textView2 != null) { i4 = R.id.close_imageview; ImageView imageView = (ImageView) ViewBindings.findChildViewById(inflate, R.id.close_imageview); if (imageView != null) { i4 = R.id.contatta_textview; TextView textView3 = (TextView) ViewBindings.findChildViewById(inflate, R.id.contatta_textview); if (textView3 != null) { i4 = R.id.gestisci_abbonamenti_textview; TextView textView4 = (TextView) ViewBindings.findChildViewById(inflate, R.id.gestisci_abbonamenti_textview); if (textView4 != null) { i4 = R.id.info_varie_textview; TextView textView5 = (TextView) ViewBindings.findChildViewById(inflate, R.id.info_varie_textview); if (textView5 != null) { i4 = R.id.link_aggiuntivi_layout; if (((LinearLayout) ViewBindings.findChildViewById(inflate, R.id.link_aggiuntivi_layout)) != null) { i4 = R.id.privacy_policy_textview; TextView textView6 = (TextView) ViewBindings.findChildViewById(inflate, R.id.privacy_policy_textview); if (textView6 != null) { i4 = R.id.progress_layout; LinearLayout linearLayout = (LinearLayout) ViewBindings.findChildViewById(inflate, R.id.progress_layout); if (linearLayout != null) { i4 = R.id.sku_annuale_view; SkuView skuView = (SkuView) ViewBindings.findChildViewById(inflate, R.id.sku_annuale_view); if (skuView != null) { i4 = R.id.sku_layout; if (((LinearLayout) ViewBindings.findChildViewById(inflate, R.id.sku_layout)) != null) { i4 = R.id.sku_lifetime_view; SkuView skuView2 = (SkuView) ViewBindings.findChildViewById(inflate, R.id.sku_lifetime_view); if (skuView2 != null) { i4 = R.id.sku_trimestrale_view; SkuView skuView3 = (SkuView) ViewBindings.findChildViewById(inflate, R.id.sku_trimestrale_view); if (skuView3 != null) { i4 = R.id.sottotitolo_textview; TextView textView7 = (TextView) ViewBindings.findChildViewById(inflate, R.id.sottotitolo_textview); if (textView7 != null) { i4 = R.id.terms_textview; TextView textView8 = (TextView) ViewBindings.findChildViewById(inflate, R.id.terms_textview); if (textView8 != null) { i4 = R.id.titolo_textview; TextView textView9 = (TextView) ViewBindings.findChildViewById(inflate, R.id.titolo_textview); if (textView9 != null) { i4 = R.id.trial_button_view; TrialButtonView trialButtonView = (TrialButtonView) ViewBindings.findChildViewById(inflate, R.id.trial_button_view); if (trialButtonView != null) { this.f1762a = new C0144a((ScrollView) inflate, textView, benefitView, textView2, imageView, textView3, textView4, textView5, textView6, linearLayout, skuView, skuView2, skuView3, textView7, textView8, textView9, trialButtonView); setContentView(g().f1582a); K1.d.Companion.getClass(); j(K1.c.a((ActivityBilling) this).c()); C0144a g = g(); g.e.setOnClickListener(new C(this, 5)); g().f1584c.setBenefits(h().f1532b); C0144a g4 = g(); g4.h.setText(l2.j.T(Z1.g.b(this, this.g, true), " • ", null, null, null, 62)); TextView contattaTextview = g().f; kotlin.jvm.internal.k.d(contattaTextview, "contattaTextview"); String string = getString(R.string.butils_contattaci); kotlin.jvm.internal.k.d(string, "getString(...)"); AbstractC0372g.t(contattaTextview, string, new C0172h(this, 0)); TextView gestisciAbbonamentiTextview = g().g; kotlin.jvm.internal.k.d(gestisciAbbonamentiTextview, "gestisciAbbonamentiTextview"); String string2 = getString(R.string.butils_gestisci_sottoscrizioni); kotlin.jvm.internal.k.d(string2, "getString(...)"); AbstractC0372g.t(gestisciAbbonamentiTextview, string2, new C0172h(this, 1)); TextView privacyPolicyTextview = g().i; kotlin.jvm.internal.k.d(privacyPolicyTextview, "privacyPolicyTextview"); String string3 = getString(R.string.butils_privacy_policy); kotlin.jvm.internal.k.d(string3, "getString(...)"); AbstractC0372g.t(privacyPolicyTextview, string3, new C0172h(this, 2)); TextView termsTextview = g().o; kotlin.jvm.internal.k.d(termsTextview, "termsTextview"); String string4 = getString(R.string.butils_termini_servizio); kotlin.jvm.internal.k.d(string4, "getString(...)"); AbstractC0372g.t(termsTextview, string4, new C0172h(this, 3)); TextView autorenewTermsTextview = g().f1583b; kotlin.jvm.internal.k.d(autorenewTermsTextview, "autorenewTermsTextview"); String string5 = getString(R.string.butils_temini_servizio_rinnovo_automatico); kotlin.jvm.internal.k.d(string5, "getString(...)"); AbstractC0372g.t(autorenewTermsTextview, string5, new C0172h(this, 4)); TextView cancelSubscriptionTextview = g().f1585d; kotlin.jvm.internal.k.d(cancelSubscriptionTextview, "cancelSubscriptionTextview"); String string6 = getString(R.string.butils_come_annullare_abbonamenti); kotlin.jvm.internal.k.d(string6, "getString(...)"); AbstractC0372g.t(cancelSubscriptionTextview, string6, new C0172h(this, 5)); ListenerConversionsKt.getCustomerInfoWith(Purchases.Companion.getSharedInstance(), new C0167c(this, 0), new C0169e(this)); return; } } } } } } } } } } } } } } } } } } throw new NullPointerException("Missing required view with ID: ".concat(inflate.getResources().getResourceName(i4))); } }