导航菜单

页面标题

页面副标题

Baubap v3.9.7 - BrazeConfigurationProvider.java 源代码

正在查看: Baubap v3.9.7 应用的 BrazeConfigurationProvider.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.braze.configuration;

import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.os.Build;
import bo.app.c1;
import com.braze.configuration.CachedConfigurationProvider;
import com.braze.enums.BrazeSdkMetadata;
import com.braze.enums.DeviceKey;
import com.braze.enums.LocationProviderName;
import com.braze.enums.SdkFlavor;
import com.braze.support.BrazeLogger;
import com.braze.support.PackageUtils;
import java.util.EnumSet;
import java.util.HashSet;
import java.util.Locale;
import java.util.NoSuchElementException;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import kotlin.jvm.internal.a0;
import n30.s;
import n30.w;

public class BrazeConfigurationProvider extends CachedConfigurationProvider {
    public static final a Companion = new a(null);
    public static final int DEFAULT_IN_APP_MESSAGE_WEBVIEW_ONPAGEFINISHED_WAIT_MS = (int) TimeUnit.SECONDS.toMillis(15);
    public static final String DEFAULT_NOTIFICATION_CHANNEL_DESCRIPTION_DEFAULT_VALUE = "";
    public static final String DEFAULT_NOTIFICATION_CHANNEL_NAME_DEFAULT_VALUE = "General";
    private static final int DEFAULT_SESSION_TIMEOUT_SECONDS = 10;
    private static final int DEFAULT_TRIGGER_MINIMUM_INTERVAL = 30;
    public static final int MAX_ALLOWED_EPHEMERAL_EVENTS = 12;
    private final Context context;

    public static final class a {
        public a(kotlin.jvm.internal.f fVar) {
            this();
        }

        private a() {
        }
    }

