Picsart v24.6版本的 MD5 值为:21a61631d94e54da68d2ad9268b8b9d9
以下内容为反编译后的 PAanalytics.java 源代码,内容仅作参考
package com.picsart.analytics;
import android.app.Activity;
import android.content.Context;
import android.net.Uri;
import androidx.annotation.NonNull;
import com.appsflyer.internal.c;
import com.google.gson.Gson;
import com.picsart.analytics.PAanalyticsInstance;
import com.picsart.analytics.data.Attribute;
import com.picsart.analytics.data.NetRequest;
import com.picsart.analytics.event.AnalyticsEvent;
import com.picsart.analytics.services.f;
import com.picsart.analytics.signature.RequestBodySigner;
import com.picsart.analytics.util.DefaultGsonBuilder;
import java.lang.ref.WeakReference;
import java.lang.reflect.Type;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Queue;
import java.util.Set;
import kotlin.Pair;
import kotlin.collections.EmptyList;
import kotlin.jvm.internal.Intrinsics;
import myobfuscated.a3.a;
import myobfuscated.b02.b;
import myobfuscated.jy.d;
import myobfuscated.ot.e;
import myobfuscated.ot.g;
import myobfuscated.w1.o;
import myobfuscated.xx.j;
public enum PAanalytics {
INSTANCE;
public static final String FIRST_TIME_INSTALL = "first_time_install";
public static final String INCREMENTAL_ATTRIBUTE_TYPE = "$inc";
public static final String OVERWRITE_ATTRIBUTE_TYPE = "$overwrite";
public static final String PREFERENCE_KEY_ANALYTICS_DEBUG_MODE_ENABLED = "analytics_debug_mode_enabled";
public static final String PREFERENCE_KEY_ANALYTICS_ENABLED = "analytics_enabled";
public static final String PREFERENCE_KEY_ANALYTICS_SETTINGS_URL = "analytics_settings_url";
public static final String PREFERENCE_KEY_ATTRIBUTE_LOGGING_ENABLED = "attribute_logging_enabled";
public static final String PREFERENCE_KEY_DIRECT_SEND_MODE = "direct_send_mode";
public static final String PREFERENCE_KEY_LOCKED = "locked";
public static final String PREFERENCE_KEY_NETWORK_MONITORING_DEBUG_MODE = "network_monitoring_debug_mode";
public static final String PREFERENCE_KEY_NETWORK_MONITORING_ENABLED = "network_monitoriRng_enabled";
public static final String PREFERENCE_KEY_TRACKABLE_EXPERIMENTS_LIST = "trackable_experiments_list";
public static final String PREFERENCE_KEY_USER_ID = "user_id";
private Context context = null;
protected PAanalyticsInstance instance = null;
@NonNull
protected final PAanalyticsInstance.a instanceBuilder;
PAanalytics(@NonNull PAanalyticsInstance.a aVar) {
this.instanceBuilder = aVar;
}
public static Uri getReferrer(Activity activity) {
int i = a.a;
return a.c.a(activity);
}
public final void a(String str, String str2) {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
PAanalyticsInstance.a aVar = this.instanceBuilder;
new Pair(str, str2);
aVar.getClass();
return;
}
com.picsart.analytics.services.a aVar2 = pAanalyticsInstance.c.e;
aVar2.getClass();
aVar2.e = RequestBodySigner.Companion.a(str, str2);
}
public boolean containsSetting(@NonNull String key) {
g a2;
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
return false;
}
pAanalyticsInstance.getClass();
Intrinsics.checkNotNullParameter(key, "key");
j jVar = pAanalyticsInstance.k;
return (jVar == null || (a2 = jVar.a()) == null || !a2.a.containsKey(key)) ? false : true;
}
public void defineInstallState() {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance != null) {
pAanalyticsInstance.b();
}
}
public void flushEvents() {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null || !pAanalyticsInstance.k()) {
return;
}
pAanalyticsInstance.d.e.c(true);
}
public void flushNetRequest() {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null || !pAanalyticsInstance.k()) {
return;
}
pAanalyticsInstance.d.h.b(true);
}
public void forceDisable() {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
this.instanceBuilder.l = true;
return;
}
pAanalyticsInstance.C = true;
d.b.execute(new o(pAanalyticsInstance, 28));
}
@NonNull
public Queue<String> getActivityHistory() {
PAanalyticsInstance pAanalyticsInstance = this.instance;
return pAanalyticsInstance == null ? new LinkedList() : pAanalyticsInstance.w;
}
public String getAnalyticsEndpoint() {
PAanalyticsInstance pAanalyticsInstance = this.instance;
return pAanalyticsInstance == null ? "" : pAanalyticsInstance.p.z();
}
public String getAnalyticsSettingsUrl() {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
return null;
}
String string = pAanalyticsInstance.i().getString(PREFERENCE_KEY_ANALYTICS_SETTINGS_URL, "https://settings.picsart.com/api/settings");
Intrinsics.e(string);
return string;
}
public String getBuildFlavor() {
PAanalyticsInstance pAanalyticsInstance = this.instance;
return pAanalyticsInstance == null ? "" : pAanalyticsInstance.x;
}
public Context getContext() {
PAanalyticsInstance pAanalyticsInstance = this.instance;
return pAanalyticsInstance == null ? this.context : pAanalyticsInstance.a;
}
public String getCountryCode() {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
return null;
}
return pAanalyticsInstance.b.l;
}
public String getCurrentSessionId() {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
return null;
}
String c = pAanalyticsInstance.b.a.c();
Intrinsics.checkNotNullExpressionValue(c, "pAanalyticsService.sessionId");
return c;
}
@NonNull
public String getDeviceId() {
PAanalyticsInstance pAanalyticsInstance = this.instance;
return pAanalyticsInstance == null ? "" : pAanalyticsInstance.u.b();
}
public String getExperimentVariant(String str) {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance != null && pAanalyticsInstance.k()) {
if (pAanalyticsInstance.H.isEmpty()) {
pAanalyticsInstance.j(pAanalyticsInstance.e());
}
myobfuscated.sw.d dVar = (myobfuscated.sw.d) pAanalyticsInstance.H.get(str);
if (dVar != null) {
return dVar.d();
}
return null;
}
return null;
}
@NonNull
public List<myobfuscated.sw.d> getExperiments() {
PAanalyticsInstance pAanalyticsInstance = this.instance;
return pAanalyticsInstance == null ? Collections.emptyList() : pAanalyticsInstance.e();
}
@NonNull
public String getExperimentsForHeaders() {
j jVar;
List<myobfuscated.sw.d> f;
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null || (jVar = pAanalyticsInstance.k) == null) {
return "";
}
String l = jVar.l();
if (pAanalyticsInstance.J.length() == 0 && (f = pAanalyticsInstance.f()) != null) {
StringBuilder sb = new StringBuilder();
int size = f.size();
for (int i = 0; i < size; i++) {
myobfuscated.sw.d dVar = f.get(i);
sb.append(dVar.b());
sb.append(":");
sb.append(dVar.d());
if (i != f.size() - 1) {
sb.append(",");
}
}
String sb2 = sb.toString();
Intrinsics.checkNotNullExpressionValue(sb2, "stringBuilder.toString()");
pAanalyticsInstance.J = sb2;
}
String str = pAanalyticsInstance.J;
if (pAanalyticsInstance.y) {
return (l.length() <= 0 || str.length() <= 0) ? c.n(l, str) : b.n(l, ",", str);
}
return l;
}
public List<myobfuscated.sw.d> getInvolvedExperiments() {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
return null;
}
return pAanalyticsInstance.f();
}
public int getInvolvedExperimentsCount() {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
return 0;
}
if (pAanalyticsInstance.H.isEmpty()) {
pAanalyticsInstance.j(pAanalyticsInstance.e());
}
return pAanalyticsInstance.H.size();
}
@Deprecated
public Activity getLastActivity() {
WeakReference<Activity> weakReference;
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null || (weakReference = pAanalyticsInstance.K) == null) {
return null;
}
return weakReference.get();
}
@Deprecated
public String getLastActivityName() {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
return null;
}
return pAanalyticsInstance.L;
}
public String getMarket() {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
return null;
}
return pAanalyticsInstance.g.c();
}
public String getNetworkMonitoringEndpoint() {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
return "";
}
String string = pAanalyticsInstance.i().getString("analytics_net_url", "https://analytics.picsart.com/requests");
Intrinsics.e(string);
return string;
}
@NonNull
public List<String> getSegments() {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
return Collections.emptyList();
}
j jVar = pAanalyticsInstance.k;
return jVar == null ? EmptyList.INSTANCE : jVar.e();
}
@NonNull
public String getSegmentsForHeaders() {
j jVar;
PAanalyticsInstance pAanalyticsInstance = this.instance;
return (pAanalyticsInstance == null || (jVar = pAanalyticsInstance.k) == null) ? "" : jVar.o();
}
@NonNull
@Deprecated
public String getSegmentsForHeaders(Context context) {
j jVar;
PAanalyticsInstance pAanalyticsInstance = this.instance;
return (pAanalyticsInstance == null || (jVar = pAanalyticsInstance.k) == null) ? "" : jVar.o();
}
public long getSendingEventsCount() {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
return 0L;
}
return pAanalyticsInstance.s.invoke().longValue();
}
public long getSessionTimeout() {
j jVar;
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null || (jVar = pAanalyticsInstance.k) == null) {
return -1L;
}
return jVar.r();
}
public <T> T getSetting(@NonNull String str, @NonNull Class<T> cls, T t) {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
return null;
}
return (T) pAanalyticsInstance.g(str, cls, t);
}
public <T> T getSetting(@NonNull String key, @NonNull Type type, T t) {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
return null;
}
pAanalyticsInstance.getClass();
Intrinsics.checkNotNullParameter(key, "key");
Intrinsics.checkNotNullParameter(type, "type");
try {
T t2 = (T) pAanalyticsInstance.F.fromJson(pAanalyticsInstance.h(key), type);
return t2 != null ? t2 : t;
} catch (Exception e) {
pAanalyticsInstance.n(key, type.toString(), t, e);
return t;
}
}
public String getSetting(@NonNull String str, String str2) {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
return null;
}
return (String) pAanalyticsInstance.g(str, String.class, str2);
}
public String getSettingAsJsonString(@NonNull String key, String str) {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
return null;
}
pAanalyticsInstance.getClass();
Intrinsics.checkNotNullParameter(key, "key");
try {
e h = pAanalyticsInstance.h(key);
return h != null ? h.toString() : str;
} catch (Exception e) {
String cls = String.class.toString();
Intrinsics.checkNotNullExpressionValue(cls, "String::class.java.toString()");
pAanalyticsInstance.n(key, cls, str, e);
return str;
}
}
public boolean getSettingBoolean(@NonNull String str, boolean z) {
PAanalyticsInstance pAanalyticsInstance = this.instance;
return pAanalyticsInstance == null ? z : ((Boolean) pAanalyticsInstance.g(str, Boolean.class, Boolean.valueOf(z))).booleanValue();
}
public int getSettingInt(@NonNull String str, int i) {
PAanalyticsInstance pAanalyticsInstance = this.instance;
return pAanalyticsInstance == null ? i : ((Integer) pAanalyticsInstance.g(str, Integer.class, Integer.valueOf(i))).intValue();
}
public long getSettingLong(@NonNull String str, long j) {
PAanalyticsInstance pAanalyticsInstance = this.instance;
return pAanalyticsInstance == null ? j : ((Long) pAanalyticsInstance.g(str, Long.class, Long.valueOf(j))).longValue();
}
@NonNull
public String getSettingsAsString() {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
return "";
}
j jVar = pAanalyticsInstance.k;
g a2 = jVar != null ? jVar.a() : null;
Gson create = DefaultGsonBuilder.a().newBuilder().setPrettyPrinting().create();
Intrinsics.checkNotNullExpressionValue(create, "_defaultGson.newBuilder(…PrettyPrinting().create()");
String json = create.toJson((e) a2);
return json == null ? "" : json;
}
@NonNull
@Deprecated
public String getSubscriptionStatus() {
return "";
}
public List<myobfuscated.sw.d> getTrackableExperiments() {
List list;
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
return null;
}
List<myobfuscated.sw.d> list2 = pAanalyticsInstance.I;
if (list2 == null || list2.isEmpty()) {
pAanalyticsInstance.s();
}
if (pAanalyticsInstance.y) {
List<myobfuscated.sw.d> f = pAanalyticsInstance.f();
if (f != null) {
List<myobfuscated.sw.d> list3 = f;
Iterable iterable = pAanalyticsInstance.I;
if (iterable == null) {
iterable = EmptyList.INSTANCE;
}
list = kotlin.collections.c.g0(iterable, list3);
} else {
list = pAanalyticsInstance.I;
}
if (list != null) {
return myobfuscated.lo2.d.w(list);
}
return null;
}
return pAanalyticsInstance.I;
}
public long getUserId() {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
return -1L;
}
return pAanalyticsInstance.n.z().longValue();
}
public void init(myobfuscated.sw.a aVar) {
PAanalyticsExtensionKt.a(this, aVar, null);
}
public boolean isAnalyticsDebugMode() {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
return false;
}
return pAanalyticsInstance.i().getBoolean(PREFERENCE_KEY_ANALYTICS_DEBUG_MODE_ENABLED, false);
}
public boolean isAnalyticsEnabled() {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
return false;
}
return pAanalyticsInstance.o.z().booleanValue();
}
public boolean isAttributeLoggingEnabled() {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
return false;
}
return pAanalyticsInstance.r.z().booleanValue();
}
public boolean isDirectSendMode() {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
return false;
}
return pAanalyticsInstance.t.invoke().booleanValue();
}
public boolean isExperimentOriginalVariant(String str) {
if (this.instance == null) {
return false;
}
return str == null || Intrinsics.c("original", str);
}
public boolean isFreshInstall() {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
return true;
}
pAanalyticsInstance.getClass();
return false;
}
public boolean isNetworkMonitoringDebugMode() {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
return false;
}
return pAanalyticsInstance.i().getBoolean(PREFERENCE_KEY_NETWORK_MONITORING_DEBUG_MODE, false);
}
public boolean isNetworkMonitoringEnabled() {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
return false;
}
return pAanalyticsInstance.q.z().booleanValue();
}
public boolean isPrivacyAndPolicyAccepted() {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
return false;
}
return pAanalyticsInstance.z;
}
public boolean isSettingsEmpty() {
g a2;
Set<Map.Entry<String, e>> entrySet;
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
return true;
}
j jVar = pAanalyticsInstance.k;
boolean z = false;
if (jVar != null && (a2 = jVar.a()) != null && (entrySet = a2.a.entrySet()) != null && (!entrySet.isEmpty())) {
z = true;
}
return !z;
}
public void logAttribute(Attribute attribute) {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance != null) {
pAanalyticsInstance.getClass();
Intrinsics.checkNotNullParameter(attribute, "attribute");
if (pAanalyticsInstance.k()) {
pAanalyticsInstance.f.b(attribute);
}
}
}
public void logAttributeIfNeeded(Attribute attribute) {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance != null) {
pAanalyticsInstance.getClass();
Intrinsics.checkNotNullParameter(attribute, "attribute");
if (pAanalyticsInstance.k()) {
pAanalyticsInstance.f.e(attribute);
}
}
}
public void logEvent(AnalyticsEvent analyticsEvent) {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance != null) {
pAanalyticsInstance.l(analyticsEvent);
}
}
public void logRequest(NetRequest request) {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance != null) {
pAanalyticsInstance.getClass();
Intrinsics.checkNotNullParameter(request, "request");
if (pAanalyticsInstance.k()) {
pAanalyticsInstance.f.a(request);
}
}
}
public void logTimedEvent(AnalyticsEvent event, Long l) {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance != null) {
long longValue = l.longValue();
pAanalyticsInstance.getClass();
Intrinsics.checkNotNullParameter(event, "event");
event.c = longValue;
Intrinsics.checkNotNullExpressionValue(event, "event.setDuration(time)");
pAanalyticsInstance.l(event);
}
}
public synchronized void registerSessionChangeListener(myobfuscated.sw.j jVar) {
try {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
this.instanceBuilder.c.add(jVar);
} else {
pAanalyticsInstance.m(jVar);
}
} catch (Throwable th) {
throw th;
}
}
public synchronized void removeSessionChangeListener(@NonNull myobfuscated.sw.j jVar) {
try {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
this.instanceBuilder.c.remove(jVar);
} else {
pAanalyticsInstance.m(jVar);
}
} catch (Throwable th) {
throw th;
}
}
@Deprecated
public void retrieveAndroidIdAndImei() {
}
public void runExperiment(@NonNull String experimentName, Runnable runnable, @NonNull Map<String, Runnable> variantsActionMap) {
myobfuscated.sw.d dVar;
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance != null) {
Intrinsics.checkNotNullParameter(experimentName, "experimentName");
Intrinsics.checkNotNullParameter(variantsActionMap, "variantsActionMap");
if (!pAanalyticsInstance.k()) {
myobfuscated.jy.e.j("PAanalytics isn't initialized, running original action", "PAanalytics");
if (runnable != null) {
runnable.run();
return;
}
return;
}
String str = null;
if (pAanalyticsInstance.k()) {
if (pAanalyticsInstance.H.isEmpty()) {
pAanalyticsInstance.j(pAanalyticsInstance.e());
}
myobfuscated.sw.d dVar2 = (myobfuscated.sw.d) pAanalyticsInstance.H.get(experimentName);
if (dVar2 != null) {
str = dVar2.d();
}
}
if (str != null && (dVar = (myobfuscated.sw.d) pAanalyticsInstance.H.get(experimentName)) != null) {
pAanalyticsInstance.r(dVar);
}
if (str == null || Intrinsics.c("original", str)) {
if (runnable != null) {
runnable.run();
}
} else if (variantsActionMap.containsKey(str)) {
Runnable runnable2 = variantsActionMap.get(str);
if (runnable2 != null) {
runnable2.run();
}
} else {
myobfuscated.jy.e.j("VariantsActionMap doesn't contain action for variant: " + str, "PAanalytics");
if (runnable != null) {
runnable.run();
}
}
}
}
public void setAnalyticsDebugMode(boolean z) {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
this.instanceBuilder.u = z;
return;
}
pAanalyticsInstance.i().edit().putBoolean(PREFERENCE_KEY_ANALYTICS_DEBUG_MODE_ENABLED, z).apply();
myobfuscated.jy.e.a = z;
}
@Deprecated
public void setAnalyticsDebugMode(boolean z, boolean z2) {
setAnalyticsDebugMode(z);
}
public void setAnalyticsEnabled(boolean z, boolean z2) {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
this.instanceBuilder.v = z;
} else {
pAanalyticsInstance.o(z, z2);
}
}
public void setAnalyticsEndpoint(@NonNull String url) {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
this.instanceBuilder.n = url;
return;
}
Intrinsics.checkNotNullParameter(url, "url");
pAanalyticsInstance.p.M(url);
}
public void setAnalyticsSettingsUrl(String url, boolean z) {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
this.instanceBuilder.b = url;
return;
}
Intrinsics.checkNotNullParameter(url, "url");
pAanalyticsInstance.i().edit().putString(PREFERENCE_KEY_ANALYTICS_SETTINGS_URL, url).apply();
}
public void setAttributeLoggingEnabled(boolean z) {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
this.instanceBuilder.o = z;
} else {
pAanalyticsInstance.r.M(Boolean.valueOf(z));
}
}
public void setBuildFlavor(String str) {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
this.instanceBuilder.i = str;
return;
}
pAanalyticsInstance.getClass();
Intrinsics.checkNotNullParameter(str, "<set-?>");
pAanalyticsInstance.x = str;
}
public void setContext(Context context) {
if (this.instance == null) {
this.context = context;
}
}
public void setDevSettingsEnabled(boolean z) {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
this.instanceBuilder.t = z;
} else {
pAanalyticsInstance.y = z;
}
}
public void setDirectSendMode(boolean z, boolean z2) {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
this.instanceBuilder.q = z;
} else if (pAanalyticsInstance.a(z2)) {
} else {
pAanalyticsInstance.t.M(Boolean.valueOf(z));
}
}
public void setInMemorySettingsService(j jVar) {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
this.instanceBuilder.g = jVar;
} else {
pAanalyticsInstance.k = jVar;
}
}
public void setInvolvedExperiments(@NonNull List<myobfuscated.sw.d> list, boolean z) {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
this.instanceBuilder.p = list;
} else {
pAanalyticsInstance.p(list, z);
}
}
public void setLastActivityName(@NonNull String name) {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance != null) {
pAanalyticsInstance.getClass();
Intrinsics.checkNotNullParameter(name, "name");
pAanalyticsInstance.L = name;
}
}
public void setMarket(String str) {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
this.instanceBuilder.j = str;
} else {
pAanalyticsInstance.d(str);
}
}
public void setNetworkMonitoringDebugMode(boolean z, boolean z2) {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
this.instanceBuilder.r = z;
} else if (pAanalyticsInstance.a(z2)) {
} else {
pAanalyticsInstance.i().edit().putBoolean(PREFERENCE_KEY_NETWORK_MONITORING_DEBUG_MODE, z).apply();
}
}
public void setNetworkMonitoringEnabled(boolean z, boolean z2) {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
this.instanceBuilder.s = z;
} else {
pAanalyticsInstance.q(z, z2);
}
}
public void setNetworkMonitoringEndpoint(String url) {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
this.instanceBuilder.m = url;
return;
}
Intrinsics.checkNotNullParameter(url, "url");
com.picsart.analytics.services.e.t = url;
pAanalyticsInstance.i().edit().putString("analytics_net_url", url).apply();
}
public void setPrivacyAndPolicyAccepted(boolean z) {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
this.instanceBuilder.f = z;
} else {
pAanalyticsInstance.z = z;
}
}
public void setSendingEventsCount(long j) {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
this.instanceBuilder.e = j;
} else {
pAanalyticsInstance.s.M(Long.valueOf(j));
}
}
public void setSigningKey(String str) {
if (str == null) {
a(null, null);
return;
}
String[] split = str.split(":");
if (split.length != 2) {
throw new IllegalArgumentException("Wrong signing key format: Make sure signing key has %s:%d format");
}
a(split[0], split[1]);
}
@Deprecated
public void setSubscriptionStatus(@NonNull String str) {
}
public void setUserId(Long l) {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
this.instanceBuilder.k = l.longValue();
return;
}
pAanalyticsInstance.n.M(Long.valueOf(l.longValue()));
}
public void setVariantSettings(@NonNull g appendedSettings) {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
this.instanceBuilder.h = appendedSettings;
return;
}
Intrinsics.checkNotNullParameter(appendedSettings, "appendedSettings");
j jVar = pAanalyticsInstance.k;
if (jVar == null) {
return;
}
jVar.h(appendedSettings);
}
public void startPeriodicWorker() {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance != null) {
pAanalyticsInstance.m.a(pAanalyticsInstance.a);
}
}
public void stopPeriodicWorker() {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance != null) {
pAanalyticsInstance.m.b(pAanalyticsInstance.a);
}
}
public synchronized void trackExperimentParticipation(@NonNull myobfuscated.sw.d dVar) {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance != null) {
pAanalyticsInstance.r(dVar);
}
}
public void unlock() {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance != null) {
pAanalyticsInstance.D = Boolean.FALSE;
pAanalyticsInstance.i().edit().putBoolean(PREFERENCE_KEY_LOCKED, false).apply();
}
}
public void updateLocation(boolean z, String str) {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance == null) {
this.instanceBuilder.w = android.util.Pair.create(Boolean.valueOf(z), str);
return;
}
f fVar = pAanalyticsInstance.b;
fVar.e(z);
fVar.l = str;
}
public void updateTrackableExperiments() {
PAanalyticsInstance pAanalyticsInstance = this.instance;
if (pAanalyticsInstance != null) {
pAanalyticsInstance.s();
}
}
}