1
0
Fork 0

For #6464: Add ReleaseChannel.isDebug.

master
Michael Comella 2019-12-20 13:08:18 -08:00 committed by Michael Comella
parent f562c81fb2
commit f11ddf8038
1 changed files with 10 additions and 0 deletions

View File

@ -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