Issue #6898: Allow empty adjust token for fennecNightly builds.
parent
47c13136f7
commit
1f5bfff025
|
@ -13,14 +13,15 @@ import com.adjust.sdk.AdjustConfig
|
||||||
import com.adjust.sdk.LogLevel
|
import com.adjust.sdk.LogLevel
|
||||||
import org.mozilla.fenix.BuildConfig
|
import org.mozilla.fenix.BuildConfig
|
||||||
import org.mozilla.fenix.Config
|
import org.mozilla.fenix.Config
|
||||||
|
import org.mozilla.fenix.ReleaseChannel
|
||||||
import org.mozilla.fenix.ext.settings
|
import org.mozilla.fenix.ext.settings
|
||||||
|
|
||||||
class AdjustMetricsService(private val application: Application) : MetricsService {
|
class AdjustMetricsService(private val application: Application) : MetricsService {
|
||||||
override fun start() {
|
override fun start() {
|
||||||
if ((BuildConfig.ADJUST_TOKEN.isNullOrEmpty())) {
|
if ((BuildConfig.ADJUST_TOKEN.isNullOrBlank())) {
|
||||||
Log.i(LOGTAG, "No adjust token defined")
|
Log.i(LOGTAG, "No adjust token defined")
|
||||||
|
|
||||||
if (Config.channel.isReleased) {
|
if (Config.channel.isReleased && Config.channel != ReleaseChannel.FennecNightly) {
|
||||||
throw IllegalStateException("No adjust token defined for release build")
|
throw IllegalStateException("No adjust token defined for release build")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue