mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1923854 - Enable tab strip in beta r=android-reviewers,sfamisa
Differential Revision: https://phabricator.services.mozilla.com/D225489
This commit is contained in:
parent
585d75a0ff
commit
6224d3c40b
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user