mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-15 18:12:54 +00:00
Disable send tab for non-nightly, non-debug builds (#3542)
* Put deviceCapabilities list behind a SEND_TAB_ENABLED flag * Disable SEND_TAB for non-debug, non-nightly builds
This commit is contained in:
parent
6a18dc75a4
commit
521312c6f8
@ -258,7 +258,9 @@ android.applicationVariants.all { variant ->
|
|||||||
// -------------------------------------------------------------------------------------------------
|
// -------------------------------------------------------------------------------------------------
|
||||||
// Feature build flags
|
// 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()
|
buildConfigField 'Boolean', 'PULL_TO_REFRESH_ENABLED', (false).toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@ import mozilla.components.service.fxa.Config
|
|||||||
import mozilla.components.service.fxa.manager.DeviceTuple
|
import mozilla.components.service.fxa.manager.DeviceTuple
|
||||||
import mozilla.components.service.fxa.manager.FxaAccountManager
|
import mozilla.components.service.fxa.manager.FxaAccountManager
|
||||||
import mozilla.components.support.base.log.logger.Logger
|
import mozilla.components.support.base.log.logger.Logger
|
||||||
|
import org.mozilla.fenix.BuildConfig
|
||||||
import org.mozilla.fenix.Experiments
|
import org.mozilla.fenix.Experiments
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
import org.mozilla.fenix.isInExperiment
|
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(
|
val accountManager = FxaAccountManager(
|
||||||
context,
|
context,
|
||||||
config,
|
config,
|
||||||
scopes,
|
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
|
syncManager
|
||||||
).also {
|
).also {
|
||||||
it.registerForDeviceEvents(deviceEventObserver, ProcessLifecycleOwner.get(), true)
|
it.registerForDeviceEvents(deviceEventObserver, ProcessLifecycleOwner.get(), true)
|
||||||
|
Loading…
Reference in New Issue
Block a user