|
|
@ -5,8 +5,10 @@
|
|
|
|
package org.mozilla.fenix
|
|
|
|
package org.mozilla.fenix
|
|
|
|
|
|
|
|
|
|
|
|
import android.content.Context
|
|
|
|
import android.content.Context
|
|
|
|
|
|
|
|
import android.os.StrictMode
|
|
|
|
import mozilla.components.support.locale.LocaleManager
|
|
|
|
import mozilla.components.support.locale.LocaleManager
|
|
|
|
import mozilla.components.support.locale.LocaleManager.getSystemDefault
|
|
|
|
import mozilla.components.support.locale.LocaleManager.getSystemDefault
|
|
|
|
|
|
|
|
import org.mozilla.fenix.ext.components
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* A single source for setting feature flags that are mostly based on build type.
|
|
|
|
* A single source for setting feature flags that are mostly based on build type.
|
|
|
@ -91,9 +93,11 @@ object FeatureFlags {
|
|
|
|
* Enables themed wallpapers feature.
|
|
|
|
* Enables themed wallpapers feature.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
fun isThemedWallpapersFeatureEnabled(context: Context): Boolean {
|
|
|
|
fun isThemedWallpapersFeatureEnabled(context: Context): Boolean {
|
|
|
|
val langTag = LocaleManager.getCurrentLocale(context)
|
|
|
|
return context.components.strictMode.resetAfter(StrictMode.allowThreadDiskReads()) {
|
|
|
|
?.toLanguageTag() ?: getSystemDefault().toLanguageTag()
|
|
|
|
val langTag = LocaleManager.getCurrentLocale(context)
|
|
|
|
return listOf("en-US", "es-US").contains(langTag)
|
|
|
|
?.toLanguageTag() ?: getSystemDefault().toLanguageTag()
|
|
|
|
|
|
|
|
listOf("en-US", "es-US").contains(langTag)
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|