diff --git a/app/build.gradle b/app/build.gradle index ddf4e18144..2f9f9b769b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -258,7 +258,9 @@ android.applicationVariants.all { variant -> // ------------------------------------------------------------------------------------------------- // Feature build flags // ------------------------------------------------------------------------------------------------- - buildConfigField 'Boolean', 'SEND_TAB_ENABLED', (true).toString() + // NB: flipping SEND_TAB_ENABLED flag back and worth is currently not well supported and may need hand-holding. + // Consult with the android-components peers before changing. + buildConfigField 'Boolean', 'SEND_TAB_ENABLED', (buildType == "nightly" || isDebug).toString() buildConfigField 'Boolean', 'PULL_TO_REFRESH_ENABLED', (false).toString() } diff --git a/app/src/main/java/org/mozilla/fenix/components/BackgroundServices.kt b/app/src/main/java/org/mozilla/fenix/components/BackgroundServices.kt index 928f0f4012..b69e1cbbe1 100644 --- a/app/src/main/java/org/mozilla/fenix/components/BackgroundServices.kt +++ b/app/src/main/java/org/mozilla/fenix/components/BackgroundServices.kt @@ -22,6 +22,7 @@ import mozilla.components.service.fxa.Config import mozilla.components.service.fxa.manager.DeviceTuple import mozilla.components.service.fxa.manager.FxaAccountManager import mozilla.components.support.base.log.logger.Logger +import org.mozilla.fenix.BuildConfig import org.mozilla.fenix.Experiments import org.mozilla.fenix.R import org.mozilla.fenix.isInExperiment @@ -77,11 +78,20 @@ class BackgroundServices( } } + // NB: flipping this flag back and worth is currently not well supported and may need hand-holding. + // Consult with the android-components peers before changing. + // See https://github.com/mozilla/application-services/issues/1308 + private val deviceCapabilities = if (BuildConfig.SEND_TAB_ENABLED) { + listOf(DeviceCapability.SEND_TAB) + } else { + emptyList() + } + val accountManager = FxaAccountManager( context, config, scopes, - DeviceTuple(context.getString(R.string.app_name), DeviceType.MOBILE, listOf(DeviceCapability.SEND_TAB)), + DeviceTuple(context.getString(R.string.app_name), DeviceType.MOBILE, deviceCapabilities), syncManager ).also { it.registerForDeviceEvents(deviceEventObserver, ProcessLifecycleOwner.get(), true)