Bug 1923854 - Enable tab strip in beta r=android-reviewers,sfamisa

Differential Revision: https://phabricator.services.mozilla.com/D225489
This commit is contained in:
rahulsainani 2024-10-14 16:00:35 +00:00
parent 585d75a0ff
commit 6224d3c40b

View File

@ -8,13 +8,20 @@ import android.content.Context
import android.content.pm.PackageManager
import android.os.Build
import org.mozilla.fenix.Config
import org.mozilla.fenix.ReleaseChannel
import org.mozilla.fenix.utils.isLargeScreenSize
/**
* Returns true if the tab strip is enabled.
*/
fun Context.isTabStripEnabled(): Boolean =
isTabStripEligible() && Config.channel.isNightlyOrDebug
Config.channel.isTabStripChannel() && isTabStripEligible()
/**
* Returns true for channels that have the tab strip enabled.
*/
private fun ReleaseChannel.isTabStripChannel(): Boolean =
isBeta || isNightlyOrDebug
/**
* Returns true if the the device has the prerequisites to enable the tab strip.