MD5 校验值:8df004f6dd2453bdf1d8ecd51cca1137
Braze.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。
package com.braze; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.net.Uri; import android.os.Build; import bo.app.d0; import bo.app.d2; import bo.app.e2; import bo.app.g5; import bo.app.i4; import bo.app.i5; import bo.app.j; import bo.app.k4; import bo.app.l0; import bo.app.l1; import bo.app.q4; import bo.app.t3; import bo.app.w6; import bo.app.x1; import bo.app.x6; import bo.app.y3; import bo.app.z; import com.braze.Braze; import com.braze.configuration.BrazeConfig; import com.braze.configuration.BrazeConfigurationProvider; import com.braze.configuration.RuntimeAppConfigurationProvider; import com.braze.coroutine.BrazeCoroutineScope; import com.braze.enums.BrazePushEventType; import com.braze.events.BrazePushEvent; import com.braze.events.ContentCardsUpdatedEvent; import com.braze.events.FeedUpdatedEvent; import com.braze.events.IEventSubscriber; import com.braze.events.IValueCallback; import com.braze.events.InAppMessageEvent; import com.braze.images.DefaultBrazeImageLoader; import com.braze.images.IBrazeImageLoader; import com.braze.models.outgoing.BrazeProperties; import com.braze.models.push.BrazeNotificationPayload; import com.braze.support.BrazeLogger; import com.braze.support.DateTimeUtils; import com.braze.support.PermissionUtils; import com.braze.support.StringUtils; import com.braze.support.ValidationUtils; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import java.util.Locale; import java.util.Set; import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.ReentrantLock; import kotlin.jvm.internal.g0; import vg.k0; import yf.v; import zf.t0; public final class Braze { private static final Set<String> KNOWN_APP_CRAWLER_DEVICE_MODELS; private static final Set<String> NECESSARY_BRAZE_SDK_PERMISSIONS; private static boolean areOutboundNetworkRequestsOffline; private static final BrazeConfig clearConfigSentinel; private static IBrazeNotificationFactory customBrazeNotificationFactory; private static d2 deviceDataProvider; private static IBrazeEndpointProvider endpointProvider; private static final ReentrantLock endpointProviderLock; private static volatile Braze instance; private static final List<BrazeConfig> pendingConfigurations; private static g5 sdkEnablementProvider; private static boolean shouldMockNetworkRequestsAndDropEvents; private Context applicationContext; private BrazeUser brazeUser; public BrazeConfigurationProvider configurationProvider; public e2 deviceIdProvider; private bo.app.i2 externalIEventMessenger; public IBrazeImageLoader imageLoader; private Boolean isApiKeyPresent; private boolean isInstanceStopped; private t3 offlineUserStorageProvider; public k4 pushDeliveryManager; private bo.app.l2 registrationDataProvider; public bo.app.a3 udm; public static final Companion Companion = new Companion(null); private static final ReentrantLock brazeClassLock = new ReentrantLock(); public static final class Companion { public static final class h extends kotlin.jvm.internal.q implements kg.a { public static final h f10895b = new h(); h() { super(0); } @Override public final String invoke() { return "Braze network requests already being mocked. Note that events dispatched in this mode are dropped."; } } public static final class i extends kotlin.jvm.internal.q implements kg.a { public static final i f10896b = new i(); i() { super(0); } @Override public final String invoke() { return "Braze network requests will be mocked. Events dispatchedin this mode will be dropped."; } } public static final class j extends kotlin.jvm.internal.q implements kg.a { public static final j f10897b = new j(); j() { super(0); } @Override public final String invoke() { return "Attempt to enable mocking Braze network requests had no effect since getInstance() has already been called."; } } public static final class m extends kotlin.jvm.internal.q implements kg.a { public static final m f10898b = new m(); m() { super(0); } @Override public final String invoke() { return "Caught exception trying to get a Braze API endpoint from the BrazeEndpointProvider. Using the original URI"; } } public static final class n extends kotlin.jvm.internal.q implements kg.a { public static final n f10899b = new n(); n() { super(0); } @Override public final String invoke() { return "Caught exception while retrieving API key."; } } public static final class o extends kotlin.jvm.internal.q implements kg.a { public static final o f10900b = new o(); o() { super(0); } @Override public final String invoke() { return "SDK enablement provider was null. Returning SDK as enabled."; } } public static final class p extends kotlin.jvm.internal.q implements kg.a { public static final p f10901b = new p(); p() { super(0); } @Override public final String invoke() { return "API key not present. Actions will not be performed on the SDK."; } } public static final class q extends kotlin.jvm.internal.q implements kg.a { public static final q f10902b = new q(); q() { super(0); } @Override public final String invoke() { return "SDK is disabled. Actions will not be performed on the SDK."; } } public static final class r extends kotlin.jvm.internal.q implements kg.a { final boolean f10903b; r(boolean z10) { super(0); this.f10903b = z10; } @Override public final String invoke() { String str; StringBuilder sb2 = new StringBuilder(); sb2.append("Braze SDK outbound network requests are now "); if (this.f10903b) { str = "disabled"; } else { str = "enabled"; } sb2.append(str); return sb2.toString(); } } public static final class s extends kotlin.jvm.internal.q implements kg.a { public static final s f10904b = new s(); s() { super(0); } @Override public final String invoke() { return "Push contained key for fetching test triggers, fetching triggers."; } } public static final class t extends kotlin.jvm.internal.q implements kg.a { public static final t f10905b = new t(); t() { super(0); } @Override public final String invoke() { return "The instance is null. Allowing instance initialization"; } } public static final class u extends kotlin.jvm.internal.q implements kg.a { public static final u f10906b = new u(); u() { super(0); } @Override public final String invoke() { return "The instance was stopped. Allowing instance initialization"; } } public static final class v extends kotlin.jvm.internal.q implements kg.a { public static final v f10907b = new v(); v() { super(0); } @Override public final String invoke() { return "No API key was found previously. Allowing instance initialization"; } } public Companion(kotlin.jvm.internal.h hVar) { this(); } public final g5 getSdkEnablementProvider(Context context) { g5 sdkEnablementProvider$android_sdk_base_release = getSdkEnablementProvider$android_sdk_base_release(); if (sdkEnablementProvider$android_sdk_base_release == null) { g5 g5Var = new g5(context); setSdkEnablementProvider$android_sdk_base_release(g5Var); return g5Var; } return sdkEnablementProvider$android_sdk_base_release; } public static final Uri setConfiguredCustomEndpoint$lambda$12$lambda$11(String str, Uri brazeEndpoint) { boolean t10; boolean t11; kotlin.jvm.internal.p.g(brazeEndpoint, "brazeEndpoint"); Uri parse = Uri.parse(str); String scheme = parse.getScheme(); String encodedAuthority = parse.getEncodedAuthority(); Uri.Builder buildUpon = brazeEndpoint.buildUpon(); if (scheme != null) { t10 = tg.r.t(scheme); if (!t10 && encodedAuthority != null) { t11 = tg.r.t(encodedAuthority); if (!t11) { buildUpon.encodedAuthority(encodedAuthority); buildUpon.scheme(scheme); return buildUpon.build(); } } } return buildUpon.encodedAuthority(str).build(); } private final boolean shouldAllowSingletonInitialization() { Braze braze = Braze.instance; if (braze == null) { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, BrazeLogger.Priority.V, (Throwable) null, t.f10905b, 2, (Object) null); return true; } if (braze.isInstanceStopped) { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, (BrazeLogger.Priority) null, (Throwable) null, u.f10906b, 3, (Object) null); return true; } if (kotlin.jvm.internal.p.b(Boolean.FALSE, braze.isApiKeyPresent$android_sdk_base_release())) { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, (BrazeLogger.Priority) null, (Throwable) null, v.f10907b, 3, (Object) null); return true; } return false; } public final boolean enableMockNetworkRequestsAndDropEventsMode() { if (Braze.instance == null) { ReentrantLock reentrantLock = Braze.brazeClassLock; reentrantLock.lock(); try { if (Braze.instance == null) { if (Braze.shouldMockNetworkRequestsAndDropEvents) { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, Braze.Companion, BrazeLogger.Priority.I, (Throwable) null, h.f10895b, 2, (Object) null); } else { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, Braze.Companion, BrazeLogger.Priority.I, (Throwable) null, i.f10896b, 2, (Object) null); Braze.shouldMockNetworkRequestsAndDropEvents = true; } reentrantLock.unlock(); return true; } yf.v vVar = yf.v.f33976a; reentrantLock.unlock(); } catch (Throwable th) { reentrantLock.unlock(); throw th; } } BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, BrazeLogger.Priority.W, (Throwable) null, j.f10897b, 2, (Object) null); return false; } public final Uri getApiEndpoint(Uri brazeEndpoint) { kotlin.jvm.internal.p.g(brazeEndpoint, "brazeEndpoint"); ReentrantLock reentrantLock = Braze.endpointProviderLock; reentrantLock.lock(); try { IBrazeEndpointProvider iBrazeEndpointProvider = Braze.endpointProvider; if (iBrazeEndpointProvider != null) { try { Uri apiEndpoint = iBrazeEndpointProvider.getApiEndpoint(brazeEndpoint); if (apiEndpoint != null) { return apiEndpoint; } } catch (Exception e10) { BrazeLogger.INSTANCE.brazelog(Braze.Companion, BrazeLogger.Priority.W, e10, m.f10898b); } } return brazeEndpoint; } finally { reentrantLock.unlock(); } } public final String getConfiguredApiKey(BrazeConfigurationProvider configurationProvider) { kotlin.jvm.internal.p.g(configurationProvider, "configurationProvider"); try { return configurationProvider.getBrazeApiKey().toString(); } catch (Exception e10) { BrazeLogger.INSTANCE.brazelog(this, BrazeLogger.Priority.E, e10, n.f10899b); return null; } } public final IBrazeNotificationFactory getCustomBrazeNotificationFactory() { return Braze.customBrazeNotificationFactory; } public final Braze getInstance(Context context) { kotlin.jvm.internal.p.g(context, "context"); if (shouldAllowSingletonInitialization()) { ReentrantLock reentrantLock = Braze.brazeClassLock; reentrantLock.lock(); try { if (Braze.Companion.shouldAllowSingletonInitialization()) { Braze braze = new Braze(context); braze.isInstanceStopped = false; Braze.instance = braze; return braze; } yf.v vVar = yf.v.f33976a; } finally { reentrantLock.unlock(); } } Braze braze2 = Braze.instance; kotlin.jvm.internal.p.e(braze2, "null cannot be cast to non-null type com.braze.Braze"); return braze2; } public final boolean getOutboundNetworkRequestsOffline() { return Braze.areOutboundNetworkRequestsOffline; } public final g5 getSdkEnablementProvider$android_sdk_base_release() { return Braze.sdkEnablementProvider; } public final boolean isDisabled() { g5 sdkEnablementProvider$android_sdk_base_release = getSdkEnablementProvider$android_sdk_base_release(); if (sdkEnablementProvider$android_sdk_base_release != null) { Braze braze = Braze.instance; if (braze != null && kotlin.jvm.internal.p.b(Boolean.FALSE, braze.isApiKeyPresent$android_sdk_base_release())) { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, BrazeLogger.Priority.W, (Throwable) null, p.f10901b, 2, (Object) null); return true; } boolean a10 = sdkEnablementProvider$android_sdk_base_release.a(); if (a10) { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, BrazeLogger.Priority.W, (Throwable) null, q.f10902b, 2, (Object) null); } return a10; } BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, (BrazeLogger.Priority) null, (Throwable) null, o.f10900b, 3, (Object) null); return false; } public final void requestTriggersIfInAppMessageTestPush$android_sdk_base_release(Intent intent, bo.app.z1 brazeManager) { kotlin.jvm.internal.p.g(intent, "intent"); kotlin.jvm.internal.p.g(brazeManager, "brazeManager"); String stringExtra = intent.getStringExtra("ab_push_fetch_test_triggers_key"); if (stringExtra != null && kotlin.jvm.internal.p.b(stringExtra, "true")) { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, BrazeLogger.Priority.I, (Throwable) null, s.f10904b, 2, (Object) null); brazeManager.a(new y3.a(null, null, null, null, 15, null).e()); } } public final void setConfiguredCustomEndpoint$android_sdk_base_release(final String str) { ReentrantLock reentrantLock = Braze.endpointProviderLock; reentrantLock.lock(); try { Braze.Companion.setEndpointProvider(new IBrazeEndpointProvider() { @Override public final Uri getApiEndpoint(Uri uri) { Uri configuredCustomEndpoint$lambda$12$lambda$11; configuredCustomEndpoint$lambda$12$lambda$11 = Braze.Companion.setConfiguredCustomEndpoint$lambda$12$lambda$11(str, uri); return configuredCustomEndpoint$lambda$12$lambda$11; } }); yf.v vVar = yf.v.f33976a; } finally { reentrantLock.unlock(); } } public final void setEndpointProvider(IBrazeEndpointProvider iBrazeEndpointProvider) { ReentrantLock reentrantLock = Braze.endpointProviderLock; reentrantLock.lock(); try { Braze.endpointProvider = iBrazeEndpointProvider; yf.v vVar = yf.v.f33976a; } finally { reentrantLock.unlock(); } } public final void setOutboundNetworkRequestsOffline(boolean z10) { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, BrazeLogger.Priority.I, (Throwable) null, new r(z10), 2, (Object) null); ReentrantLock reentrantLock = Braze.brazeClassLock; reentrantLock.lock(); try { Braze.areOutboundNetworkRequestsOffline = z10; Braze braze = Braze.instance; if (braze != null) { braze.setSyncPolicyOfflineStatus(z10); yf.v vVar = yf.v.f33976a; } } finally { reentrantLock.unlock(); } } public final void setSdkEnablementProvider$android_sdk_base_release(g5 g5Var) { Braze.sdkEnablementProvider = g5Var; } private Companion() { } } static final class a extends kotlin.jvm.internal.q implements kg.a { public static final a f10908b = new a(); a() { super(0); } @Override public final String invoke() { return "Braze SDK Initializing"; } } static final class a1 extends kotlin.jvm.internal.q implements kg.a { a1() { super(0); } public final void a() { x1 a10 = bo.app.j.f9166h.a(); if (a10 != null) { Braze.this.getUdm$android_sdk_base_release().f().a(a10); } } @Override public Object invoke() { a(); return v.f33976a; } } static final class a2 extends kotlin.jvm.internal.q implements kg.a { final InAppMessageEvent f10911c; a2(InAppMessageEvent inAppMessageEvent) { super(0); this.f10911c = inAppMessageEvent; } public final void a() { Braze.this.getUdm$android_sdk_base_release().r().d(this.f10911c.getTriggerAction()); } @Override public Object invoke() { a(); return v.f33976a; } } public static final class a3 extends kotlin.jvm.internal.q implements kg.a { public static final a3 f10912b = new a3(); a3() { super(0); } @Override public final String invoke() { return "Failed to request data flush."; } } static final class b extends kotlin.jvm.internal.q implements kg.a { final String f10913b; b(String str) { super(0); this.f10913b = str; } @Override public final String invoke() { return "Device build model matches a known crawler. Enabling mock network request mode. Device it: " + this.f10913b; } } static final class b2 extends kotlin.jvm.internal.q implements kg.a { public static final b2 f10914b = new b2(); b2() { super(0); } @Override public final String invoke() { return "Failed to refresh feature flags."; } } public static final class b3 extends kotlin.jvm.internal.q implements kg.a { public static final class a extends kotlin.jvm.internal.q implements kg.a { public static final a f10916b = new a(); a() { super(0); } @Override public final String invoke() { return "requestImmediateDataFlush() called"; } } b3() { super(0); } public final void a() { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, Braze.this, BrazeLogger.Priority.V, (Throwable) null, a.f10916b, 2, (Object) null); Braze.this.getUdm$android_sdk_base_release().f().e(); } @Override public Object invoke() { a(); return v.f33976a; } } static final class c extends kotlin.jvm.internal.q implements kg.a { public static final c f10917b = new c(); c() { super(0); } @Override public final String invoke() { return "Failed to perform initial Braze singleton setup."; } } static final class c2 extends kotlin.jvm.internal.q implements kg.a { public static final class a extends kotlin.jvm.internal.q implements kg.a { public static final a f10919b = new a(); a() { super(0); } @Override public final String invoke() { return "Feature flags not enabled. Not refreshing feature flags."; } } c2() { super(0); } public final void a() { if (Braze.this.getUdm$android_sdk_base_release().l().A()) { Braze.this.getUdm$android_sdk_base_release().s().h(); } else { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, Braze.this, BrazeLogger.Priority.I, (Throwable) null, a.f10919b, 2, (Object) null); Braze.this.getUdm$android_sdk_base_release().e().a(new l1(), l1.class); } } @Override public Object invoke() { a(); return v.f33976a; } } static final class d extends kotlin.jvm.internal.q implements kg.a { final Context f10921c; public static final class a extends kotlin.jvm.internal.q implements kg.a { public static final a f10922b = new a(); a() { super(0); } @Override public final String invoke() { return "Failed to startup user dependency manager."; } } public static final class b extends kotlin.jvm.internal.q implements kg.a { public static final b f10923b = new b(); b() { super(0); } @Override public final String invoke() { return "Firebase Cloud Messaging found. Setting up Firebase Cloud Messaging."; } } public static final class c extends kotlin.jvm.internal.q implements kg.a { public static final c f10924b = new c(); c() { super(0); } @Override public final String invoke() { return "Firebase Cloud Messaging requirements not met. Braze will not register for Firebase Cloud Messaging."; } } public static final class C0178d extends kotlin.jvm.internal.q implements kg.a { public static final C0178d f10925b = new C0178d(); C0178d() { super(0); } @Override public final String invoke() { return "Automatic Firebase Cloud Messaging registration not enabled in configuration. Braze will not register for Firebase Cloud Messaging."; } } public static final class e extends kotlin.jvm.internal.q implements kg.a { public static final e f10926b = new e(); e() { super(0); } @Override public final String invoke() { return "Amazon Device Messaging found. Setting up Amazon Device Messaging"; } } public static final class f extends kotlin.jvm.internal.q implements kg.a { public static final f f10927b = new f(); f() { super(0); } @Override public final String invoke() { return "ADM manifest requirements not met. Braze will not register for ADM."; } } public static final class g extends kotlin.jvm.internal.q implements kg.a { public static final g f10928b = new g(); g() { super(0); } @Override public final String invoke() { return "Automatic ADM registration not enabled in configuration. Braze will not register for ADM."; } } public static final class h extends kotlin.jvm.internal.q implements kg.a { public static final h f10929b = new h(); h() { super(0); } @Override public final String invoke() { return "Failed to setup pre SDK tasks"; } } public static final class i extends kotlin.jvm.internal.q implements kg.a { public static final i f10930b = new i(); i() { super(0); } @Override public final String invoke() { return "Starting up a new user dependency manager"; } } d(Context context) { super(0); this.f10921c = context; } public final void a() { boolean z10; String customEndpoint; t3 t3Var; t3 t3Var2; bo.app.l2 l2Var; bo.app.l2 l2Var2; boolean t10; boolean t11; Braze.this.applyPendingRuntimeConfiguration$android_sdk_base_release(); Braze.this.setConfigurationProvider$android_sdk_base_release(new BrazeConfigurationProvider(Braze.this.applicationContext)); Braze braze = Braze.this; Companion companion = Braze.Companion; String configuredApiKey = companion.getConfiguredApiKey(braze.getConfigurationProvider$android_sdk_base_release()); try { if (configuredApiKey != null) { t11 = tg.r.t(configuredApiKey); if (!t11) { z10 = false; braze.setApiKeyPresent$android_sdk_base_release(Boolean.valueOf(!z10)); BrazeLogger.setInitialLogLevelFromConfiguration(Braze.this.getConfigurationProvider$android_sdk_base_release().getLoggerInitialLogLevel()); BrazeLogger.checkForSystemLogLevelProperty$default(false, 1, null); if (companion.getSdkEnablementProvider(this.f10921c).a()) { companion.setOutboundNetworkRequestsOffline(true); } Braze.this.setPushDeliveryManager$android_sdk_base_release(new k4(Braze.this.applicationContext, Braze.this.getConfigurationProvider$android_sdk_base_release().getBrazeApiKey().toString())); Braze.this.setDeviceIdProvider$android_sdk_base_release(new l0(Braze.this.applicationContext)); Braze.this.offlineUserStorageProvider = new t3(Braze.this.applicationContext); Braze.this.registrationDataProvider = new q4(Braze.this.applicationContext, Braze.this.getConfigurationProvider$android_sdk_base_release()); customEndpoint = Braze.this.getConfigurationProvider$android_sdk_base_release().getCustomEndpoint(); if (customEndpoint != null) { t10 = tg.r.t(customEndpoint); if (!t10) { companion.setConfiguredCustomEndpoint$android_sdk_base_release(Braze.this.getConfigurationProvider$android_sdk_base_release().getCustomEndpoint()); } } if (!Braze.this.getConfigurationProvider$android_sdk_base_release().isFirebaseCloudMessagingRegistrationEnabled()) { Context context = this.f10921c; bo.app.l2 l2Var3 = Braze.this.registrationDataProvider; if (l2Var3 == null) { kotlin.jvm.internal.p.x("registrationDataProvider"); l2Var3 = null; } bo.app.q1 q1Var = new bo.app.q1(context, l2Var3); if (q1Var.a()) { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, Braze.this, BrazeLogger.Priority.I, (Throwable) null, b.f10923b, 2, (Object) null); String firebaseCloudMessagingSenderIdKey = Braze.this.getConfigurationProvider$android_sdk_base_release().getFirebaseCloudMessagingSenderIdKey(); if (firebaseCloudMessagingSenderIdKey != null) { q1Var.a(firebaseCloudMessagingSenderIdKey); } } else { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, Braze.this, BrazeLogger.Priority.W, (Throwable) null, c.f10924b, 2, (Object) null); } } else { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, Braze.this, BrazeLogger.Priority.I, (Throwable) null, C0178d.f10925b, 2, (Object) null); } if (!Braze.this.getConfigurationProvider$android_sdk_base_release().isAdmMessagingRegistrationEnabled()) { if (bo.app.b.f8706c.a(Braze.this.applicationContext)) { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, Braze.this, BrazeLogger.Priority.I, (Throwable) null, e.f10926b, 2, (Object) null); Context context2 = Braze.this.applicationContext; bo.app.l2 l2Var4 = Braze.this.registrationDataProvider; if (l2Var4 == null) { kotlin.jvm.internal.p.x("registrationDataProvider"); l2Var4 = null; } new bo.app.b(context2, l2Var4).a(); } else { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, Braze.this, BrazeLogger.Priority.W, (Throwable) null, f.f10927b, 2, (Object) null); } } else { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, Braze.this, BrazeLogger.Priority.I, (Throwable) null, g.f10928b, 2, (Object) null); } Braze.this.verifyProperSdkSetup(); BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, Braze.this, BrazeLogger.Priority.V, (Throwable) null, i.f10930b, 2, (Object) null); Braze braze2 = Braze.this; Context context3 = braze2.applicationContext; t3Var = Braze.this.offlineUserStorageProvider; if (t3Var != null) { kotlin.jvm.internal.p.x("offlineUserStorageProvider"); t3Var2 = null; } else { t3Var2 = t3Var; } BrazeConfigurationProvider configurationProvider$android_sdk_base_release = Braze.this.getConfigurationProvider$android_sdk_base_release(); bo.app.i2 externalIEventMessenger$android_sdk_base_release = Braze.this.getExternalIEventMessenger$android_sdk_base_release(); e2 deviceIdProvider$android_sdk_base_release = Braze.this.getDeviceIdProvider$android_sdk_base_release(); l2Var = Braze.this.registrationDataProvider; if (l2Var != null) { kotlin.jvm.internal.p.x("registrationDataProvider"); l2Var2 = null; } else { l2Var2 = l2Var; } braze2.setUserSpecificMemberVariablesAndStartDispatch(new x6(context3, t3Var2, configurationProvider$android_sdk_base_release, externalIEventMessenger$android_sdk_base_release, deviceIdProvider$android_sdk_base_release, l2Var2, Braze.this.getPushDeliveryManager$android_sdk_base_release(), Braze.shouldMockNetworkRequestsAndDropEvents, Braze.areOutboundNetworkRequestsOffline, Braze.this.getDeviceDataProvider())); return; } } Braze braze22 = Braze.this; Context context32 = braze22.applicationContext; t3Var = Braze.this.offlineUserStorageProvider; if (t3Var != null) { } BrazeConfigurationProvider configurationProvider$android_sdk_base_release2 = Braze.this.getConfigurationProvider$android_sdk_base_release(); bo.app.i2 externalIEventMessenger$android_sdk_base_release2 = Braze.this.getExternalIEventMessenger$android_sdk_base_release(); e2 deviceIdProvider$android_sdk_base_release2 = Braze.this.getDeviceIdProvider$android_sdk_base_release(); l2Var = Braze.this.registrationDataProvider; if (l2Var != null) { } braze22.setUserSpecificMemberVariablesAndStartDispatch(new x6(context32, t3Var2, configurationProvider$android_sdk_base_release2, externalIEventMessenger$android_sdk_base_release2, deviceIdProvider$android_sdk_base_release2, l2Var2, Braze.this.getPushDeliveryManager$android_sdk_base_release(), Braze.shouldMockNetworkRequestsAndDropEvents, Braze.areOutboundNetworkRequestsOffline, Braze.this.getDeviceDataProvider())); return; } catch (Exception e10) { BrazeLogger.INSTANCE.brazelog(Braze.this, BrazeLogger.Priority.E, e10, a.f10922b); Braze.this.publishError(e10); return; } z10 = true; braze.setApiKeyPresent$android_sdk_base_release(Boolean.valueOf(!z10)); BrazeLogger.setInitialLogLevelFromConfiguration(Braze.this.getConfigurationProvider$android_sdk_base_release().getLoggerInitialLogLevel()); BrazeLogger.checkForSystemLogLevelProperty$default(false, 1, null); if (companion.getSdkEnablementProvider(this.f10921c).a()) { } Braze.this.setPushDeliveryManager$android_sdk_base_release(new k4(Braze.this.applicationContext, Braze.this.getConfigurationProvider$android_sdk_base_release().getBrazeApiKey().toString())); Braze.this.setDeviceIdProvider$android_sdk_base_release(new l0(Braze.this.applicationContext)); Braze.this.offlineUserStorageProvider = new t3(Braze.this.applicationContext); Braze.this.registrationDataProvider = new q4(Braze.this.applicationContext, Braze.this.getConfigurationProvider$android_sdk_base_release()); customEndpoint = Braze.this.getConfigurationProvider$android_sdk_base_release().getCustomEndpoint(); if (customEndpoint != null) { } if (!Braze.this.getConfigurationProvider$android_sdk_base_release().isFirebaseCloudMessagingRegistrationEnabled()) { } if (!Braze.this.getConfigurationProvider$android_sdk_base_release().isAdmMessagingRegistrationEnabled()) { } Braze.this.verifyProperSdkSetup(); BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, Braze.this, BrazeLogger.Priority.V, (Throwable) null, i.f10930b, 2, (Object) null); } @Override public Object invoke() { a(); return v.f33976a; } } static final class d1 extends kotlin.jvm.internal.q implements kg.a { final String f10931b; d1(String str) { super(0); this.f10931b = str; } @Override public final String invoke() { return "Failed to log purchase event of: " + this.f10931b; } } static final class d4 extends kotlin.jvm.internal.q implements kg.a { public static final d4 f10932b = new d4(); d4() { super(0); } @Override public final String invoke() { return "Failed to validate and store push identifier"; } } static final class e extends kotlin.jvm.internal.q implements kg.a { final long f10933b; final long f10934c; e(long j10, long j11) { super(0); this.f10933b = j10; this.f10934c = j11; } @Override public final String invoke() { return "Braze SDK loaded in " + TimeUnit.MILLISECONDS.convert(this.f10933b - this.f10934c, TimeUnit.NANOSECONDS) + " ms."; } } static final class e1 extends kotlin.jvm.internal.q implements kg.a { final String f10935b; final String f10936c; final BigDecimal f10937d; final int f10938e; final Braze f10939f; final BrazeProperties f10940g; public static final class a extends kotlin.jvm.internal.q implements kg.a { public static final a f10941b = new a(); a() { super(0); } @Override public final String invoke() { return "Log purchase input was invalid. Not logging in-app purchase to Braze."; } } public static final class b extends kotlin.jvm.internal.q implements kg.a { public static final b f10942b = new b(); b() { super(0); } @Override public final String invoke() { return "Purchase logged with invalid properties. Not logging custom event to Braze."; } } e1(String str, String str2, BigDecimal bigDecimal, int i10, Braze braze, BrazeProperties brazeProperties) { super(0); this.f10935b = str; this.f10936c = str2; this.f10937d = bigDecimal; this.f10938e = i10; this.f10939f = braze; this.f10940g = brazeProperties; } public final void a() { String str = this.f10935b; if (!ValidationUtils.isValidLogPurchaseInput(str, this.f10936c, this.f10937d, this.f10938e, this.f10939f.getUdm$android_sdk_base_release().l())) { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.f10939f, BrazeLogger.Priority.W, (Throwable) null, a.f10941b, 2, (Object) null); return; } BrazeProperties brazeProperties = this.f10940g; if (brazeProperties != null && brazeProperties.isInvalid()) { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.f10939f, BrazeLogger.Priority.W, (Throwable) null, b.f10942b, 2, (Object) null); return; } String ensureBrazeFieldLength = ValidationUtils.ensureBrazeFieldLength(str); j.a aVar = bo.app.j.f9166h; String str2 = this.f10936c; kotlin.jvm.internal.p.d(str2); BigDecimal bigDecimal = this.f10937d; kotlin.jvm.internal.p.d(bigDecimal); x1 a10 = aVar.a(ensureBrazeFieldLength, str2, bigDecimal, this.f10938e, this.f10940g); if (a10 != null && this.f10939f.getUdm$android_sdk_base_release().f().a(a10)) { this.f10939f.getUdm$android_sdk_base_release().r().a(new bo.app.d4(ensureBrazeFieldLength, this.f10940g, a10)); } } @Override public Object invoke() { a(); return v.f33976a; } } static final class e4 extends kotlin.coroutines.jvm.internal.l implements kg.p { int f10943b; final String f10945d; e4(String str, cg.d dVar) { super(2, dVar); this.f10945d = str; } @Override public final Object invoke(k0 k0Var, cg.d dVar) { return ((e4) create(k0Var, dVar)).invokeSuspend(v.f33976a); } @Override public final cg.d create(Object obj, cg.d dVar) { return new e4(this.f10945d, dVar); } @Override public final Object invokeSuspend(Object obj) { dg.d.c(); if (this.f10943b == 0) { yf.n.b(obj); return kotlin.coroutines.jvm.internal.b.a(Braze.this.getUdm$android_sdk_base_release().d().c(this.f10945d)); } throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine"); } } static final class f extends kotlin.jvm.internal.q implements kg.a { final String f10946b; final String f10947c; f(String str, String str2) { super(0); this.f10946b = str; this.f10947c = str2; } @Override public final String invoke() { return "Failed to update ContentCard storage provider with single card update. User id: " + this.f10946b + " Serialized json: " + this.f10947c; } } static final class f0 extends kotlin.jvm.internal.q implements kg.a { public static final f0 f10948b = new f0(); f0() { super(0); } @Override public final String invoke() { return "The ContentCardsUpdatedEvent was null. Returning the default value for the unviewed card count."; } } static final class f1 extends kotlin.jvm.internal.q implements kg.a { final String f10949b; f1(String str) { super(0); this.f10949b = str; } @Override public final String invoke() { return "Error logging Push Delivery " + this.f10949b; } } static final class f2 extends kotlin.jvm.internal.q implements kg.a { final String f10950b; f2(String str) { super(0); this.f10950b = str; } @Override public final String invoke() { return "Failed to set the push token " + this.f10950b; } } static final class f3 extends kotlin.jvm.internal.q implements kg.a { final InAppMessageEvent f10951b; f3(InAppMessageEvent inAppMessageEvent) { super(0); this.f10951b = inAppMessageEvent; } @Override public final String invoke() { return "Error retrying In-App Message from event " + this.f10951b; } } public static final class f4 extends kotlin.jvm.internal.q implements kg.a { final String f10952b; f4(String str) { super(0); this.f10952b = str; } @Override public final String invoke() { return "The Braze SDK requires the permission " + this.f10952b + ". Check your AndroidManifest."; } } static final class g extends kotlin.jvm.internal.q implements kg.a { final String f10953b; final Braze f10954c; final String f10955d; public static final class a extends kotlin.jvm.internal.q implements kg.a { final String f10956b; final String f10957c; a(String str, String str2) { super(0); this.f10956b = str; this.f10957c = str2; } @Override public final String invoke() { return "Cannot add null or blank card json to storage. Returning. User id: " + this.f10956b + " Serialized json: " + this.f10957c; } } g(String str, Braze braze, String str2) { super(0); this.f10953b = str; this.f10954c = braze; this.f10955d = str2; } public final void a() { boolean t10; t10 = tg.r.t(this.f10953b); if (t10) { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.f10954c, BrazeLogger.Priority.W, (Throwable) null, new a(this.f10955d, this.f10953b), 2, (Object) null); return; } this.f10954c.getUdm$android_sdk_base_release().q().a(new z(this.f10953b), this.f10955d); this.f10954c.getExternalIEventMessenger$android_sdk_base_release().a(this.f10954c.getUdm$android_sdk_base_release().q().b(), ContentCardsUpdatedEvent.class); } @Override public Object invoke() { a(); return v.f33976a; } } static final class g1 extends kotlin.jvm.internal.q implements kg.a { final String f10959c; final long f10960d; g1(String str, long j10) { super(0); this.f10959c = str; this.f10960d = j10; } public final void a() { Braze.this.getUdm$android_sdk_base_release().f().a(this.f10959c); Braze.this.schedulePushDelivery$android_sdk_base_release(this.f10960d); } @Override public Object invoke() { a(); return v.f33976a; } } static final class g2 extends kotlin.jvm.internal.q implements kg.a { final String f10962c; public static final class a extends kotlin.jvm.internal.q implements kg.a { final String f10963b; a(String str) { super(0); this.f10963b = str; } @Override public final String invoke() { return "Push token " + this.f10963b + " registered and immediately being flushed."; } } public static final class b extends kotlin.jvm.internal.q implements kg.a { public static final b f10964b = new b(); b() { super(0); } @Override public final String invoke() { return "Push token must not be null or blank. Not registering for push with Braze."; } } g2(String str) { super(0); this.f10962c = str; } public final void a() { boolean t10; BrazeLogger brazeLogger = BrazeLogger.INSTANCE; BrazeLogger.brazelog$default(brazeLogger, Braze.this, BrazeLogger.Priority.I, (Throwable) null, new a(this.f10962c), 2, (Object) null); String str = this.f10962c; if (str != null) { t10 = tg.r.t(str); if (!t10) { bo.app.l2 l2Var = Braze.this.registrationDataProvider; if (l2Var == null) { kotlin.jvm.internal.p.x("registrationDataProvider"); l2Var = null; } l2Var.a(this.f10962c); Braze.this.getUdm$android_sdk_base_release().j().e(); Braze.this.requestImmediateDataFlush(); return; } } BrazeLogger.brazelog$default(brazeLogger, Braze.this, BrazeLogger.Priority.W, (Throwable) null, b.f10964b, 2, (Object) null); } @Override public Object invoke() { a(); return v.f33976a; } } static final class g3 extends kotlin.jvm.internal.q implements kg.a { final InAppMessageEvent f10966c; g3(InAppMessageEvent inAppMessageEvent) { super(0); this.f10966c = inAppMessageEvent; } public final void a() { Braze.this.getUdm$android_sdk_base_release().r().a(this.f10966c.getTriggerEvent(), this.f10966c.getTriggerAction()); } @Override public Object invoke() { a(); return v.f33976a; } } public static final class g4 extends kotlin.jvm.internal.q implements kg.a { public static final g4 f10967b = new g4(); g4() { super(0); } @Override public final String invoke() { return "The Braze SDK requires a non-empty API key. Check your braze.xml or BrazeConfig."; } } public static final class h extends kotlin.jvm.internal.q implements kg.a { final Class f10968b; h(Class cls) { super(0); this.f10968b = cls; } @Override public final String invoke() { return "Failed to add synchronous subscriber for class: " + this.f10968b; } } static final class h0 extends kotlin.coroutines.jvm.internal.l implements kg.p { int f10969b; final IValueCallback f10970c; final Braze f10971d; public static final class a extends kotlin.coroutines.jvm.internal.l implements kg.p { int f10972b; final IValueCallback f10973c; final Braze f10974d; a(IValueCallback iValueCallback, Braze braze, cg.d dVar) { super(2, dVar); this.f10973c = iValueCallback; this.f10974d = braze; } @Override public final Object invoke(k0 k0Var, cg.d dVar) { return ((a) create(k0Var, dVar)).invokeSuspend(v.f33976a); } @Override public final cg.d create(Object obj, cg.d dVar) { return new a(this.f10973c, this.f10974d, dVar); } @Override public final Object invokeSuspend(Object obj) { dg.d.c(); if (this.f10972b == 0) { yf.n.b(obj); IValueCallback iValueCallback = this.f10973c; BrazeUser brazeUser = this.f10974d.brazeUser; if (brazeUser == null) { kotlin.jvm.internal.p.x("brazeUser"); brazeUser = null; } iValueCallback.onSuccess(brazeUser); return v.f33976a; } throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine"); } } h0(IValueCallback iValueCallback, Braze braze, cg.d dVar) { super(2, dVar); this.f10970c = iValueCallback; this.f10971d = braze; } @Override public final Object invoke(k0 k0Var, cg.d dVar) { return ((h0) create(k0Var, dVar)).invokeSuspend(v.f33976a); } @Override public final cg.d create(Object obj, cg.d dVar) { return new h0(this.f10970c, this.f10971d, dVar); } @Override public final Object invokeSuspend(Object obj) { Object c10; c10 = dg.d.c(); int i10 = this.f10969b; if (i10 != 0) { if (i10 == 1) { yf.n.b(obj); } else { throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine"); } } else { yf.n.b(obj); cg.g coroutineContext = BrazeCoroutineScope.INSTANCE.getCoroutineContext(); a aVar = new a(this.f10970c, this.f10971d, null); this.f10969b = 1; if (vg.g.g(coroutineContext, aVar, this) == c10) { return c10; } } return v.f33976a; } } static final class h1 extends kotlin.jvm.internal.q implements kg.a { public static final h1 f10975b = new h1(); h1() { super(0); } @Override public final String invoke() { return "Failed to log push max campaign"; } } public static final class h2 extends kotlin.jvm.internal.q implements kg.a { final Class f10976b; final IEventSubscriber f10977c; final boolean f10978d; h2(Class cls, IEventSubscriber iEventSubscriber, boolean z10) { super(0); this.f10976b = cls; this.f10977c = iEventSubscriber; this.f10978d = z10; } @Override public final String invoke() { return "Did remove the background " + this.f10976b + ' ' + this.f10977c + "? " + this.f10978d; } } public static final class h3 extends kotlin.coroutines.jvm.internal.l implements kg.p { int f10979b; final kg.a f10980c; public static final class a extends kotlin.coroutines.jvm.internal.l implements kg.p { int f10981b; final kg.a f10982c; a(kg.a aVar, cg.d dVar) { super(2, dVar); this.f10982c = aVar; } @Override public final Object invoke(k0 k0Var, cg.d dVar) { return ((a) create(k0Var, dVar)).invokeSuspend(v.f33976a); } @Override public final cg.d create(Object obj, cg.d dVar) { return new a(this.f10982c, dVar); } @Override public final Object invokeSuspend(Object obj) { dg.d.c(); if (this.f10981b == 0) { yf.n.b(obj); this.f10982c.invoke(); return v.f33976a; } throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine"); } } h3(kg.a aVar, cg.d dVar) { super(2, dVar); this.f10980c = aVar; } @Override public final Object invoke(k0 k0Var, cg.d dVar) { return ((h3) create(k0Var, dVar)).invokeSuspend(v.f33976a); } @Override public final cg.d create(Object obj, cg.d dVar) { return new h3(this.f10980c, dVar); } @Override public final Object invokeSuspend(Object obj) { dg.d.c(); if (this.f10979b == 0) { yf.n.b(obj); vg.h.b(null, new a(this.f10980c, null), 1, null); return v.f33976a; } throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine"); } } public static final class h4 extends kotlin.jvm.internal.q implements kg.a { public static final h4 f10983b = new h4(); h4() { super(0); } @Override public final String invoke() { return "The Braze SDK is not integrated correctly. Please visit https://www.braze.com/docs/developer_guide/platform_integration_guides/android/initial_sdk_setup/android_sdk_integration/"; } } public static final class i extends kotlin.jvm.internal.q implements kg.a { public static final i f10984b = new i(); i() { super(0); } @Override public final String invoke() { return "Applying any pending runtime configuration values"; } } static final class i0 extends kotlin.jvm.internal.q implements kg.a { public static final i0 f10985b = new i0(); i0() { super(0); } @Override public final String invoke() { return "Failed to retrieve the current user."; } } static final class i1 extends kotlin.jvm.internal.q implements kg.a { final String f10987c; i1(String str) { super(0); this.f10987c = str; } public final void a() { Braze.this.getUdm$android_sdk_base_release().f().b(this.f10987c); } @Override public Object invoke() { a(); return v.f33976a; } } public static final class i2 extends kotlin.jvm.internal.q implements kg.a { final Class f10988b; final IEventSubscriber f10989c; final boolean f10990d; i2(Class cls, IEventSubscriber iEventSubscriber, boolean z10) { super(0); this.f10988b = cls; this.f10989c = iEventSubscriber; this.f10990d = z10; } @Override public final String invoke() { return "Did remove the synchronous " + this.f10988b + ' ' + this.f10989c + "? " + this.f10990d; } } public static final class i3 extends kotlin.jvm.internal.q implements kg.a { public static final i3 f10991b = new i3(); i3() { super(0); } @Override public final String invoke() { return "Got error in singleton run without result"; } } public static final class j extends kotlin.jvm.internal.q implements kg.a { public static final j f10992b = new j(); j() { super(0); } @Override public final String invoke() { return "Clearing config values"; } } static final class j1 extends kotlin.jvm.internal.q implements kg.a { public static final j1 f10993b = new j1(); j1() { super(0); } @Override public final String invoke() { return "Failed to log push notification action clicked."; } } public static final class j2 extends kotlin.jvm.internal.q implements kg.a { final Class f10994b; j2(Class cls) { super(0); this.f10994b = cls; } @Override public final String invoke() { return "Failed to remove " + this.f10994b.getName() + " subscriber."; } } public static final class j3 extends kotlin.coroutines.jvm.internal.l implements kg.p { int f10995b; final kg.p f10996c; public static final class a extends kotlin.coroutines.jvm.internal.l implements kg.p { int f10997b; final kg.p f10998c; public static final class C0179a extends kotlin.coroutines.jvm.internal.l implements kg.p { int f10999b; private Object f11000c; final kg.p f11001d; C0179a(kg.p pVar, cg.d dVar) { super(2, dVar); this.f11001d = pVar; } @Override public final Object invoke(k0 k0Var, cg.d dVar) { return ((C0179a) create(k0Var, dVar)).invokeSuspend(v.f33976a); } @Override public final cg.d create(Object obj, cg.d dVar) { C0179a c0179a = new C0179a(this.f11001d, dVar); c0179a.f11000c = obj; return c0179a; } @Override public final Object invokeSuspend(Object obj) { Object c10; c10 = dg.d.c(); int i10 = this.f10999b; if (i10 != 0) { if (i10 == 1) { yf.n.b(obj); } else { throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine"); } } else { yf.n.b(obj); k0 k0Var = (k0) this.f11000c; kg.p pVar = this.f11001d; this.f10999b = 1; obj = pVar.invoke(k0Var, this); if (obj == c10) { return c10; } } return obj; } } a(kg.p pVar, cg.d dVar) { super(2, dVar); this.f10998c = pVar; } @Override public final Object invoke(k0 k0Var, cg.d dVar) { return ((a) create(k0Var, dVar)).invokeSuspend(v.f33976a); } @Override public final cg.d create(Object obj, cg.d dVar) { return new a(this.f10998c, dVar); } @Override public final Object invokeSuspend(Object obj) { Object b10; dg.d.c(); if (this.f10997b == 0) { yf.n.b(obj); b10 = vg.h.b(null, new C0179a(this.f10998c, null), 1, null); return b10; } throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine"); } } j3(kg.p pVar, cg.d dVar) { super(2, dVar); this.f10996c = pVar; } @Override public final Object invoke(k0 k0Var, cg.d dVar) { return ((j3) create(k0Var, dVar)).invokeSuspend(v.f33976a); } @Override public final cg.d create(Object obj, cg.d dVar) { return new j3(this.f10996c, dVar); } @Override public final Object invokeSuspend(Object obj) { Object c10; vg.r0 b10; c10 = dg.d.c(); int i10 = this.f10995b; if (i10 != 0) { if (i10 == 1) { yf.n.b(obj); } else { throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine"); } } else { yf.n.b(obj); b10 = vg.i.b(i5.f9159a, null, null, new a(this.f10996c, null), 3, null); this.f10995b = 1; obj = b10.L(this); if (obj == c10) { return c10; } } return obj; } } public static final class k extends kotlin.jvm.internal.q implements kg.a { final BrazeConfig f11002b; k(BrazeConfig brazeConfig) { super(0); this.f11002b = brazeConfig; } @Override public final String invoke() { return "Setting pending config object: " + this.f11002b; } } static final class k1 extends kotlin.jvm.internal.q implements kg.a { final String f11003b; final Braze f11004c; final String f11005d; final String f11006e; public static final class a extends kotlin.jvm.internal.q implements kg.a { public static final a f11007b = new a(); a() { super(0); } @Override public final String invoke() { return "No campaign Id associated with this notification (this is expected for test sends). Not logging push notification action clicked."; } } public static final class b extends kotlin.jvm.internal.q implements kg.a { public static final b f11008b = new b(); b() { super(0); } @Override public final String invoke() { return "Action ID cannot be null or blank."; } } public static final class c extends kotlin.jvm.internal.q implements kg.a { public static final c f11009b = new c(); c() { super(0); } @Override public final String invoke() { return "Action Type cannot be null or blank."; } } k1(String str, Braze braze, String str2, String str3) { super(0); this.f11003b = str; this.f11004c = braze; this.f11005d = str2; this.f11006e = str3; } public final void a() { boolean t10; boolean t11; boolean t12; String str = this.f11003b; if (str != null) { t10 = tg.r.t(str); if (!t10) { String str2 = this.f11005d; if (str2 != null) { t11 = tg.r.t(str2); if (!t11) { String str3 = this.f11006e; if (str3 != null) { t12 = tg.r.t(str3); if (!t12) { this.f11004c.getUdm$android_sdk_base_release().f().a(bo.app.f4.f8953k.a(this.f11003b, this.f11005d, this.f11006e)); return; } } BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.f11004c, BrazeLogger.Priority.W, (Throwable) null, c.f11009b, 2, (Object) null); return; } } BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.f11004c, BrazeLogger.Priority.W, (Throwable) null, b.f11008b, 2, (Object) null); return; } } BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.f11004c, BrazeLogger.Priority.W, (Throwable) null, a.f11007b, 2, (Object) null); } @Override public Object invoke() { a(); return v.f33976a; } } static final class k2 extends kotlin.jvm.internal.q implements kg.a { public static final k2 f11010b = new k2(); k2() { super(0); } @Override public final String invoke() { return "Failed to request Content Cards refresh from Braze servers."; } } public static final class k3 extends kotlin.jvm.internal.q implements kg.a { public static final k3 f11011b = new k3(); k3() { super(0); } @Override public final String invoke() { return "Error scheduling push delivery"; } } public static final class l extends kotlin.jvm.internal.q implements kg.a { public static final l f11012b = new l(); l() { super(0); } @Override public final String invoke() { return "Failed to retrieve the cached ContentCardsUpdatedEvent."; } } static final class l2 extends kotlin.jvm.internal.q implements kg.a { public static final class a extends kotlin.jvm.internal.q implements kg.a { public static final a f11014b = new a(); a() { super(0); } @Override public final String invoke() { return "Content Cards is not enabled, skipping API call to refresh"; } } l2() { super(0); } public final void a() { if (Braze.this.getUdm$android_sdk_base_release().l().x()) { m5.q0.b(Braze.this.getUdm$android_sdk_base_release().f(), Braze.this.getUdm$android_sdk_base_release().q().e(), Braze.this.getUdm$android_sdk_base_release().q().f(), 0, true, 4, null); } else { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, Braze.this, (BrazeLogger.Priority) null, (Throwable) null, a.f11014b, 3, (Object) null); } } @Override public Object invoke() { a(); return v.f33976a; } } public static final class l3 extends kotlin.jvm.internal.q implements kg.a { final long f11016c; l3(long j10) { super(0); this.f11016c = j10; } public final void a() { Braze.this.getUdm$android_sdk_base_release().f().a(this.f11016c); } @Override public Object invoke() { a(); return v.f33976a; } } public static final class m extends kotlin.coroutines.jvm.internal.l implements kg.p { int f11017b; m(cg.d dVar) { super(2, dVar); } @Override public final Object invoke(k0 k0Var, cg.d dVar) { return ((m) create(k0Var, dVar)).invokeSuspend(v.f33976a); } @Override public final cg.d create(Object obj, cg.d dVar) { return new m(dVar); } @Override public final Object invokeSuspend(Object obj) { dg.d.c(); if (this.f11017b == 0) { yf.n.b(obj); if (Braze.this.getUdm$android_sdk_base_release().l().x()) { return Braze.this.getUdm$android_sdk_base_release().q().b(); } return null; } throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine"); } } static final class m2 extends kotlin.jvm.internal.q implements kg.a { public static final m2 f11019b = new m2(); m2() { super(0); } @Override public final String invoke() { return "Failed to request Content Cards refresh from the cache."; } } public static final class n extends kotlin.jvm.internal.q implements kg.a { final String f11020b; n(String str) { super(0); this.f11020b = str; } @Override public final String invoke() { return "Failed to set external id to: " + this.f11020b; } } static final class n0 extends kotlin.jvm.internal.q implements kg.a { public static final n0 f11021b = new n0(); n0() { super(0); } @Override public final String invoke() { return "Error handling test in-app message push"; } } static final class n1 extends kotlin.jvm.internal.q implements kg.a { final Intent f11022b; n1(Intent intent) { super(0); this.f11022b = intent; } @Override public final String invoke() { return "Error logging push notification with intent: " + this.f11022b; } } static final class n2 extends kotlin.jvm.internal.q implements kg.a { n2() { super(0); } public final void a() { Braze.this.getExternalIEventMessenger$android_sdk_base_release().a(Braze.this.getUdm$android_sdk_base_release().q().b(), ContentCardsUpdatedEvent.class); } @Override public Object invoke() { a(); return v.f33976a; } } public static final class o extends kotlin.jvm.internal.q implements kg.a { final String f11024b; final Braze f11025c; final String f11026d; public static final class a extends kotlin.jvm.internal.q implements kg.a { public static final a f11027b = new a(); a() { super(0); } @Override public final String invoke() { return "userId passed to changeUser was null or empty. The current user will remain the active user."; } } public static final class b extends kotlin.jvm.internal.q implements kg.a { final String f11028b; b(String str) { super(0); this.f11028b = str; } @Override public final String invoke() { return "Rejected user id with byte length longer than 997. Not changing user. Input user id: " + this.f11028b; } } public static final class c extends kotlin.jvm.internal.q implements kg.a { final String f11029b; c(String str) { super(0); this.f11029b = str; } @Override public final String invoke() { return "Received request to change current user " + this.f11029b + " to the same user id. Not changing user."; } } public static final class d extends kotlin.jvm.internal.q implements kg.a { final String f11030b; d(String str) { super(0); this.f11030b = str; } @Override public final String invoke() { return "Set sdk auth signature on changeUser call: " + this.f11030b; } } public static final class e extends kotlin.jvm.internal.q implements kg.a { final String f11031b; e(String str) { super(0); this.f11031b = str; } @Override public final String invoke() { return "Changing anonymous user to " + this.f11031b; } } public static final class f extends kotlin.jvm.internal.q implements kg.a { final String f11032b; final String f11033c; f(String str, String str2) { super(0); this.f11032b = str; this.f11033c = str2; } @Override public final String invoke() { return "Changing current user " + this.f11032b + " to new user " + this.f11033c + '.'; } } public static final class g extends kotlin.jvm.internal.q implements kg.a { final String f11034b; g(String str) { super(0); this.f11034b = str; } @Override public final String invoke() { return "Set sdk auth signature on changeUser call: " + this.f11034b; } } o(String str, Braze braze, String str2) { super(0); this.f11024b = str; this.f11025c = braze; this.f11026d = str2; } public final void a() { t3 t3Var; bo.app.l2 l2Var; boolean t10; boolean t11; String str = this.f11024b; if (str != null && str.length() != 0) { if (StringUtils.getByteSize(this.f11024b) <= 997) { BrazeUser brazeUser = this.f11025c.brazeUser; if (brazeUser == null) { kotlin.jvm.internal.p.x("brazeUser"); brazeUser = null; } String userId = brazeUser.getUserId(); if (kotlin.jvm.internal.p.b(userId, this.f11024b)) { BrazeLogger brazeLogger = BrazeLogger.INSTANCE; BrazeLogger.brazelog$default(brazeLogger, this.f11025c, BrazeLogger.Priority.I, (Throwable) null, new c(this.f11024b), 2, (Object) null); String str2 = this.f11026d; if (str2 != null) { t11 = tg.r.t(str2); if (!t11) { BrazeLogger.brazelog$default(brazeLogger, this.f11025c, (BrazeLogger.Priority) null, (Throwable) null, new d(this.f11026d), 3, (Object) null); this.f11025c.getUdm$android_sdk_base_release().h().a(this.f11026d); return; } return; } return; } this.f11025c.getUdm$android_sdk_base_release().e().b(); this.f11025c.getUdm$android_sdk_base_release().n().d(); if (kotlin.jvm.internal.p.b(userId, "")) { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.f11025c, BrazeLogger.Priority.I, (Throwable) null, new e(this.f11024b), 2, (Object) null); t3 t3Var2 = this.f11025c.offlineUserStorageProvider; if (t3Var2 == null) { kotlin.jvm.internal.p.x("offlineUserStorageProvider"); t3Var2 = null; } t3Var2.a(this.f11024b); BrazeUser brazeUser2 = this.f11025c.brazeUser; if (brazeUser2 == null) { kotlin.jvm.internal.p.x("brazeUser"); brazeUser2 = null; } brazeUser2.setUserId(this.f11024b); } else { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.f11025c, BrazeLogger.Priority.I, (Throwable) null, new f(userId, this.f11024b), 2, (Object) null); this.f11025c.getExternalIEventMessenger$android_sdk_base_release().a(new FeedUpdatedEvent(new ArrayList(), this.f11024b, false, DateTimeUtils.nowInSeconds()), FeedUpdatedEvent.class); } this.f11025c.getUdm$android_sdk_base_release().f().g(); this.f11025c.getUdm$android_sdk_base_release().b().a(); t3 t3Var3 = this.f11025c.offlineUserStorageProvider; if (t3Var3 == null) { kotlin.jvm.internal.p.x("offlineUserStorageProvider"); t3Var3 = null; } t3Var3.a(this.f11024b); bo.app.a3 udm$android_sdk_base_release = this.f11025c.getUdm$android_sdk_base_release(); Context context = this.f11025c.applicationContext; t3 t3Var4 = this.f11025c.offlineUserStorageProvider; if (t3Var4 == null) { kotlin.jvm.internal.p.x("offlineUserStorageProvider"); t3Var = null; } else { t3Var = t3Var4; } BrazeConfigurationProvider configurationProvider$android_sdk_base_release = this.f11025c.getConfigurationProvider$android_sdk_base_release(); bo.app.i2 externalIEventMessenger$android_sdk_base_release = this.f11025c.getExternalIEventMessenger$android_sdk_base_release(); e2 deviceIdProvider$android_sdk_base_release = this.f11025c.getDeviceIdProvider$android_sdk_base_release(); bo.app.l2 l2Var2 = this.f11025c.registrationDataProvider; if (l2Var2 == null) { kotlin.jvm.internal.p.x("registrationDataProvider"); l2Var = null; } else { l2Var = l2Var2; } this.f11025c.setUserSpecificMemberVariablesAndStartDispatch(new x6(context, t3Var, configurationProvider$android_sdk_base_release, externalIEventMessenger$android_sdk_base_release, deviceIdProvider$android_sdk_base_release, l2Var, this.f11025c.getPushDeliveryManager$android_sdk_base_release(), Braze.shouldMockNetworkRequestsAndDropEvents, Braze.areOutboundNetworkRequestsOffline, this.f11025c.getDeviceDataProvider())); String str3 = this.f11026d; if (str3 != null) { t10 = tg.r.t(str3); if (!t10) { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.f11025c, (BrazeLogger.Priority) null, (Throwable) null, new g(this.f11026d), 3, (Object) null); this.f11025c.getUdm$android_sdk_base_release().h().a(this.f11026d); } } this.f11025c.getUdm$android_sdk_base_release().i().g(); this.f11025c.getUdm$android_sdk_base_release().f().f(); udm$android_sdk_base_release.a(); return; } BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.f11025c, BrazeLogger.Priority.W, (Throwable) null, new b(this.f11024b), 2, (Object) null); return; } BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.f11025c, BrazeLogger.Priority.W, (Throwable) null, a.f11027b, 2, (Object) null); } @Override public Object invoke() { a(); return v.f33976a; } } static final class o0 extends kotlin.jvm.internal.q implements kg.a { final Intent f11035b; final Braze f11036c; o0(Intent intent, Braze braze) { super(0); this.f11035b = intent; this.f11036c = braze; } public final void a() { Braze.Companion.requestTriggersIfInAppMessageTestPush$android_sdk_base_release(this.f11035b, this.f11036c.getUdm$android_sdk_base_release().f()); } @Override public Object invoke() { a(); return v.f33976a; } } static final class o1 extends kotlin.jvm.internal.q implements kg.a { final Intent f11037b; final Braze f11038c; public static final class a extends kotlin.jvm.internal.q implements kg.a { public static final a f11039b = new a(); a() { super(0); } @Override public final String invoke() { return "Cannot logPushNotificationOpened with null intent. Not logging push click."; } } public static final class b extends kotlin.jvm.internal.q implements kg.a { final String f11040b; b(String str) { super(0); this.f11040b = str; } @Override public final String invoke() { return "Logging push click. Campaign Id: " + this.f11040b; } } public static final class c extends kotlin.jvm.internal.q implements kg.a { public static final c f11041b = new c(); c() { super(0); } @Override public final String invoke() { return "No campaign Id associated with this notification (this is expected for test sends). Not logging push click."; } } o1(Intent intent, Braze braze) { super(0); this.f11037b = intent; this.f11038c = braze; } public final void a() { boolean t10; Intent intent = this.f11037b; if (intent == null) { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.f11038c, BrazeLogger.Priority.I, (Throwable) null, a.f11039b, 2, (Object) null); return; } String stringExtra = intent.getStringExtra("cid"); if (stringExtra != null) { t10 = tg.r.t(stringExtra); if (!t10) { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.f11038c, BrazeLogger.Priority.I, (Throwable) null, new b(stringExtra), 2, (Object) null); this.f11038c.getUdm$android_sdk_base_release().f().a(i4.f9158j.a(stringExtra)); Braze.Companion.requestTriggersIfInAppMessageTestPush$android_sdk_base_release(this.f11037b, this.f11038c.getUdm$android_sdk_base_release().f()); } } BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.f11038c, BrazeLogger.Priority.I, (Throwable) null, c.f11041b, 2, (Object) null); Braze.Companion.requestTriggersIfInAppMessageTestPush$android_sdk_base_release(this.f11037b, this.f11038c.getUdm$android_sdk_base_release().f()); } @Override public Object invoke() { a(); return v.f33976a; } } static final class o2 extends kotlin.jvm.internal.q implements kg.a { public static final o2 f11042b = new o2(); o2() { super(0); } @Override public final String invoke() { return "Failed to request refresh of feed."; } } public static final class p extends kotlin.jvm.internal.q implements kg.a { public static final p f11043b = new p(); p() { super(0); } @Override public final String invoke() { return "Failed to close session."; } } public static final class p0 extends kotlin.jvm.internal.q implements kg.a { public static final p0 f11044b = new p0(); p0() { super(0); } @Override public final String invoke() { return "Ephemeral events enabled"; } } static final class p1 extends kotlin.jvm.internal.q implements kg.a { final String f11045b; final String f11046c; p1(String str, String str2) { super(0); this.f11045b = str; this.f11046c = str2; } @Override public final String invoke() { return "Failed to log push story page clicked for pageId: " + this.f11045b + " campaignId: " + this.f11046c; } } static final class p2 extends kotlin.jvm.internal.q implements kg.a { p2() { super(0); } public final void a() { Braze.this.getUdm$android_sdk_base_release().f().a(new y3.a(null, null, null, null, 15, null).d()); } @Override public Object invoke() { a(); return v.f33976a; } } public static final class q extends kotlin.jvm.internal.q implements kg.a { final Activity f11048b; final Braze f11049c; public static final class a extends kotlin.jvm.internal.q implements kg.a { public static final a f11050b = new a(); a() { super(0); } @Override public final String invoke() { return "Cannot close session with null activity."; } } q(Activity activity, Braze braze) { super(0); this.f11048b = activity; this.f11049c = braze; } public final void a() { if (this.f11048b == null) { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.f11049c, BrazeLogger.Priority.W, (Throwable) null, a.f11050b, 2, (Object) null); } else { this.f11049c.getUdm$android_sdk_base_release().f().closeSession(this.f11048b); } } @Override public Object invoke() { a(); return v.f33976a; } } public static final class q0 extends kotlin.jvm.internal.q implements kg.a { final String f11051b; final Set f11052c; final boolean f11053d; q0(String str, Set set, boolean z10) { super(0); this.f11051b = str; this.f11052c = set; this.f11053d = z10; } @Override public final String invoke() { return "Checking event key [" + this.f11051b + "] against ephemeral event list " + this.f11052c + " and got match?: " + this.f11053d; } } static final class q1 extends kotlin.jvm.internal.q implements kg.a { final String f11054b; final String f11055c; final Braze f11056d; public static final class a extends kotlin.jvm.internal.q implements kg.a { public static final a f11057b = new a(); a() { super(0); } @Override public final String invoke() { return "Push story page click input was invalid. Not logging in-app purchase to Braze."; } } q1(String str, String str2, Braze braze) { super(0); this.f11054b = str; this.f11055c = str2; this.f11056d = braze; } public final void a() { if (!ValidationUtils.isValidPushStoryClickInput(this.f11054b, this.f11055c)) { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.f11056d, BrazeLogger.Priority.W, (Throwable) null, a.f11057b, 2, (Object) null); return; } j.a aVar = bo.app.j.f9166h; String str = this.f11054b; kotlin.jvm.internal.p.d(str); String str2 = this.f11055c; kotlin.jvm.internal.p.d(str2); x1 e10 = aVar.e(str, str2); if (e10 != null) { this.f11056d.getUdm$android_sdk_base_release().f().a(e10); } } @Override public Object invoke() { a(); return v.f33976a; } } static final class q2 extends kotlin.jvm.internal.q implements kg.a { public static final q2 f11058b = new q2(); q2() { super(0); } @Override public final String invoke() { return "Failed to retrieve and publish feed from offline cache."; } } public static final class q3 extends kotlin.jvm.internal.q implements kg.a { final boolean f11059b; q3(boolean z10) { super(0); this.f11059b = z10; } @Override public final String invoke() { return "Failed to set sync policy offline to " + this.f11059b; } } static final class r extends kotlin.jvm.internal.q implements kg.a { public static final r f11060b = new r(); r() { super(0); } @Override public final String invoke() { return "Failed to retrieve the current user."; } } public static final class r0 extends kotlin.jvm.internal.q implements kg.a { final String f11061b; r0(String str) { super(0); this.f11061b = str; } @Override public final String invoke() { return "Failed to log custom event: " + this.f11061b; } } public static final class r1 extends kotlin.jvm.internal.q implements kg.a { public static final r1 f11062b = new r1(); r1() { super(0); } @Override public final String invoke() { return "Failed to open session."; } } static final class r2 extends kotlin.jvm.internal.q implements kg.a { r2() { super(0); } public final void a() { Braze.this.getExternalIEventMessenger$android_sdk_base_release().a(Braze.this.getUdm$android_sdk_base_release().c().a(), FeedUpdatedEvent.class); } @Override public Object invoke() { a(); return v.f33976a; } } public static final class r3 extends kotlin.jvm.internal.q implements kg.a { final boolean f11065c; public static final class a extends kotlin.jvm.internal.q implements kg.a { final boolean f11066b; a(boolean z10) { super(0); this.f11066b = z10; } @Override public final String invoke() { return "Setting the image loader deny network downloads to " + this.f11066b; } } r3(boolean z10) { super(0); this.f11065c = z10; } public final void a() { Braze.this.getUdm$android_sdk_base_release().f().c(this.f11065c); Braze.this.getUdm$android_sdk_base_release().k().a(this.f11065c); Braze braze = Braze.this; if (braze.imageLoader != null) { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, braze, (BrazeLogger.Priority) null, (Throwable) null, new a(this.f11065c), 3, (Object) null); Braze.this.getImageLoader().setOffline(this.f11065c); } } @Override public Object invoke() { a(); return v.f33976a; } } static final class s extends kotlin.coroutines.jvm.internal.l implements kg.p { int f11067b; s(cg.d dVar) { super(2, dVar); } @Override public final Object invoke(k0 k0Var, cg.d dVar) { return ((s) create(k0Var, dVar)).invokeSuspend(v.f33976a); } @Override public final cg.d create(Object obj, cg.d dVar) { return new s(dVar); } @Override public final Object invokeSuspend(Object obj) { dg.d.c(); if (this.f11067b == 0) { yf.n.b(obj); BrazeUser brazeUser = Braze.this.brazeUser; if (brazeUser == null) { kotlin.jvm.internal.p.x("brazeUser"); return null; } return brazeUser; } throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine"); } } public static final class s0 extends kotlin.jvm.internal.q implements kg.a { final String f11069b; final Braze f11070c; final BrazeProperties f11071d; public static final class a extends kotlin.jvm.internal.q implements kg.a { final g0 f11072b; a(g0 g0Var) { super(0); this.f11072b = g0Var; } @Override public final String invoke() { return "Logged custom event with name " + ((String) this.f11072b.f23340a) + " was invalid. Not logging custom event to Braze."; } } public static final class b extends kotlin.jvm.internal.q implements kg.a { final g0 f11073b; b(g0 g0Var) { super(0); this.f11073b = g0Var; } @Override public final String invoke() { return "Custom event with name " + ((String) this.f11073b.f23340a) + " logged with invalid properties. Not logging custom event to Braze."; } } s0(String str, Braze braze, BrazeProperties brazeProperties) { super(0); this.f11069b = str; this.f11070c = braze; this.f11071d = brazeProperties; } public final void a() { boolean a10; g0 g0Var = new g0(); ?? r12 = this.f11069b; g0Var.f23340a = r12; if (!ValidationUtils.isValidLogCustomEventInput(r12, this.f11070c.getUdm$android_sdk_base_release().l())) { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.f11070c, BrazeLogger.Priority.W, (Throwable) null, new a(g0Var), 2, (Object) null); return; } BrazeProperties brazeProperties = this.f11071d; if (brazeProperties != null && brazeProperties.isInvalid()) { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.f11070c, BrazeLogger.Priority.W, (Throwable) null, new b(g0Var), 2, (Object) null); return; } ?? ensureBrazeFieldLength = ValidationUtils.ensureBrazeFieldLength((String) g0Var.f23340a); g0Var.f23340a = ensureBrazeFieldLength; x1 a11 = bo.app.j.f9166h.a((String) ensureBrazeFieldLength, this.f11071d); if (a11 == null) { return; } if (this.f11070c.isEphemeralEventKey((String) g0Var.f23340a)) { a10 = this.f11070c.getUdm$android_sdk_base_release().l().z(); } else { a10 = this.f11070c.getUdm$android_sdk_base_release().f().a(a11); } if (a10) { this.f11070c.getUdm$android_sdk_base_release().r().a(new d0((String) g0Var.f23340a, this.f11071d, a11)); } } @Override public Object invoke() { a(); return v.f33976a; } } public static final class s1 extends kotlin.jvm.internal.q implements kg.a { final Activity f11074b; final Braze f11075c; public static final class a extends kotlin.jvm.internal.q implements kg.a { public static final a f11076b = new a(); a() { super(0); } @Override public final String invoke() { return "Cannot open session with null activity."; } } s1(Activity activity, Braze braze) { super(0); this.f11074b = activity; this.f11075c = braze; } public final void a() { if (this.f11074b == null) { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this.f11075c, BrazeLogger.Priority.I, (Throwable) null, a.f11076b, 2, (Object) null); } else { this.f11075c.getUdm$android_sdk_base_release().f().openSession(this.f11074b); } } @Override public Object invoke() { a(); return v.f33976a; } } static final class s3 extends kotlin.jvm.internal.q implements kg.a { public static final s3 f11077b = new s3(); s3() { super(0); } @Override public final String invoke() { return "Failed to add subscriber for Content Cards updates."; } } static final class t1 extends kotlin.jvm.internal.q implements kg.a { public static final t1 f11078b = new t1(); t1() { super(0); } @Override public final String invoke() { return "Failed to flush push delivery events"; } } static final class u1 extends kotlin.jvm.internal.q implements kg.a { u1() { super(0); } public final void a() { m5.q0.a(Braze.this.getUdm$android_sdk_base_release().f(), 0L, 1, null); } @Override public Object invoke() { a(); return v.f33976a; } } static final class u2 extends kotlin.jvm.internal.q implements kg.a { final boolean f11080b; u2(boolean z10) { super(0); this.f11080b = z10; } @Override public final String invoke() { return "Failed to request geofence refresh with rate limit ignore: " + this.f11080b; } } public static final class v1 extends kotlin.jvm.internal.q implements kg.a { public static final v1 f11081b = new v1(); v1() { super(0); } @Override public final String invoke() { return "User dependency manager is uninitialized. Not publishing error."; } } static final class v2 extends kotlin.jvm.internal.q implements kg.a { final boolean f11083c; v2(boolean z10) { super(0); this.f11083c = z10; } public final void a() { Braze.this.getUdm$android_sdk_base_release().p().requestGeofenceRefresh(this.f11083c); } @Override public Object invoke() { a(); return v.f33976a; } } public static final class w1 extends kotlin.jvm.internal.q implements kg.a { final Throwable f11084b; w1(Throwable th) { super(0); this.f11084b = th; } @Override public final String invoke() { return "Failed to log throwable: " + this.f11084b; } } static final class w3 extends kotlin.jvm.internal.q implements kg.a { public static final w3 f11085b = new w3(); w3() { super(0); } @Override public final String invoke() { return "Failed to add subscriber for feed updates."; } } public static final class y3 extends kotlin.jvm.internal.q implements kg.a { public static final y3 f11086b = new y3(); y3() { super(0); } @Override public final String invoke() { return "Failed to add subscriber to new in-app messages."; } } static final class z0 extends kotlin.jvm.internal.q implements kg.a { public static final z0 f11087b = new z0(); z0() { super(0); } @Override public final String invoke() { return "Failed to log that the feed was displayed."; } } static final class z1 extends kotlin.jvm.internal.q implements kg.a { final InAppMessageEvent f11088b; z1(InAppMessageEvent inAppMessageEvent) { super(0); this.f11088b = inAppMessageEvent; } @Override public final String invoke() { return "Error reenqueueing In-App Message from event " + this.f11088b; } } static { Set<String> a10; Set<String> d10; a10 = zf.s0.a("calypso appcrawler"); KNOWN_APP_CRAWLER_DEVICE_MODELS = a10; d10 = t0.d("android.permission.ACCESS_NETWORK_STATE", "android.permission.INTERNET"); NECESSARY_BRAZE_SDK_PERMISSIONS = d10; endpointProviderLock = new ReentrantLock(); pendingConfigurations = new ArrayList(); clearConfigSentinel = new BrazeConfig.Builder().build(); } public Braze(Context context) { kotlin.jvm.internal.p.g(context, "context"); long nanoTime = System.nanoTime(); BrazeLogger brazeLogger = BrazeLogger.INSTANCE; BrazeLogger.brazelog$default(brazeLogger, this, (BrazeLogger.Priority) null, (Throwable) null, a.f10908b, 3, (Object) null); Context applicationContext = context.getApplicationContext(); kotlin.jvm.internal.p.f(applicationContext, "context.applicationContext"); this.applicationContext = applicationContext; String str = Build.MODEL; if (str != null) { Set<String> set = KNOWN_APP_CRAWLER_DEVICE_MODELS; String lowerCase = str.toLowerCase(Locale.ROOT); kotlin.jvm.internal.p.f(lowerCase, "this as java.lang.String).toLowerCase(Locale.ROOT)"); if (set.contains(lowerCase)) { BrazeLogger.brazelog$default(brazeLogger, this, BrazeLogger.Priority.I, (Throwable) null, new b(str), 2, (Object) null); Companion.enableMockNetworkRequestsAndDropEventsMode(); } } setImageLoader(new DefaultBrazeImageLoader(this.applicationContext)); this.externalIEventMessenger = new bo.app.e1(Companion.getSdkEnablementProvider(this.applicationContext)); run$android_sdk_base_release(c.f10917b, false, new d(context)); BrazeLogger.brazelog$default(brazeLogger, this, (BrazeLogger.Priority) null, (Throwable) null, new e(System.nanoTime(), nanoTime), 3, (Object) null); } private final ContentCardsUpdatedEvent getCachedContentCardsUpdatedEvent() { return (ContentCardsUpdatedEvent) runForResult$default(this, null, l.f11012b, false, new m(null), 4, null); } public final d2 getDeviceDataProvider() { d2 d2Var = deviceDataProvider; if (d2Var == null) { d2Var = new bo.app.k0(this.applicationContext, getConfigurationProvider$android_sdk_base_release()); } deviceDataProvider = d2Var; return d2Var; } public static final Braze getInstance(Context context) { return Companion.getInstance(context); } public final boolean isEphemeralEventKey(String str) { if (!getConfigurationProvider$android_sdk_base_release().isEphemeralEventsEnabled()) { return false; } BrazeLogger brazeLogger = BrazeLogger.INSTANCE; BrazeLogger.Priority priority = BrazeLogger.Priority.V; BrazeLogger.brazelog$default(brazeLogger, this, priority, (Throwable) null, p0.f11044b, 2, (Object) null); Set<String> ephemeralEventKeys = getConfigurationProvider$android_sdk_base_release().getEphemeralEventKeys(); boolean contains = ephemeralEventKeys.contains(str); BrazeLogger.brazelog$default(brazeLogger, this, priority, (Throwable) null, new q0(str, ephemeralEventKeys, contains), 2, (Object) null); return contains; } public final void publishError(Throwable th) { if (this.udm == null) { BrazeLogger.INSTANCE.brazelog(this, BrazeLogger.Priority.V, th, v1.f11081b); return; } try { getUdm$android_sdk_base_release().e().a(th, Throwable.class); } catch (Exception e10) { BrazeLogger.INSTANCE.brazelog(this, BrazeLogger.Priority.E, e10, new w1(th)); } } public static void run$android_sdk_base_release$default(Braze braze, kg.a aVar, boolean z10, kg.a aVar2, int i10, Object obj) { if ((i10 & 2) != 0) { z10 = true; } braze.run$android_sdk_base_release(aVar, z10, aVar2); } private final <T> T runForResult(T t10, kg.a<String> aVar, boolean z10, kg.p<? super k0, ? super cg.d<? super T>, ? extends Object> pVar) { Object b10; if (!z10 || !Companion.isDisabled()) { try { b10 = vg.h.b(null, new j3(pVar, null), 1, null); return (T) b10; } catch (Exception e10) { BrazeLogger.INSTANCE.brazelog(this, BrazeLogger.Priority.W, e10, aVar); publishError(e10); return t10; } } return t10; } static Object runForResult$default(Braze braze, Object obj, kg.a aVar, boolean z10, kg.p pVar, int i10, Object obj2) { if ((i10 & 4) != 0) { z10 = true; } return braze.runForResult(obj, aVar, z10, pVar); } public final void setSyncPolicyOfflineStatus(boolean z10) { run$android_sdk_base_release$default(this, new q3(z10), false, new r3(z10), 2, null); } public final void setUserSpecificMemberVariablesAndStartDispatch(x6 x6Var) { setUdm$android_sdk_base_release(x6Var); i5.f9159a.a(getUdm$android_sdk_base_release().e()); w6 i10 = getUdm$android_sdk_base_release().i(); bo.app.z1 f10 = getUdm$android_sdk_base_release().f(); t3 t3Var = this.offlineUserStorageProvider; if (t3Var == null) { kotlin.jvm.internal.p.x("offlineUserStorageProvider"); t3Var = null; } this.brazeUser = new BrazeUser(i10, f10, t3Var.a(), getUdm$android_sdk_base_release().o(), getUdm$android_sdk_base_release().l()); getUdm$android_sdk_base_release().t().a(getUdm$android_sdk_base_release().e()); getUdm$android_sdk_base_release().g().d(); getUdm$android_sdk_base_release().m().a(getUdm$android_sdk_base_release().g()); } public final void verifyProperSdkSetup() { boolean t10; boolean z10 = true; for (String str : NECESSARY_BRAZE_SDK_PERMISSIONS) { if (!PermissionUtils.hasPermission(this.applicationContext, str)) { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, BrazeLogger.Priority.W, (Throwable) null, new f4(str), 2, (Object) null); z10 = false; } } t10 = tg.r.t(getConfigurationProvider$android_sdk_base_release().getBrazeApiKey().toString()); if (t10) { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, BrazeLogger.Priority.W, (Throwable) null, g4.f10967b, 2, (Object) null); } else if (z10) { return; } BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, BrazeLogger.Priority.W, (Throwable) null, h4.f10983b, 2, (Object) null); } public final void addSerializedCardJsonToStorage$android_sdk_base_release(String serializedCardJson, String str) { kotlin.jvm.internal.p.g(serializedCardJson, "serializedCardJson"); run$android_sdk_base_release$default(this, new f(str, serializedCardJson), false, new g(serializedCardJson, this, str), 2, null); } public <T> void addSingleSynchronousSubscription(IEventSubscriber<T> subscriber, Class<T> eventClass) { kotlin.jvm.internal.p.g(subscriber, "subscriber"); kotlin.jvm.internal.p.g(eventClass, "eventClass"); try { this.externalIEventMessenger.c(eventClass, subscriber); } catch (Exception e10) { BrazeLogger.INSTANCE.brazelog(this, BrazeLogger.Priority.W, e10, new h(eventClass)); publishError(e10); } } public final void applyPendingRuntimeConfiguration$android_sdk_base_release() { ReentrantLock reentrantLock = brazeClassLock; reentrantLock.lock(); try { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, (BrazeLogger.Priority) null, (Throwable) null, i.f10984b, 3, (Object) null); RuntimeAppConfigurationProvider runtimeAppConfigurationProvider = new RuntimeAppConfigurationProvider(this.applicationContext); for (BrazeConfig brazeConfig : pendingConfigurations) { if (kotlin.jvm.internal.p.b(brazeConfig, clearConfigSentinel)) { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, BrazeLogger.Priority.V, (Throwable) null, j.f10992b, 2, (Object) null); runtimeAppConfigurationProvider.clearAllConfigurationValues(); } else { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, BrazeLogger.Priority.V, (Throwable) null, new k(brazeConfig), 2, (Object) null); runtimeAppConfigurationProvider.setConfiguration(brazeConfig); } } pendingConfigurations.clear(); v vVar = v.f33976a; reentrantLock.unlock(); } catch (Throwable th) { reentrantLock.unlock(); throw th; } } public void changeUser(String str) { changeUser(str, null); } public void closeSession(Activity activity) { run$android_sdk_base_release$default(this, p.f11043b, false, new q(activity, this), 2, null); } public final BrazeConfigurationProvider getConfigurationProvider$android_sdk_base_release() { BrazeConfigurationProvider brazeConfigurationProvider = this.configurationProvider; if (brazeConfigurationProvider != null) { return brazeConfigurationProvider; } kotlin.jvm.internal.p.x("configurationProvider"); return null; } public int getContentCardUnviewedCount() { if (Companion.isDisabled()) { return -1; } ContentCardsUpdatedEvent cachedContentCardsUpdatedEvent = getCachedContentCardsUpdatedEvent(); if (cachedContentCardsUpdatedEvent != null) { return cachedContentCardsUpdatedEvent.getUnviewedCardCount(); } BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, BrazeLogger.Priority.W, (Throwable) null, f0.f10948b, 2, (Object) null); return -1; } public BrazeUser getCurrentUser() { return (BrazeUser) runForResult(null, r.f11060b, false, new s(null)); } public final e2 getDeviceIdProvider$android_sdk_base_release() { e2 e2Var = this.deviceIdProvider; if (e2Var != null) { return e2Var; } kotlin.jvm.internal.p.x("deviceIdProvider"); return null; } public final bo.app.i2 getExternalIEventMessenger$android_sdk_base_release() { return this.externalIEventMessenger; } public IBrazeImageLoader getImageLoader() { IBrazeImageLoader iBrazeImageLoader = this.imageLoader; if (iBrazeImageLoader != null) { return iBrazeImageLoader; } kotlin.jvm.internal.p.x("imageLoader"); return null; } public final k4 getPushDeliveryManager$android_sdk_base_release() { k4 k4Var = this.pushDeliveryManager; if (k4Var != null) { return k4Var; } kotlin.jvm.internal.p.x("pushDeliveryManager"); return null; } public final bo.app.a3 getUdm$android_sdk_base_release() { bo.app.a3 a3Var = this.udm; if (a3Var != null) { return a3Var; } kotlin.jvm.internal.p.x("udm"); return null; } public final void handleInAppMessageTestPush$android_sdk_base_release(Intent intent) { kotlin.jvm.internal.p.g(intent, "intent"); run$android_sdk_base_release$default(this, n0.f11021b, false, new o0(intent, this), 2, null); } public final Boolean isApiKeyPresent$android_sdk_base_release() { return this.isApiKeyPresent; } public void logCustomEvent(String str) { logCustomEvent(str, null); } public void logFeedDisplayed() { run$android_sdk_base_release$default(this, z0.f11087b, false, new a1(), 2, null); } public void logPurchase(String str, String str2, BigDecimal bigDecimal, int i10, BrazeProperties brazeProperties) { BrazeProperties brazeProperties2; if (brazeProperties != null) { brazeProperties2 = brazeProperties.clone(); } else { brazeProperties2 = null; } run$android_sdk_base_release$default(this, new d1(str), false, new e1(str, str2, bigDecimal, i10, this, brazeProperties2), 2, null); } public final void logPushDelivery$android_sdk_base_release(String campaignId, long j10) { kotlin.jvm.internal.p.g(campaignId, "campaignId"); run$android_sdk_base_release$default(this, new f1(campaignId), false, new g1(campaignId, j10), 2, null); } public final void logPushMaxCampaign$android_sdk_base_release(String campaign) { kotlin.jvm.internal.p.g(campaign, "campaign"); run$android_sdk_base_release$default(this, h1.f10975b, false, new i1(campaign), 2, null); } public void logPushNotificationActionClicked(String str, String str2, String str3) { run$android_sdk_base_release$default(this, j1.f10993b, false, new k1(str, this, str2, str3), 2, null); } public void logPushNotificationOpened(Intent intent) { run$android_sdk_base_release$default(this, new n1(intent), false, new o1(intent, this), 2, null); } public void logPushStoryPageClicked(String str, String str2) { run$android_sdk_base_release$default(this, new p1(str2, str), false, new q1(str, str2, this), 2, null); } public void openSession(Activity activity) { run$android_sdk_base_release$default(this, r1.f11062b, false, new s1(activity, this), 2, null); } public final void performPushDeliveryFlush$android_sdk_base_release() { run$android_sdk_base_release$default(this, t1.f11078b, false, new u1(), 2, null); } public final void publishBrazePushAction$android_sdk_base_release(BrazePushEventType pushActionType, BrazeNotificationPayload payload) { kotlin.jvm.internal.p.g(pushActionType, "pushActionType"); kotlin.jvm.internal.p.g(payload, "payload"); this.externalIEventMessenger.a(new BrazePushEvent(pushActionType, payload), BrazePushEvent.class); } public final void reenqueueInAppMessage$android_sdk_base_release(InAppMessageEvent event) { kotlin.jvm.internal.p.g(event, "event"); run$android_sdk_base_release$default(this, new z1(event), false, new a2(event), 2, null); } public void refreshFeatureFlags() { run$android_sdk_base_release$default(this, b2.f10914b, false, new c2(), 2, null); } public <T> void removeSingleSubscription(IEventSubscriber<T> iEventSubscriber, Class<T> eventClass) { kotlin.jvm.internal.p.g(eventClass, "eventClass"); if (iEventSubscriber != null) { try { boolean d10 = this.externalIEventMessenger.d(eventClass, iEventSubscriber); BrazeLogger brazeLogger = BrazeLogger.INSTANCE; BrazeLogger.Priority priority = BrazeLogger.Priority.V; BrazeLogger.brazelog$default(brazeLogger, this, priority, (Throwable) null, new h2(eventClass, iEventSubscriber, d10), 2, (Object) null); BrazeLogger.brazelog$default(brazeLogger, this, priority, (Throwable) null, new i2(eventClass, iEventSubscriber, this.externalIEventMessenger.b(eventClass, iEventSubscriber)), 2, (Object) null); } catch (Exception e10) { BrazeLogger.INSTANCE.brazelog(this, BrazeLogger.Priority.W, e10, new j2(eventClass)); publishError(e10); } } } public void requestContentCardsRefresh() { run$android_sdk_base_release$default(this, k2.f11010b, false, new l2(), 2, null); } public void requestContentCardsRefreshFromCache() { run$android_sdk_base_release$default(this, m2.f11019b, false, new n2(), 2, null); } public void requestFeedRefresh() { run$android_sdk_base_release$default(this, o2.f11042b, false, new p2(), 2, null); } public void requestFeedRefreshFromCache() { run$android_sdk_base_release$default(this, q2.f11058b, false, new r2(), 2, null); } public final void requestGeofenceRefresh$android_sdk_base_release(boolean z10) { run$android_sdk_base_release$default(this, new u2(z10), false, new v2(z10), 2, null); } public void requestImmediateDataFlush() { run$android_sdk_base_release$default(this, a3.f10912b, false, new b3(), 2, null); } public final void retryInAppMessage$android_sdk_base_release(InAppMessageEvent event) { kotlin.jvm.internal.p.g(event, "event"); run$android_sdk_base_release$default(this, new f3(event), false, new g3(event), 2, null); } public final void run$android_sdk_base_release(kg.a aVar, boolean z10, kg.a block) { kotlin.jvm.internal.p.g(block, "block"); if (!z10 || !Companion.isDisabled()) { try { vg.i.d(i5.f9159a, null, null, new h3(block, null), 3, null); } catch (Exception e10) { if (aVar == null) { BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, (BrazeLogger.Priority) null, e10, i3.f10991b, 1, (Object) null); } else { BrazeLogger.INSTANCE.brazelog(this, BrazeLogger.Priority.W, e10, (kg.a<String>) aVar); } publishError(e10); } } } public final void schedulePushDelivery$android_sdk_base_release(long j10) { run$android_sdk_base_release$default(this, k3.f11011b, false, new l3(j10), 2, null); } public final void setApiKeyPresent$android_sdk_base_release(Boolean bool) { this.isApiKeyPresent = bool; } public final void setConfigurationProvider$android_sdk_base_release(BrazeConfigurationProvider brazeConfigurationProvider) { kotlin.jvm.internal.p.g(brazeConfigurationProvider, "<set-?>"); this.configurationProvider = brazeConfigurationProvider; } public final void setDeviceIdProvider$android_sdk_base_release(e2 e2Var) { kotlin.jvm.internal.p.g(e2Var, "<set-?>"); this.deviceIdProvider = e2Var; } public void setImageLoader(IBrazeImageLoader iBrazeImageLoader) { kotlin.jvm.internal.p.g(iBrazeImageLoader, "<set-?>"); this.imageLoader = iBrazeImageLoader; } public final void setPushDeliveryManager$android_sdk_base_release(k4 k4Var) { kotlin.jvm.internal.p.g(k4Var, "<set-?>"); this.pushDeliveryManager = k4Var; } public void setRegisteredPushToken(String str) { run$android_sdk_base_release$default(this, new f2(str), false, new g2(str), 2, null); } public final void setUdm$android_sdk_base_release(bo.app.a3 a3Var) { kotlin.jvm.internal.p.g(a3Var, "<set-?>"); this.udm = a3Var; } public void subscribeToContentCardsUpdates(IEventSubscriber<ContentCardsUpdatedEvent> subscriber) { kotlin.jvm.internal.p.g(subscriber, "subscriber"); try { this.externalIEventMessenger.a(ContentCardsUpdatedEvent.class, subscriber); } catch (Exception e10) { BrazeLogger.INSTANCE.brazelog(this, BrazeLogger.Priority.W, e10, s3.f11077b); publishError(e10); } } public void subscribeToFeedUpdates(IEventSubscriber<FeedUpdatedEvent> subscriber) { kotlin.jvm.internal.p.g(subscriber, "subscriber"); try { this.externalIEventMessenger.a(FeedUpdatedEvent.class, subscriber); } catch (Exception e10) { BrazeLogger.INSTANCE.brazelog(this, BrazeLogger.Priority.W, e10, w3.f11085b); publishError(e10); } } public void subscribeToNewInAppMessages(IEventSubscriber<InAppMessageEvent> subscriber) { kotlin.jvm.internal.p.g(subscriber, "subscriber"); try { this.externalIEventMessenger.a(InAppMessageEvent.class, subscriber); } catch (Exception e10) { BrazeLogger.INSTANCE.brazelog(this, BrazeLogger.Priority.W, e10, y3.f11086b); publishError(e10); } } public final boolean validateAndStorePushId$android_sdk_base_release(String pushId) { kotlin.jvm.internal.p.g(pushId, "pushId"); return ((Boolean) runForResult$default(this, Boolean.TRUE, d4.f10932b, false, new e4(pushId, null), 4, null)).booleanValue(); } public void changeUser(String str, String str2) { run$android_sdk_base_release$default(this, new n(str), false, new o(str, this, str2), 2, null); } public void getCurrentUser(IValueCallback<BrazeUser> completionCallback) { kotlin.jvm.internal.p.g(completionCallback, "completionCallback"); if (!Companion.isDisabled()) { try { vg.i.d(i5.f9159a, null, null, new h0(completionCallback, this, null), 3, null); return; } catch (Exception e10) { BrazeLogger.INSTANCE.brazelog(this, BrazeLogger.Priority.W, e10, i0.f10985b); completionCallback.onError(); publishError(e10); return; } } completionCallback.onError(); } public void logCustomEvent(String str, BrazeProperties brazeProperties) { run$android_sdk_base_release$default(this, new r0(str), false, new s0(str, this, brazeProperties != null ? brazeProperties.clone() : null), 2, null); } }