    public enum b {
        EPHEMERAL_EVENTS_ENABLED("com_braze_ephemeral_events_enabled"),
        EPHEMERAL_EVENTS_KEYS("com_braze_ephemeral_events_keys"),
        API_KEY("com_braze_api_key"),
        SERVER_TARGET_KEY("com_braze_server_target"),
        ADM_MESSAGING_REGISTRATION_ENABLED_KEY("com_braze_push_adm_messaging_registration_enabled"),
        SMALL_NOTIFICATION_ICON_KEY("com_braze_push_small_notification_icon"),
        LARGE_NOTIFICATION_ICON_KEY("com_braze_push_large_notification_icon"),
        SESSION_TIMEOUT_KEY("com_braze_session_timeout"),
        ENABLE_LOCATION_COLLECTION_KEY("com_braze_enable_location_collection"),
        DEFAULT_NOTIFICATION_ACCENT_COLOR_KEY("com_braze_default_notification_accent_color"),
        TRIGGER_ACTION_MINIMUM_TIME_INTERVAL_KEY_SECONDS("com_braze_trigger_action_minimum_time_interval_seconds"),
        HANDLE_PUSH_DEEP_LINKS_AUTOMATICALLY("com_braze_handle_push_deep_links_automatically"),
        NEWSFEED_UNREAD_VISUAL_INDICATOR_ON("com_braze_newsfeed_unread_visual_indicator_on"),
        SDK_FLAVOR("com_braze_sdk_flavor"),
        CUSTOM_ENDPOINT("com_braze_custom_endpoint"),
        DEFAULT_NOTIFICATION_CHANNEL_NAME("com_braze_default_notification_channel_name"),
        DEFAULT_NOTIFICATION_CHANNEL_DESCRIPTION("com_braze_default_notification_channel_description"),
        PUSH_DEEP_LINK_BACK_STACK_ACTIVITY_ENABLED_KEY("com_braze_push_deep_link_back_stack_activity_enabled"),
        PUSH_DEEP_LINK_BACK_STACK_ACTIVITY_CLASS_NAME_KEY("com_braze_push_deep_link_back_stack_activity_class_name"),
        SESSION_START_BASED_TIMEOUT_ENABLED_KEY("com_braze_session_start_based_timeout_enabled"),
        FIREBASE_CLOUD_MESSAGING_REGISTRATION_ENABLED_KEY("com_braze_firebase_cloud_messaging_registration_enabled"),
        FIREBASE_CLOUD_MESSAGING_SENDER_ID_KEY("com_braze_firebase_cloud_messaging_sender_id"),
        CONTENT_CARDS_UNREAD_VISUAL_INDICATOR_ENABLED("com_braze_content_cards_unread_visual_indicator_enabled"),
        DEVICE_OBJECT_ALLOWLISTING_ENABLED_KEY("com_braze_device_object_whitelisting_enabled"),
        DEVICE_OBJECT_ALLOWLIST_VALUE("com_braze_device_object_whitelist"),
        IN_APP_MESSAGE_ACCESSIBILITY_EXCLUSIVE_MODE_ENABLED("com_braze_device_in_app_message_accessibility_exclusive_mode_enabled"),
        PUSH_WAKE_SCREEN_FOR_NOTIFICATION_ENABLED("com_braze_push_wake_screen_for_notification_enabled"),
        PUSH_NOTIFICATION_HTML_RENDERING_ENABLED("com_braze_push_notification_html_rendering_enabled"),
        DOES_PUSH_STORY_DISMISS_ON_CLICK("com_braze_does_push_story_dismiss_on_click"),
        GEOFENCES_ENABLED("com_braze_geofences_enabled"),
        IN_APP_MESSAGE_PUSH_TEST_EAGER_DISPLAY("com_braze_in_app_message_push_test_eager_display_enabled"),
        LOGGER_INITIAL_LOG_LEVEL("com_braze_logger_initial_log_level"),
        CUSTOM_HTML_WEBVIEW_ACTIVITY_CLASS_NAME_KEY("com_braze_custom_html_webview_activity_class_name"),
        GEOFENCES_AUTOMATIC_REQUESTS_ENABLED_KEY("com_braze_automatic_geofence_requests_enabled"),
        CUSTOM_LOCATION_PROVIDERS_LIST_KEY("com_braze_custom_location_providers_list"),
        IN_APP_MESSAGE_WEBVIEW_CLIENT_MAX_ONPAGEFINISHED_WAIT_KEY("com_braze_in_app_message_webview_client_max_onpagefinished_wait_ms"),
        FIREBASE_MESSAGING_SERVICE_AUTOMATICALLY_REGISTER_ON_NEW_TOKEN_KEY("com_braze_firebase_messaging_service_automatically_register_on_new_token"),
        SDK_AUTH_ENABLED("com_braze_sdk_authentication_enabled"),
        REQUIRE_TOUCH_MODE_FOR_HTML_IAMS_KEY("com_braze_require_touch_mode_for_html_in_app_messages"),
        DATA_SYNC_BAD_NETWORK_INTERVAL_KEY("com_braze_data_flush_interval_bad_network"),
        DATA_SYNC_GOOD_NETWORK_INTERVAL_KEY("com_braze_data_flush_interval_good_network"),
        DATA_SYNC_GREAT_NETWORK_INTERVAL_KEY("com_braze_data_flush_interval_great_network"),
        FALLBACK_FCM_SERVICE_ENABLED("com_braze_fallback_firebase_cloud_messaging_service_enabled"),
        FALLBACK_FCM_SERVICE_CLASSPATH("com_braze_fallback_firebase_cloud_messaging_service_classpath"),
        OPTIN_WHEN_PUSH_AUTHORIZED("com_braze_optin_when_push_authorized"),
        SDK_METADATA_INTERNAL_KEY("com_braze_internal_sdk_metadata"),
        SDK_METADATA_PUBLIC_KEY("com_braze_sdk_metadata"),
        HTML_IN_APP_MESSAGE_APPLY_WINDOW_INSETS("com_braze_html_in_app_message_apply_insets"),
        HTML_IN_APP_MESSAGE_ENABLE_HTML_LINK_TARGET("com_braze_html_in_app_message_enable_html_link_target"),
        USE_WINDOW_FLAG_SECURE_IN_ACTIVITIES("com_braze_use_activity_window_flag_secure");

        private final String b;

        b(String str) {
            this.b = str;
        }

        public final String b() {
            return this.b;
        }
    }

    public static final class c extends kotlin.jvm.internal.l implements y30.a {
        final String b;

        public c(String str) {
            super(0);
            this.b = str;
        }

        public final String invoke() {
            return "Couldn't find application icon for package: " + this.b;
        }
    }

    public static final class d extends kotlin.jvm.internal.l implements y30.a {
        public static final d b = new d();

        public d() {
            super(0);
        }

        public final String invoke() {
            return "****************************************************";
        }
    }

    public static final class e extends kotlin.jvm.internal.l implements y30.a {
        public static final e b = new e();

