Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,15 @@ enum class FeatureFlag(
"sdk_device_gesture_disabled",
FeatureActivationMode.IMMEDIATE,
),

/**
* Builds SDK dispatchers on a bootstrap thread instead of the first caller.
* APP_STARTUP because the pools live for the process. Absent means off.
*/
SDK_DISPATCHER_BOOTSTRAP(
"sdk_dispatcher_bootstrap",
FeatureActivationMode.APP_STARTUP,
),
;

fun isEnabledIn(enabledKeys: Set<String>): Boolean = enabledKeys.contains(key)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,18 @@ class FeatureFlagTest {
FeatureFlag.SDK_DEVICE_GESTURE_DISABLED.activationMode,
)
}

@Test
fun dispatcherBootstrapIsAppStartupAndOffWhenAbsent() {
assertEquals("sdk_dispatcher_bootstrap", FeatureFlag.SDK_DISPATCHER_BOOTSTRAP.key)
assertEquals(
FeatureActivationMode.APP_STARTUP,
FeatureFlag.SDK_DISPATCHER_BOOTSTRAP.activationMode,
)
val manager = FeatureManager()
manager.refresh(emptyList(), applyAppStartupFlags = true)
assertFalse(manager.isEnabled(FeatureFlag.SDK_DISPATCHER_BOOTSTRAP))
}
}

class FeatureManagerTest {
Expand Down
Loading