正在查看: Perplexity v2.48.1 应用的 AppConfig.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Perplexity v2.48.1 应用的 AppConfig.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.revenuecat.purchases.common;
import android.content.Context;
import com.mapbox.common.location.e;
import com.revenuecat.purchases.DangerousSettings;
import com.revenuecat.purchases.PurchasesAreCompletedBy;
import com.revenuecat.purchases.PurchasesAreCompletedByKt;
import com.revenuecat.purchases.Store;
import java.net.URL;
import java.util.Locale;
import java.util.concurrent.atomic.AtomicBoolean;
import kotlin.Metadata;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
@Metadata(d1 = {"\u0000P\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0016\n\u0002\u0010\u000e\n\u0002\b\u0012\n\u0002\u0010\b\n\u0002\b\u0003\b\u0000\u0018\u0000 B2\u00020\u0001:\u0001BBg\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005\u0012\u0006\u0010\u0006\u001a\u00020\u0007\u0012\u0006\u0010\b\u001a\u00020\t\u0012\b\u0010\n\u001a\u0004\u0018\u00010\u000b\u0012\u0006\u0010\f\u001a\u00020\r\u0012\u0006\u0010\u000e\u001a\u00020\u0007\u0012\b\b\u0002\u0010\u000f\u001a\u00020\u0010\u0012\b\b\u0002\u0010\u0011\u001a\u00020\u0007\u0012\b\b\u0002\u0010\u0012\u001a\u00020\u0007\u0012\b\b\u0002\u0010\u0013\u001a\u00020\u0007¢\u0006\u0002\u0010\u0014J\u0013\u0010=\u001a\u00020\u00072\b\u0010>\u001a\u0004\u0018\u00010\u0001H\u0096\u0002J\b\u0010?\u001a\u00020@H\u0016J\b\u0010A\u001a\u00020-H\u0016R\u000e\u0010\u0015\u001a\u00020\u0016X\u0082\u0004¢\u0006\u0002\n\u0000R\u0011\u0010\u0017\u001a\u00020\u000b¢\u0006\b\n\u0000\u001a\u0004\b\u0018\u0010\u0019R\u0011\u0010\u001a\u001a\u00020\u00078F¢\u0006\u0006\u001a\u0004\b\u001b\u0010\u001cR\u0011\u0010\u000f\u001a\u00020\u0010¢\u0006\b\n\u0000\u001a\u0004\b\u001d\u0010\u001eR\u0014\u0010\u001f\u001a\u00020\u0007X\u0086D¢\u0006\b\n\u0000\u001a\u0004\b \u0010\u001cR\u001a\u0010!\u001a\u00020\u0007X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\"\u0010\u001c\"\u0004\b#\u0010$R\u001c\u0010\u0012\u001a\u00020\u00078FX\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b%\u0010\u001c\"\u0004\b&\u0010$R\u001c\u0010\u0013\u001a\u00020\u00078FX\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b'\u0010\u001c\"\u0004\b(\u0010$R$\u0010*\u001a\u00020\u00072\u0006\u0010)\u001a\u00020\u00078F@FX\u0086\u000e¢\u0006\f\u001a\u0004\b*\u0010\u001c\"\u0004\b+\u0010$R\u0011\u0010\u000e\u001a\u00020\u0007¢\u0006\b\n\u0000\u001a\u0004\b\u000e\u0010\u001cR\u0011\u0010,\u001a\u00020-¢\u0006\b\n\u0000\u001a\u0004\b.\u0010/R\u0011\u00100\u001a\u00020-¢\u0006\b\n\u0000\u001a\u0004\b1\u0010/R\u0011\u0010\b\u001a\u00020\t¢\u0006\b\n\u0000\u001a\u0004\b2\u00103R\u0013\u00104\u001a\u0004\u0018\u00010-¢\u0006\b\n\u0000\u001a\u0004\b5\u0010/R\u0013\u00106\u001a\u0004\u0018\u00010-¢\u0006\b\n\u0000\u001a\u0004\b7\u0010/R\u000e\u0010\u0011\u001a\u00020\u0007X\u0082\u0004¢\u0006\u0002\n\u0000R\u0011\u0010\u0006\u001a\u00020\u0007¢\u0006\b\n\u0000\u001a\u0004\b8\u0010\u001cR\u0011\u0010\f\u001a\u00020\r¢\u0006\b\n\u0000\u001a\u0004\b9\u0010:R\u0011\u0010;\u001a\u00020-¢\u0006\b\n\u0000\u001a\u0004\b<\u0010/¨\u0006C"}, d2 = {"Lcom/revenuecat/purchases/common/AppConfig;", "", "context", "Landroid/content/Context;", "purchasesAreCompletedBy", "Lcom/revenuecat/purchases/PurchasesAreCompletedBy;", "showInAppMessagesAutomatically", "", "platformInfo", "Lcom/revenuecat/purchases/common/PlatformInfo;", "proxyURL", "Ljava/net/URL;", "store", "Lcom/revenuecat/purchases/Store;", "isDebugBuild", "dangerousSettings", "Lcom/revenuecat/purchases/DangerousSettings;", "runningTests", "forceServerErrors", "forceSigningErrors", "(Landroid/content/Context;Lcom/revenuecat/purchases/PurchasesAreCompletedBy;ZLcom/revenuecat/purchases/common/PlatformInfo;Ljava/net/URL;Lcom/revenuecat/purchases/Store;ZLcom/revenuecat/purchases/DangerousSettings;ZZZ)V", "_isAppBackgrounded", "Ljava/util/concurrent/atomic/AtomicBoolean;", "baseURL", "getBaseURL", "()Ljava/net/URL;", "customEntitlementComputation", "getCustomEntitlementComputation", "()Z", "getDangerousSettings", "()Lcom/revenuecat/purchases/DangerousSettings;", "enableOfflineEntitlements", "getEnableOfflineEntitlements", "finishTransactions", "getFinishTransactions", "setFinishTransactions", "(Z)V", "getForceServerErrors", "setForceServerErrors", "getForceSigningErrors", "setForceSigningErrors", "value", "isAppBackgrounded", "setAppBackgrounded", "languageTag", "", "getLanguageTag", "()Ljava/lang/String;", "packageName", "getPackageName", "getPlatformInfo", "()Lcom/revenuecat/purchases/common/PlatformInfo;", "playServicesVersionName", "getPlayServicesVersionName", "playStoreVersionName", "getPlayStoreVersionName", "getShowInAppMessagesAutomatically", "getStore", "()Lcom/revenuecat/purchases/Store;", "versionName", "getVersionName", "equals", "other", "hashCode", "", "toString", "Companion", "purchases_defaultsRelease"}, k = 1, mv = {1, 8, 0}, xi = 48)
public final class AppConfig {
public static final Companion INSTANCE = new Companion(null);
private static final URL diagnosticsURL = new URL("https://api-diagnostics.revenuecat.com/");
private static final URL paywallEventsURL = new URL("https://api-paywalls.revenuecat.com/");
private final AtomicBoolean _isAppBackgrounded;
private final URL baseURL;
private final DangerousSettings dangerousSettings;
private final boolean enableOfflineEntitlements;
private boolean finishTransactions;
private boolean forceServerErrors;
private boolean forceSigningErrors;
private final boolean isDebugBuild;
private final String languageTag;
private final String packageName;
private final PlatformInfo platformInfo;
private final String playServicesVersionName;
private final String playStoreVersionName;
private final boolean runningTests;
private final boolean showInAppMessagesAutomatically;
private final Store store;
private final String versionName;
@Metadata(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002R\u0011\u0010\u0003\u001a\u00020\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0005\u0010\u0006R\u0011\u0010\u0007\u001a\u00020\u0004¢\u0006\b\n\u0000\u001a\u0004\b\b\u0010\u0006¨\u0006\t"}, d2 = {"Lcom/revenuecat/purchases/common/AppConfig$Companion;", "", "()V", "diagnosticsURL", "Ljava/net/URL;", "getDiagnosticsURL", "()Ljava/net/URL;", "paywallEventsURL", "getPaywallEventsURL", "purchases_defaultsRelease"}, k = 1, mv = {1, 8, 0}, xi = 48)
public static final class Companion {
public Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final URL getDiagnosticsURL() {
return AppConfig.diagnosticsURL;
}
public final URL getPaywallEventsURL() {
return AppConfig.paywallEventsURL;
}
private Companion() {
}
}
public AppConfig(Context context, PurchasesAreCompletedBy purchasesAreCompletedBy, boolean z, PlatformInfo platformInfo, URL url, Store store, boolean z2, DangerousSettings dangerousSettings, boolean z3, boolean z4, boolean z5) {
Intrinsics.h(context, "context");
Intrinsics.h(purchasesAreCompletedBy, "purchasesAreCompletedBy");
Intrinsics.h(platformInfo, "platformInfo");
Intrinsics.h(store, "store");
Intrinsics.h(dangerousSettings, "dangerousSettings");
this.showInAppMessagesAutomatically = z;
this.platformInfo = platformInfo;
this.store = store;
this.isDebugBuild = z2;
this.dangerousSettings = dangerousSettings;
this.runningTests = z3;
this.forceServerErrors = z4;
this.forceSigningErrors = z5;
this._isAppBackgrounded = new AtomicBoolean(true);
this.enableOfflineEntitlements = true;
Locale locale = UtilsKt.getLocale(context);
String languageTag = locale != null ? locale.toLanguageTag() : null;
this.languageTag = languageTag == null ? "" : languageTag;
String versionName = UtilsKt.getVersionName(context);
this.versionName = versionName != null ? versionName : "";
String packageName = context.getPackageName();
Intrinsics.g(packageName, "context.packageName");
this.packageName = packageName;
this.finishTransactions = PurchasesAreCompletedByKt.getFinishTransactions(purchasesAreCompletedBy);
if (url != null) {
LogWrapperKt.log(LogIntent.INFO, "Purchases is being configured using a proxy for RevenueCat");
} else {
url = new URL("https://api.revenuecat.com/");
}
this.baseURL = url;
this.playStoreVersionName = UtilsKt.getPlayStoreVersionName(context);
this.playServicesVersionName = UtilsKt.getPlayServicesVersionName(context);
}
public boolean equals(Object other) {
if (this == other) {
return true;
}
if (!AppConfig.class.equals(other != null ? other.getClass() : null)) {
return false;
}
Intrinsics.f(other, "null cannot be cast to non-null type com.revenuecat.purchases.common.AppConfig");
AppConfig appConfig = (AppConfig) other;
return Intrinsics.c(this.platformInfo, appConfig.platformInfo) && this.store == appConfig.store && this.isDebugBuild == appConfig.isDebugBuild && Intrinsics.c(this.dangerousSettings, appConfig.dangerousSettings) && Intrinsics.c(this.languageTag, appConfig.languageTag) && Intrinsics.c(this.versionName, appConfig.versionName) && Intrinsics.c(this.packageName, appConfig.packageName) && this.finishTransactions == appConfig.finishTransactions && getForceServerErrors() == appConfig.getForceServerErrors() && getForceSigningErrors() == appConfig.getForceSigningErrors() && Intrinsics.c(this.baseURL, appConfig.baseURL) && this.showInAppMessagesAutomatically == appConfig.showInAppMessagesAutomatically && isAppBackgrounded() == appConfig.isAppBackgrounded();
}
public final URL getBaseURL() {
return this.baseURL;
}
public final boolean getCustomEntitlementComputation() {
return this.dangerousSettings.getCustomEntitlementComputation$purchases_defaultsRelease();
}
public final DangerousSettings getDangerousSettings() {
return this.dangerousSettings;
}
public final boolean getEnableOfflineEntitlements() {
return this.enableOfflineEntitlements;
}
public final boolean getFinishTransactions() {
return this.finishTransactions;
}
public final boolean getForceServerErrors() {
return this.runningTests && this.forceServerErrors;
}
public final boolean getForceSigningErrors() {
return this.runningTests && this.forceSigningErrors;
}
public final String getLanguageTag() {
return this.languageTag;
}
public final String getPackageName() {
return this.packageName;
}
public final PlatformInfo getPlatformInfo() {
return this.platformInfo;
}
public final String getPlayServicesVersionName() {
return this.playServicesVersionName;
}
public final String getPlayStoreVersionName() {
return this.playStoreVersionName;
}
public final boolean getShowInAppMessagesAutomatically() {
return this.showInAppMessagesAutomatically;
}
public final Store getStore() {
return this.store;
}
public final String getVersionName() {
return this.versionName;
}
public int hashCode() {
return Boolean.hashCode(isAppBackgrounded()) + e.d((this.baseURL.hashCode() + ((Boolean.hashCode(getForceSigningErrors()) + ((Boolean.hashCode(getForceServerErrors()) + e.d(e.e(e.e(e.e((this.dangerousSettings.hashCode() + e.d((this.store.hashCode() + (this.platformInfo.hashCode() * 31)) * 31, 31, this.isDebugBuild)) * 31, this.languageTag, 31), this.versionName, 31), this.packageName, 31), 31, this.finishTransactions)) * 31)) * 31)) * 31, 31, this.showInAppMessagesAutomatically);
}
public final boolean isAppBackgrounded() {
return this._isAppBackgrounded.get();
}
public final boolean getIsDebugBuild() {
return this.isDebugBuild;
}
public final void setAppBackgrounded(boolean z) {
this._isAppBackgrounded.set(z);
}
public final void setFinishTransactions(boolean z) {
this.finishTransactions = z;
}
public final void setForceServerErrors(boolean z) {
this.forceServerErrors = z;
}
public final void setForceSigningErrors(boolean z) {
this.forceSigningErrors = z;
}
public String toString() {
return "AppConfig(platformInfo=" + this.platformInfo + ", store=" + this.store + ", isDebugBuild=" + this.isDebugBuild + ", dangerousSettings=" + this.dangerousSettings + ", languageTag='" + this.languageTag + "', versionName='" + this.versionName + "', packageName='" + this.packageName + "', finishTransactions=" + this.finishTransactions + ", showInAppMessagesAutomatically=" + this.showInAppMessagesAutomatically + ", baseURL=" + this.baseURL + ')';
}
public AppConfig(Context context, PurchasesAreCompletedBy purchasesAreCompletedBy, boolean z, PlatformInfo platformInfo, URL url, Store store, boolean z2, DangerousSettings dangerousSettings, boolean z3, boolean z4, boolean z5, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(context, purchasesAreCompletedBy, z, platformInfo, url, store, z2, (i & 128) != 0 ? new DangerousSettings(true) : dangerousSettings, (i & 256) != 0 ? false : z3, (i & 512) != 0 ? false : z4, (i & 1024) != 0 ? false : z5);
}
}