diff --git a/app/src/main/java/org/mozilla/fenix/Config.kt b/app/src/main/java/org/mozilla/fenix/Config.kt index b7b5db3d30..0f7d035d02 100644 --- a/app/src/main/java/org/mozilla/fenix/Config.kt +++ b/app/src/main/java/org/mozilla/fenix/Config.kt @@ -15,6 +15,16 @@ enum class ReleaseChannel { else -> true } + /** + * True if this is a debug release channel, false otherwise. + * + * This constant should often be used instead of [BuildConfig.DEBUG], which indicates + * if the `debuggable` flag is set which can be true even on released channel builds + * (e.g. performance). + */ + val isDebug: Boolean + get() = !this.isReleased + val isReleaseOrBeta: Boolean get() = when (this) { FenixProduction -> true