From f71ec8928be3432bec3b2b0dc71cce47f3f67ecc Mon Sep 17 00:00:00 2001 From: Tiger Oakes Date: Tue, 17 Sep 2019 13:41:41 -0700 Subject: [PATCH] Add note about lazy in FeatureFlags --- app/src/main/java/org/mozilla/fenix/FeatureFlags.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/org/mozilla/fenix/FeatureFlags.kt b/app/src/main/java/org/mozilla/fenix/FeatureFlags.kt index 443263e49..9de3f7a45 100644 --- a/app/src/main/java/org/mozilla/fenix/FeatureFlags.kt +++ b/app/src/main/java/org/mozilla/fenix/FeatureFlags.kt @@ -4,6 +4,9 @@ package org.mozilla.fenix * A single source for setting feature flags that are mostly based on build type. */ object FeatureFlags { + // lazy is used to suppress "Condition is always 'true'" warnings when using the flags. + // https://github.com/mozilla-mobile/fenix/pull/4077#issuecomment-511964072 + // A convenience flag for production builds. private val production by lazy { BuildConfig.BUILD_TYPE == "fenixProduction" } // A convenience flag for beta builds.