|
|
|
@ -10,6 +10,7 @@ import androidx.browser.customtabs.CustomTabsIntent
|
|
|
|
|
import androidx.core.net.toUri
|
|
|
|
|
import mozilla.components.support.ktx.android.content.appVersionName
|
|
|
|
|
import org.mozilla.fenix.BuildConfig
|
|
|
|
|
import org.mozilla.fenix.Config
|
|
|
|
|
import org.mozilla.fenix.IntentReceiverActivity
|
|
|
|
|
import org.mozilla.fenix.R
|
|
|
|
|
import org.mozilla.fenix.ext.getColorFromAttr
|
|
|
|
@ -32,7 +33,8 @@ object SupportUtils {
|
|
|
|
|
SEND_TABS("send-tab-preview"),
|
|
|
|
|
SET_AS_DEFAULT_BROWSER("set-firefox-preview-default"),
|
|
|
|
|
SEARCH_SUGGESTION("how-search-firefox-preview"),
|
|
|
|
|
CUSTOM_SEARCH_ENGINES("custom-search-engines")
|
|
|
|
|
CUSTOM_SEARCH_ENGINES("custom-search-engines"),
|
|
|
|
|
UPGRADE_FAQ("firefox-preview-upgrade-faqs")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -64,6 +66,12 @@ object SupportUtils {
|
|
|
|
|
fun getPrivacyNoticeUrl(locale: Locale = Locale.getDefault()) =
|
|
|
|
|
"https://www.mozilla.org/${getLanguageTag(locale)}/privacy/firefox/"
|
|
|
|
|
|
|
|
|
|
fun getWhatsNewUrl(context: Context) = if (Config.channel.isFennec) {
|
|
|
|
|
getGenericSumoURLForTopic(SumoTopic.UPGRADE_FAQ)
|
|
|
|
|
} else {
|
|
|
|
|
getSumoURLForTopic(context, SumoTopic.WHATS_NEW)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fun createCustomTabIntent(context: Context, url: String): Intent = CustomTabsIntent.Builder()
|
|
|
|
|
.setInstantAppsEnabled(false)
|
|
|
|
|
.setToolbarColor(context.getColorFromAttr(R.attr.foundation))
|
|
|
|
|