        public e() {
            super(0);
        }

        public final String invoke() {
            return "Found an override api key. Using it to configure the Braze SDK";
        }
    }

    public static final class f extends kotlin.jvm.internal.l implements y30.a {
        public static final f b = new f();

        public f() {
            super(0);
        }

        public final String invoke() {
            return "****************************************************";
        }
    }

    public static final class g extends kotlin.jvm.internal.l implements y30.a {
        public static final g b = new g();

        public g() {
            super(0);
        }

        public final String invoke() {
            return "**                                                **";
        }
    }

    public static final class h extends kotlin.jvm.internal.l implements y30.a {
        public static final h b = new h();

        public h() {
            super(0);
        }

        public final String invoke() {
            return "**                 !! WARNING !!                  **";
        }
    }

    public static final class i extends kotlin.jvm.internal.l implements y30.a {
        public static final i b = new i();

        public i() {
            super(0);
        }

        public final String invoke() {
            return "**                                                **";
        }
    }

    public static final class j extends kotlin.jvm.internal.l implements y30.a {
        public static final j b = new j();

        public j() {
            super(0);
        }

        public final String invoke() {
            return "**     No API key set in res/values/braze.xml     **";
        }
    }

    public static final class k extends kotlin.jvm.internal.l implements y30.a {
        public static final k b = new k();

        public k() {
            super(0);
        }

        public final String invoke() {
            return "** No cached API Key found from Braze.configure   **";
        }
    }

    public static final class l extends kotlin.jvm.internal.l implements y30.a {
        public static final l b = new l();

        public l() {
            super(0);
        }

        public final String invoke() {
            return "**          Braze functionality disabled          **";
        }
    }

    public static final class m extends kotlin.jvm.internal.l implements y30.a {
        public static final m b = new m();

        public m() {
            super(0);
        }

        public final String invoke() {
            return "**                                                **";
        }
    }

    public static final class n extends kotlin.jvm.internal.l implements y30.a {
        public static final n b = new n();

        public n() {
            super(0);
        }

        public final String invoke() {
            return "Using default notification accent color found in resources";
        }
    }

    public static final class o extends kotlin.jvm.internal.l implements y30.a {
        public static final o b = new o();

        public o() {
            super(0);
        }

        public final String invoke() {
            return "More than 12 ephemeral/graylisted events detected. Only using first 12 events. Please truncate this list!";
        }
    }

    public static final class p extends kotlin.jvm.internal.l implements y30.a {
        public static final p b = new p();

        public p() {
            super(0);
        }

        public final String invoke() {
            return "Exception while parsing stored SDK flavor. Returning null.";
        }
    }

    public static final class q extends kotlin.jvm.internal.l implements y30.a {
        public static final q b = new q();

        public q() {
            super(0);
        }

        public final String invoke() {
            return "Unable to read the version code.";
        }
    }

    public BrazeConfigurationProvider(Context context) {
        super(context, false, null, 6, null);
        xu.b.y(context, "context");
        Context applicationContext = context.getApplicationContext();
        xu.b.x(applicationContext, "context.applicationContext");
        this.context = applicationContext;
    }

    public static void getContext$android_sdk_base_release$annotations() {
    }

    public static void getDefaultNotificationAccentColor$annotations() {
    }

    private final <E extends Enum<E>> EnumSet<E> getGenericEnumSetFromStringSet(Class<E> cls, b bVar) {
        String b2 = bVar.b();
        if (getConfigurationCache().containsKey(b2)) {
            Object obj = getConfigurationCache().get(b2);
            xu.b.w(obj, "null cannot be cast to non-null type java.util.EnumSet<E of com.braze.configuration.BrazeConfigurationProvider.getGenericEnumSetFromStringSet>");
            return (EnumSet) obj;
        }
        Set<String> stringSetValue = getStringSetValue(bVar.b(), new HashSet());
        if (stringSetValue == null) {
            stringSetValue = new HashSet<>();
        }
        EnumSet<E> a2 = com.braze.support.c.a(cls, stringSetValue);
        getConfigurationCache().put(b2, a2);
        return a2;
    }

    private final String getServerTarget() {
        String stringValue = getStringValue(b.SERVER_TARGET_KEY.b(), "PROD");
        return stringValue == null ? "PROD" : stringValue;
    }

    private static void getServerTarget$annotations() {
    }

    public static void getVersionCode$annotations() {
    }

