mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-08-22 07:06:05 +00:00
23 lines
689 B
Kotlin
23 lines
689 B
Kotlin
package com.bitchat.android.model
|
|
|
|
import com.bitchat.android.BuildConfig
|
|
|
|
/**
|
|
* Coordinated rollout gate for Nostr double-ratchet transport.
|
|
*
|
|
* Production builds stay fail-closed until the pairwise NDR implementations
|
|
* are reviewed and ready to be enabled together on Apple and Android.
|
|
*/
|
|
object NdrFeatureGate {
|
|
@Volatile
|
|
private var debugTestOverride = false
|
|
|
|
fun isEnabled(): Boolean =
|
|
BuildConfig.NDR_ROLLOUT_ENABLED || (BuildConfig.DEBUG && debugTestOverride)
|
|
|
|
internal fun setEnabledForTests(enabled: Boolean) {
|
|
check(BuildConfig.DEBUG) { "The NDR test override is unavailable in release builds" }
|
|
debugTestOverride = enabled
|
|
}
|
|
}
|