    public final void clear() {
        getConfigurationCache().clear();
        getRuntimeAppConfigurationProvider().getStorageMap().edit().clear().apply();
    }

    public final int getApplicationIconResourceId() {
        int i2;
        if (getConfigurationCache().containsKey("application_icon")) {
            Object obj = getConfigurationCache().get("application_icon");
            xu.b.w(obj, "null cannot be cast to non-null type kotlin.Int");
            return ((Integer) obj).intValue();
        }
        String packageName = this.context.getPackageName();
        try {
            ApplicationInfo a2 = Build.VERSION.SDK_INT >= 33 ? androidx.activity.p.a(this.context.getPackageManager(), packageName, androidx.activity.p.c()) : this.context.getPackageManager().getApplicationInfo(packageName, 0);
            xu.b.x(a2, "if (Build.VERSION.SDK_IN… 0)\n                    }");
            i2 = a2.icon;
        } catch (Exception e2) {
            BrazeLogger.INSTANCE.brazelog(this, BrazeLogger.Priority.E, e2, new c(packageName));
            i2 = 0;
        }
        getConfigurationCache().put("application_icon", Integer.valueOf(i2));
        return i2;
    }

    public final String getBaseUrlForRequests() {
        String serverTarget = getServerTarget();
        Locale locale = Locale.US;
        xu.b.x(locale, "US");
        String upperCase = serverTarget.toUpperCase(locale);
        xu.b.x(upperCase, "this as java.lang.String).toUpperCase(locale)");
        return xu.b.n("STAGING", upperCase) ? "https://sondheim.braze.com/api/v3/" : "https://sdk.iad-01.braze.com/api/v3/";
    }

    public final bo.app.h getBrazeApiKey() {
        String b2 = b.API_KEY.b();
        String str = (String) getConfigurationCache().get(b2);
        if (str == null) {
            str = getRuntimeAppConfigurationProvider().getStringValue(b2, null);
            if (str != null) {
                BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, BrazeLogger.Priority.I, (Throwable) null, e.b, 2, (Object) null);
            } else {
                str = getStringValue(b2, null);
            }
            if (str != null) {
                getConfigurationCache().put(b2, str);
            }
        }
        if (str != null) {
            return new bo.app.h(str);
        }
        BrazeLogger brazeLogger = BrazeLogger.INSTANCE;
        BrazeLogger.Priority priority = BrazeLogger.Priority.W;
        BrazeLogger.brazelog$default(brazeLogger, this, priority, (Throwable) null, f.b, 2, (Object) null);
        BrazeLogger.brazelog$default(brazeLogger, this, priority, (Throwable) null, g.b, 2, (Object) null);
        BrazeLogger.brazelog$default(brazeLogger, this, priority, (Throwable) null, h.b, 2, (Object) null);
        BrazeLogger.brazelog$default(brazeLogger, this, priority, (Throwable) null, i.b, 2, (Object) null);
        BrazeLogger.brazelog$default(brazeLogger, this, priority, (Throwable) null, j.b, 2, (Object) null);
        BrazeLogger.brazelog$default(brazeLogger, this, priority, (Throwable) null, k.b, 2, (Object) null);
        BrazeLogger.brazelog$default(brazeLogger, this, priority, (Throwable) null, l.b, 2, (Object) null);
        BrazeLogger.brazelog$default(brazeLogger, this, priority, (Throwable) null, m.b, 2, (Object) null);
        BrazeLogger.brazelog$default(brazeLogger, this, priority, (Throwable) null, d.b, 2, (Object) null);
        throw new RuntimeException("Unable to read the Braze API key from the res/values/braze.xml file or from runtime configuration via BrazeConfig. See log for more details.");
    }

    public final Context getContext$android_sdk_base_release() {
        return this.context;
    }

    public final String getCustomEndpoint() {
        return getStringValue(b.CUSTOM_ENDPOINT.b(), null);
    }

    public final String getCustomHtmlWebViewActivityClassName() {
        return getStringValue(b.CUSTOM_HTML_WEBVIEW_ACTIVITY_CLASS_NAME_KEY.b(), "");
    }

    public final EnumSet<LocationProviderName> getCustomLocationProviderNames() {
        return getGenericEnumSetFromStringSet(LocationProviderName.class, b.CUSTOM_LOCATION_PROVIDERS_LIST_KEY);
    }

    public final int getDefaultNotificationAccentColor() {
        Integer colorValue = getColorValue(b.DEFAULT_NOTIFICATION_ACCENT_COLOR_KEY.b());
        if (colorValue == null) {
            return 0;
        }
        BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, (BrazeLogger.Priority) null, (Throwable) null, n.b, 3, (Object) null);
        return colorValue.intValue();
    }

    public final String getDefaultNotificationChannelDescription() {
        String stringValue = getStringValue(b.DEFAULT_NOTIFICATION_CHANNEL_DESCRIPTION.b(), "");
        return stringValue == null ? "" : stringValue;
    }

    public final String getDefaultNotificationChannelName() {
        String stringValue = getStringValue(b.DEFAULT_NOTIFICATION_CHANNEL_NAME.b(), DEFAULT_NOTIFICATION_CHANNEL_NAME_DEFAULT_VALUE);
        return stringValue == null ? DEFAULT_NOTIFICATION_CHANNEL_NAME_DEFAULT_VALUE : stringValue;
    }

    public final EnumSet<DeviceKey> getDeviceObjectAllowlist() {
        return getGenericEnumSetFromStringSet(DeviceKey.class, b.DEVICE_OBJECT_ALLOWLIST_VALUE);
    }

    public final EnumSet<DeviceKey> getDeviceObjectWhitelist() {
        return getDeviceObjectAllowlist();
    }

    public final boolean getDoesHandlePushDeepLinksAutomatically() {
        return getBooleanValue(b.HANDLE_PUSH_DEEP_LINKS_AUTOMATICALLY.b(), false);
    }

    public final boolean getDoesPushStoryDismissOnClick() {
        return getBooleanValue(b.DOES_PUSH_STORY_DISMISS_ON_CLICK.b(), true);
    }

    public final Set<String> getEphemeralEventKeys() {
        String b2 = b.EPHEMERAL_EVENTS_KEYS.b();
        Set<String> set = w.b;
        Set<String> stringSetValue = getStringSetValue(b2, set);
        if (stringSetValue != null) {
            set = stringSetValue;
        }
        if (set.size() > 12) {
            BrazeLogger.brazelog$default(BrazeLogger.INSTANCE, this, BrazeLogger.Priority.W, (Throwable) null, o.b, 2, (Object) null);
        }
        return s.D1(s.u1(set, 12));
    }

    public final String getFallbackFirebaseMessagingServiceClasspath() {
        return getStringValue(b.FALLBACK_FCM_SERVICE_CLASSPATH.b(), null);
    }

    public final String getFirebaseCloudMessagingSenderIdKey() {
        return getStringValue(b.FIREBASE_CLOUD_MESSAGING_SENDER_ID_KEY.b(), null);
    }

    public final int getInAppMessageWebViewClientOnPageFinishedMaxWaitMs() {
        return getIntValue(b.IN_APP_MESSAGE_WEBVIEW_CLIENT_MAX_ONPAGEFINISHED_WAIT_KEY.b(), DEFAULT_IN_APP_MESSAGE_WEBVIEW_ONPAGEFINISHED_WAIT_MS);
    }

    public final int getLargeNotificationIconResourceId() {
        return getDrawableValue(b.LARGE_NOTIFICATION_ICON_KEY.b(), 0);
    }

    public final int getLoggerInitialLogLevel() {
        return getIntValue(b.LOGGER_INITIAL_LOG_LEVEL.b(), 4);
    }

    public final String getPushDeepLinkBackStackActivityClassName() {
        return getStringValue(b.PUSH_DEEP_LINK_BACK_STACK_ACTIVITY_CLASS_NAME_KEY.b(), "");
    }

    public final SdkFlavor getSdkFlavor() {
        String stringValue = getStringValue(b.SDK_FLAVOR.b(), null);
        if (stringValue == null || h40.q.R(stringValue)) {
            return null;
        }
        try {
            Locale locale = Locale.US;
            xu.b.x(locale, "US");
            String upperCase = stringValue.toUpperCase(locale);
            xu.b.x(upperCase, "this as java.lang.String).toUpperCase(locale)");
            return SdkFlavor.valueOf(upperCase);
        } catch (Exception e2) {
            BrazeLogger.INSTANCE.brazelog(this, BrazeLogger.Priority.E, e2, p.b);
            return null;
        }
    }

    public final EnumSet<BrazeSdkMetadata> getSdkMetadata() {
        String upperCase;
        int i2;
        String b2 = b.SDK_METADATA_INTERNAL_KEY.b();
        CachedConfigurationProvider.b bVar = CachedConfigurationProvider.b.STRING_ARRAY;
        Object resourceConfigurationValue = getResourceConfigurationValue(bVar, b2, new HashSet());
        xu.b.w(resourceConfigurationValue, "null cannot be cast to non-null type kotlin.collections.MutableSet<kotlin.String>");
        if ((resourceConfigurationValue instanceof z30.a) && !(resourceConfigurationValue instanceof z30.f)) {
            a0.s(resourceConfigurationValue, "kotlin.collections.MutableSet");
            throw null;
        }
        try {
            Set<String> set = (Set) resourceConfigurationValue;
            String b3 = b.SDK_METADATA_PUBLIC_KEY.b();
            Object resourceConfigurationValue2 = getResourceConfigurationValue(bVar, b3, new HashSet());
            xu.b.w(resourceConfigurationValue2, "null cannot be cast to non-null type kotlin.collections.Set<kotlin.String>");
            Object runtimeConfigurationValue = getRuntimeConfigurationValue(bVar, b3, new HashSet());
            xu.b.w(runtimeConfigurationValue, "null cannot be cast to non-null type kotlin.collections.Set<kotlin.String>");
            set.addAll((Set) resourceConfigurationValue2);
            set.addAll((Set) runtimeConfigurationValue);
            com.braze.support.c cVar = com.braze.support.c.a;
            EnumSet<BrazeSdkMetadata> noneOf = EnumSet.noneOf(BrazeSdkMetadata.class);
            for (String str : set) {
                try {
                    com.braze.support.c cVar2 = com.braze.support.c.a;
                    Locale locale = Locale.US;
                    xu.b.x(locale, "US");
                    upperCase = str.toUpperCase(locale);
                    xu.b.x(upperCase, "this as java.lang.String).toUpperCase(locale)");
                } catch (Exception e2) {
                    BrazeLogger.INSTANCE.brazelog((Object) com.braze.support.c.a, BrazeLogger.Priority.E, (Throwable) e2, (y30.a) new c1(str));
                }
                for (BrazeSdkMetadata brazeSdkMetadata : BrazeSdkMetadata.values()) {
                    if (xu.b.n(brazeSdkMetadata.name(), upperCase)) {
                        noneOf.add(brazeSdkMetadata);
                    }
                }
                throw new NoSuchElementException("Array contains no element matching the predicate.");
            }
            xu.b.x(noneOf, "result");
            return noneOf;
        } catch (ClassCastException e3) {
            xu.b.l0(a0.class.getName(), e3);
            throw e3;
        }
    }

    public final int getSessionTimeoutSeconds() {
        return getIntValue(b.SESSION_TIMEOUT_KEY.b(), 10);
    }

    public final boolean getShouldOptInWhenPushAuthorized() {
        return getBooleanValue(b.OPTIN_WHEN_PUSH_AUTHORIZED.b(), true);
    }

    public final boolean getShouldUseWindowFlagSecureInActivities() {
        return getBooleanValue(b.USE_WINDOW_FLAG_SECURE_IN_ACTIVITIES.b(), false);
    }

    public final int getSmallNotificationIconResourceId() {
        return getDrawableValue(b.SMALL_NOTIFICATION_ICON_KEY.b(), 0);
    }

    public final long getTriggerActionMinimumTimeIntervalInSeconds() {
        return getIntValue(b.TRIGGER_ACTION_MINIMUM_TIME_INTERVAL_KEY_SECONDS.b(), DEFAULT_TRIGGER_MINIMUM_INTERVAL);
    }

    public final int getVersionCode() {
        int i2;
        if (getConfigurationCache().containsKey("version_code")) {
            Object obj = getConfigurationCache().get("version_code");
            xu.b.w(obj, "null cannot be cast to non-null type kotlin.Int");
            return ((Integer) obj).intValue();
        }
        try {
            i2 = this.context.getPackageManager().getPackageInfo(PackageUtils.getResourcePackageName(this.context), 0).versionCode;
        } catch (Exception e2) {
            BrazeLogger.INSTANCE.brazelog(this, BrazeLogger.Priority.E, e2, q.b);
            i2 = -1;
        }
        getConfigurationCache().put("version_code", Integer.valueOf(i2));
        return i2;
    }

    public final boolean isAdmMessagingRegistrationEnabled() {
        return getBooleanValue(b.ADM_MESSAGING_REGISTRATION_ENABLED_KEY.b(), false);
    }

    public final boolean isAutomaticGeofenceRequestsEnabled() {
        return getBooleanValue(b.GEOFENCES_AUTOMATIC_REQUESTS_ENABLED_KEY.b(), true);
    }

    public final boolean isContentCardsUnreadVisualIndicatorEnabled() {
        return getBooleanValue(b.CONTENT_CARDS_UNREAD_VISUAL_INDICATOR_ENABLED.b(), true);
    }

    public final boolean isDeviceObjectAllowlistEnabled() {
        return getBooleanValue(b.DEVICE_OBJECT_ALLOWLISTING_ENABLED_KEY.b(), false);
    }

    public final boolean isDeviceObjectWhitelistEnabled() {
        return isDeviceObjectAllowlistEnabled();
    }

    public final boolean isEphemeralEventsEnabled() {
        return getBooleanValue(b.EPHEMERAL_EVENTS_ENABLED.b(), false);
    }

    public final boolean isFallbackFirebaseMessagingServiceEnabled() {
        return getBooleanValue(b.FALLBACK_FCM_SERVICE_ENABLED.b(), false);
    }

    public final boolean isFirebaseCloudMessagingRegistrationEnabled() {
        return getBooleanValue(b.FIREBASE_CLOUD_MESSAGING_REGISTRATION_ENABLED_KEY.b(), false);
    }

    public final boolean isFirebaseMessagingServiceOnNewTokenRegistrationEnabled() {
        return getBooleanValue(b.FIREBASE_MESSAGING_SERVICE_AUTOMATICALLY_REGISTER_ON_NEW_TOKEN_KEY.b(), isFirebaseCloudMessagingRegistrationEnabled());
    }

    public final boolean isGeofencesEnabled() {
        return getBooleanValue(b.GEOFENCES_ENABLED.b(), isLocationCollectionEnabled());
    }

    public final boolean isHtmlInAppMessageApplyWindowInsetsEnabled() {
        return getBooleanValue(b.HTML_IN_APP_MESSAGE_APPLY_WINDOW_INSETS.b(), false);
    }

    public final boolean isHtmlInAppMessageHtmlLinkTargetEnabled() {
        return getBooleanValue(b.HTML_IN_APP_MESSAGE_ENABLE_HTML_LINK_TARGET.b(), true);
    }

    public final boolean isInAppMessageAccessibilityExclusiveModeEnabled() {
        return getBooleanValue(b.IN_APP_MESSAGE_ACCESSIBILITY_EXCLUSIVE_MODE_ENABLED.b(), false);
    }

    public final boolean isInAppMessageTestPushEagerDisplayEnabled() {
        return getBooleanValue(b.IN_APP_MESSAGE_PUSH_TEST_EAGER_DISPLAY.b(), true);
    }

    public final boolean isLocationCollectionEnabled() {
        return getBooleanValue(b.ENABLE_LOCATION_COLLECTION_KEY.b(), false);
    }

    public final boolean isNewsfeedVisualIndicatorOn() {
        return getBooleanValue(b.NEWSFEED_UNREAD_VISUAL_INDICATOR_ON.b(), true);
    }

    public final boolean isPushDeepLinkBackStackActivityEnabled() {
        return getBooleanValue(b.PUSH_DEEP_LINK_BACK_STACK_ACTIVITY_ENABLED_KEY.b(), true);
    }

    public final boolean isPushNotificationHtmlRenderingEnabled() {
        return getBooleanValue(b.PUSH_NOTIFICATION_HTML_RENDERING_ENABLED.b(), false);
    }

    public final boolean isPushWakeScreenForNotificationEnabled() {
        return getBooleanValue(b.PUSH_WAKE_SCREEN_FOR_NOTIFICATION_ENABLED.b(), true);
    }

    public final boolean isSdkAuthenticationEnabled() {
        return getBooleanValue(b.SDK_AUTH_ENABLED.b(), false);
    }

    public final boolean isSessionStartBasedTimeoutEnabled() {
        return getBooleanValue(b.SESSION_START_BASED_TIMEOUT_ENABLED_KEY.b(), false);
    }

    public final boolean isTouchModeRequiredForHtmlInAppMessages() {
        return getBooleanValue(b.REQUIRE_TOUCH_MODE_FOR_HTML_IAMS_KEY.b(), true);
    }
}