Commits (12)
......@@ -130,7 +130,13 @@ subprojects {
rename { 'manifest.json' }
into extDir
def values = ['version': rootProject.ext.config.componentsVersion + "." + new Date().format('MMddHHmmss')]
def systemEnvBuildDate = System.getenv('MOZ_BUILD_DATE')
// MOZ_BUILD_DATE is in the YYYYMMDDHHMMSS format. Thus, we only use a
// substring of it if it is available.
def values = ['version': rootProject.ext.config.componentsVersion + "." +
(systemEnvBuildDate != null ?
systemEnvBuildDate.substring(4) :
new Date().format('MMddHHmmss'))]
inputs.properties(values)
expand(values)
}
......
......@@ -626,6 +626,22 @@ class GeckoEngine(
override var forceUserScalableContent: Boolean
get() = runtime.settings.forceUserScalableEnabled
set(value) { runtime.settings.forceUserScalableEnabled = value }
override var torSecurityLevel: Int
get() = runtime.settings.torSecurityLevel
set(value) {
value.let {
runtime.settings.torSecurityLevel = it
}
}
override var spoofEnglish: Boolean
get() = runtime.settings.spoofEnglish
set(value) {
value.let {
runtime.settings.spoofEnglish = it
localeUpdater.updateValue()
}
}
}.apply {
defaultSettings?.let {
this.javascriptEnabled = it.javascriptEnabled
......@@ -643,6 +659,8 @@ class GeckoEngine(
this.forceUserScalableContent = it.forceUserScalableContent
this.clearColor = it.clearColor
this.loginAutofillEnabled = it.loginAutofillEnabled
this.torSecurityLevel = it.torSecurityLevel
this.spoofEnglish = it.spoofEnglish
}
}
......
......@@ -88,6 +88,7 @@ private fun Request.toWebRequest(): WebRequest = WebRequest.Builder(url)
.addHeadersFrom(this)
.addBodyFrom(this)
.cacheMode(if (useCaches) CACHE_MODE_DEFAULT else CACHE_MODE_RELOAD)
.origin(origin)
.build()
private fun WebRequest.Builder.addHeadersFrom(request: Request): WebRequest.Builder {
......
......@@ -626,6 +626,22 @@ class GeckoEngine(
override var forceUserScalableContent: Boolean
get() = runtime.settings.forceUserScalableEnabled
set(value) { runtime.settings.forceUserScalableEnabled = value }
override var torSecurityLevel: Int
get() = runtime.settings.torSecurityLevel
set(value) {
value.let {
runtime.settings.torSecurityLevel = it
}
}
override var spoofEnglish: Boolean
get() = runtime.settings.spoofEnglish
set(value) {
value.let {
runtime.settings.spoofEnglish = it
localeUpdater.updateValue()
}
}
}.apply {
defaultSettings?.let {
this.javascriptEnabled = it.javascriptEnabled
......@@ -643,6 +659,8 @@ class GeckoEngine(
this.forceUserScalableContent = it.forceUserScalableContent
this.clearColor = it.clearColor
this.loginAutofillEnabled = it.loginAutofillEnabled
this.torSecurityLevel = it.torSecurityLevel
this.spoofEnglish = it.spoofEnglish
}
}
......
......@@ -88,6 +88,7 @@ private fun Request.toWebRequest(): WebRequest = WebRequest.Builder(url)
.addHeadersFrom(this)
.addBodyFrom(this)
.cacheMode(if (useCaches) CACHE_MODE_DEFAULT else CACHE_MODE_RELOAD)
.origin(origin)
.build()
private fun WebRequest.Builder.addHeadersFrom(request: Request): WebRequest.Builder {
......
......@@ -52,7 +52,8 @@ class HttpIconLoader(
connectTimeout = Pair(CONNECT_TIMEOUT, TimeUnit.SECONDS),
readTimeout = Pair(READ_TIMEOUT, TimeUnit.SECONDS),
redirect = Request.Redirect.FOLLOW,
useCaches = true)
useCaches = true,
origin = request.url)
return try {
val response = httpClient.fetch(downloadRequest)
......
......@@ -9,7 +9,6 @@ import androidx.annotation.ColorRes
import androidx.annotation.DrawableRes
import mozilla.components.browser.menu.item.BackPressMenuItem
import mozilla.components.browser.menu.item.BrowserMenuDivider
import mozilla.components.browser.menu.item.BrowserMenuImageText
import mozilla.components.browser.menu.item.NO_ID
import mozilla.components.browser.menu.item.ParentBrowserMenuItem
import mozilla.components.browser.menu.item.WebExtensionPlaceholderMenuItem
......@@ -68,20 +67,10 @@ class WebExtensionBrowserMenuBuilder(
iconTintColorResource = style.webExtIconTintColorResource
)
val addonsManagerMenuItem = BrowserMenuImageText(
label = context.getString(R.string.mozac_browser_menu_addons_manager),
imageResource = style.addonsManagerMenuItemDrawableRes,
iconTintColorResource = style.webExtIconTintColorResource
) {
onAddonsManagerTapped.invoke()
}
val webExtSubMenuItems = if (appendExtensionSubMenuAtStart) {
listOf(backPressMenuItem) + BrowserMenuDivider() +
filteredExtensionMenuItems +
BrowserMenuDivider() + addonsManagerMenuItem
filteredExtensionMenuItems
} else {
listOf(addonsManagerMenuItem) + BrowserMenuDivider() +
filteredExtensionMenuItems +
BrowserMenuDivider() + backPressMenuItem
}
......@@ -97,13 +86,7 @@ class WebExtensionBrowserMenuBuilder(
endOfMenuAlwaysVisible = endOfMenuAlwaysVisible
)
} else {
BrowserMenuImageText(
label = context.getString(R.string.mozac_browser_menu_addons),
imageResource = style.addonsManagerMenuItemDrawableRes,
iconTintColorResource = style.webExtIconTintColorResource
) {
onAddonsManagerTapped.invoke()
}
null
}
val mainMenuIndex = finalList.indexOfFirst { browserMenuItem ->
......@@ -111,12 +94,14 @@ class WebExtensionBrowserMenuBuilder(
WebExtensionPlaceholderMenuItem.MAIN_EXTENSIONS_MENU_ID
}
val menuItems = if (mainMenuIndex != -1) {
val menuItems = if (mainMenuIndex != -1 && webExtMenuItem != null) {
finalList[mainMenuIndex] = webExtMenuItem
finalList
// if we do not have a placeholder we should add the extension submenu at top or bottom
} else {
if (appendExtensionSubMenuAtStart) {
if (webExtMenuItem == null) {
finalList
} else if (appendExtensionSubMenuAtStart) {
listOf(webExtMenuItem) + finalList
} else {
finalList + webExtMenuItem
......
{
"default": {
"searchDefault": "Google",
"searchOrder": ["Google", "Bing"],
"searchDefault": "DuckDuckGo",
"searchOrder": ["DuckDuckGo", "YouTube", "Google", "DuckDuckGoOnion", "Startpage", "Twitter", "Wikipedia", "Yahoo"],
"visibleDefaultEngines": [
"google-b-m", "bing", "amazondotcom", "ddg", "wikipedia"
"ddg", "ddg-onion", "google", "yahoo", "twitter", "wikipedia", "youtube", "startpage"
]
},
"regionOverrides": {
"US": {
"google-b-m": "google-b-1-m"
}
},
"locales": {
"ach": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "ddg", "wikipedia"
]
}
},
"an": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "ddg", "wikipedia-an"
]
}
},
"ar": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazondotcom", "ddg", "wikipedia-ar"
]
}
},
"as": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazon-in", "ddg", "wikipedia-as"
]
}
},
"ast": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazondotcom", "ddg", "wikipedia-ast"
]
}
},
"az": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazondotcom", "ddg", "azerdict", "wikipedia-az"
]
}
},
"be": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "ddg", "wikipedia-be", "yandex.by"
]
},
"BY": {
"searchDefault": "Яндекс"
},
"KZ": {
"searchDefault": "Яндекс"
},
"RU": {
"searchDefault": "Яндекс"
},
"TR": {
"searchDefault": "Яндекс"
}
},
"bg": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "ddg", "pazaruvaj", "wikipedia-bg"
]
}
},
"bn": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "ddg", "wikipedia-bn"
]
}
},
"bn-BD": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "ddg", "wikipedia-bn"
]
}
},
"bn-IN": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazondotcom", "ddg", "rediff", "wikipedia-bn"
]
}
},
"br": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "ddg", "wikipedia-br"
]
}
},
"bs": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "ddg", "wikipedia-bs"
]
}
},
"ca": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "ddg", "wikipedia-ca", "diec2"
]
}
},
"cak": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "amazondotcom", "ddg", "wikipedia-es"
]
}
},
"cs": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "ddg", "heureka-cz", "mapy-cz", "seznam-cz", "wikipedia-cz"
]
}
},
"cy": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazon-co-uk", "ddg", "wikipedia-cy"
]
}
},
"da": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "amazon-co-uk", "ddg", "wikipedia-da"
]
}
},
"de": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazon-de", "ddg", "ecosia", "qwant", "wikipedia-de"
]
}
},
"dsb": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazon-de", "ddg", "wikipedia-dsb"
]
}
},
"el": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "ddg", "skroutz", "wikipedia-el"
]
}
},
"en-CA": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazon-ca", "ddg", "wikipedia"
]
}
},
"en-GB": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazon-co-uk", "ddg", "qwant", "wikipedia"
]
},
"RU": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazon-co-uk", "ddg", "qwant", "wikipedia", "yandex-en"
]
}
},
"en-US": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazondotcom", "ddg", "wikipedia"
]
},
"RU": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazondotcom", "ddg", "wikipedia", "yandex-en"
]
},
"experimental-hidden": {
"visibleDefaultEngines": [
"amazon-ca", "amazon-au", "google-2018", "duckduckgo", "google"
]
}
},
"en-ZA": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "ddg", "wikipedia"
]
}
},
"eo": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "ddg", "reta-vortaro", "wikipedia-eo"
]
}
},
"es-AR": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "ddg", "mercadolibre-ar", "wikipedia-es"
]
}
},
"es-CL": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "ddg", "drae", "mercadolibre-cl", "wikipedia-es"
]
}
},
"es-ES": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "ddg", "wikipedia-es"
]
}
},
"es-MX": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazondotcom", "ddg", "mercadolibre-mx", "wikipedia-es"
]
},
"experimental-hidden": {
"visibleDefaultEngines": [
"amazon-mx"
]
}
},
"et": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "amazon-co-uk", "ddg", "wikipedia-et"
]
}
},
"eu": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "ddg", "elebila", "wikipedia-eu"
]
}
},
"fa": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "ddg", "wikipedia-fa"
]
}
},
"ff": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazon-fr", "ddg", "wikipedia-fr"
]
}
},
"fi": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "amazondotcom", "ddg", "wikipedia-fi"
]
}
},
"fr": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "ddg", "qwant", "wikipedia-fr"
]
}
},
"fy-NL": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "ddg", "wikipedia-fy-NL", "bolcom-fy-NL"
]
},
"experimental-hidden": {
"visibleDefaultEngines": [
"amazon-nl"
]
}
},
"ga-IE": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "amazon-co-uk", "ddg", "tearma", "wikipedia-ga-IE"
]
}
},
"gd": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "ddg", "faclair-beag", "wikipedia-gd"
]
}
},
"gl": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazondotcom", "ddg", "wikipedia-gl"
]
}
},
"gn": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazondotcom", "ddg", "wikipedia-gn"
]
}
},
"gu-IN": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazon-in", "ddg", "wikipedia-gu"
]
}
},
"he": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazondotcom", "ddg", "wikipedia-he"
]
}
},
"hi-IN": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazon-in", "ddg", "wikipedia-hi"
]
}
},
"hr": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazon-co-uk", "ddg", "wikipedia-hr"
]
}
},
"hsb": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazon-de", "ddg", "wikipedia-hsb"
]
}
},
"hu": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "ddg", "sztaki-en-hu", "vatera", "wikipedia-hu"
]
}
},
"hy-AM": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazondotcom", "ddg", "list-am", "wikipedia-hy-AM"
]
}
},
"ia": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazondotcom", "ddg", "wikipedia-ia"
]
}
},
"id": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "ddg", "wikipedia-id"
]
}
},
"is": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazondotcom", "ddg", "leit-is", "wikipedia-is"
]
}
},
"it": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "ddg", "wikipedia-it"
]
}
},
"ja": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "amazon-jp", "bing", "ddg", "wikipedia-ja", "yahoo-jp"
]
}
},
"ka": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazondotcom", "ddg", "wikipedia-ka"
]
}
},
"kab": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "ddg", "wikipedia-kab"
]
}
},
"kk": {
"default": {
"visibleDefaultEngines": [
"yandex", "google-b-m", "bing", "ddg", "wikipedia-kk"
]
},
"KZ": {
"searchDefault": "Яндекс"
},
"BY": {
"searchDefault": "Яндекс"
},
"RU": {
"searchDefault": "Яндекс"
},
"TR": {
"searchDefault": "Яндекс"
}
},
"km": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazondotcom", "ddg", "wikipedia-km"
]
}
},
"kn": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazon-in", "ddg", "wikipedia-kn", "wiktionary-kn"
]
}
},
"ko": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "ddg", "danawa-kr", "daum-kr", "naver-kr"
]
}
},
"lij": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazon-it", "ddg", "wikipedia-lij"
]
}
},
"lo": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "ddg", "wikipedia-lo"
]
}
},
"lt": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "ddg", "wikipedia-lt"
]
}
},
"ltg": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazon-co-uk", "wikipedia-ltg"
]
}
},
"lv": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "ddg", "salidzinilv", "sslv", "wikipedia-lv"
]
}
},
"mai": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazon-in", "ddg", "wikipedia-hi"
]
}
},
"meh": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazondotcom", "ddg", "wikipedia-es"
]
}
},
"mix": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazondotcom", "ddg", "wikipedia-es"
]
}
},
"ml": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "ddg", "wikipedia-ml"
]
}
},
"mr": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazon-in", "ddg", "rediff", "wikipedia-mr"
]
}
},
"ms": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazondotcom", "ddg", "wikipedia-ms"
]
}
},
"my": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazondotcom", "ddg", "wikipedia-my"
]
}
},
"nb-NO": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "ddg", "gulesider-mobile-NO", "wikipedia-NO"
]
}
},
"ne-NP": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "ddg", "wikipedia-ne"
]
}
},
"nl": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "bolcom-nl", "ddg", "wikipedia-nl"
]
},
"experimental-hidden": {
"visibleDefaultEngines": [
"amazon-nl"
]
}
},
"nn-NO": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "ddg", "gulesider-mobile-NO", "wikipedia-NN"
]
}
},
"oc": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "ddg", "wikipedia-oc", "wiktionary-oc"
]
}
},
"or": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazon-in", "ddg", "wikipedia-or", "wiktionary-or"
]
}
},
"pa-IN": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "ddg", "wikipedia-pa"
]
}
},
"pl": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "ddg", "wikipedia-pl"
]
}
},
"pt-BR": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "ddg", "wikipedia-pt"
]
},
"experimental-hidden": {
"visibleDefaultEngines": [
"amazon-br"
]
}
},
"pt-PT": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "ddg", "wikipedia-pt"
]
}
},
"rm": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "ddg", "leo_ende_de", "pledarigrond", "wikipedia-rm"
]
}
},
"ro": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "ddg", "wikipedia-ro"
]
}
},
"ru": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "ddg", "yandex-ru", "wikipedia-ru"
]
},
"RU": {
"searchDefault": "Яндекс"
},
"BY": {
"searchDefault": "Яндекс"
},
"KZ": {
"searchDefault": "Яндекс"
},
"TR": {
"searchDefault": "Яндекс"
}
},
"sk": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "ddg", "azet-sk", "slovnik-sk", "wikipedia-sk"
]
}
},
"sl": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "ddg", "ceneje", "odpiralni", "wikipedia-sl"
]
}
},
"son": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "ddg", "bing", "amazon-fr", "wikipedia-fr"
]
}
},
"sq": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazon-co-uk", "ddg", "wikipedia-sq"
]
}
},
"sr": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "ddg", "wikipedia-sr"
]
}
},
"sv-SE": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "prisjakt-sv-SE", "ddg", "wikipedia-sv-SE"
]
}
},
"ta": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazon-in", "ddg", "wikipedia-ta", "wiktionary-ta"
]
}
},
"te": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazon-in", "ddg", "wikipedia-te", "wiktionary-te"
]
}
},
"th": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "ddg", "wikipedia-th"
]
}
},
"tl": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazondotcom", "ddg"
]
}
},
"tr": {
"default": {
"visibleDefaultEngines": [
"yandex-tr", "google-b-m", "ddg", "wikipedia-tr"
]
},
"TR": {
"searchDefault": "Yandex"
},
"BY": {
"searchDefault": "Yandex"
},
"KZ": {
"searchDefault": "Yandex"
},
"RU": {
"searchDefault": "Yandex"
}
},
"trs": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazondotcom", "ddg", "wikipedia-es"
]
}
},
"uk": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "ddg", "wikipedia-uk", "hotline-ua"
]
}
},
"ur": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazon-in", "ddg", "wikipedia-ur"
]
}
},
"uz": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "amazondotcom", "ddg", "wikipedia-uz"
]
}
},
"vi": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "coccoc", "ddg", "wikipedia-vi"
]
}
},
"wo": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "ddg", "wikipedia-wo"
]
}
},
"xh": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "ddg", "wikipedia"
]
}
},
"zam": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "ddg", "wikipedia-es"
]
}
},
"zh-CN": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "baidu", "bing", "ddg", "taobao", "wikipedia-zh-CN"
]
},
"CN": {
"searchDefault": "百度"
}
},
"zh-TW": {
"default": {
"visibleDefaultEngines": [
"google-b-m", "bing", "ddg", "wikipedia-zh-TW"
]
},
"experimental-hidden": {
"visibleDefaultEngines": [
"duckduckgo"
]
}
}
}
}
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
<ShortName>DuckDuckGoOnion</ShortName>
<Description>Duck Duck Go Onion</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image height="16" width="16">data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAB8lBMVEUAAADkRQzjPwPjQQXkRQ3iPwTiQQXgPQPeQgrcOwPVNgDVNQDWOgbTMwDRMgDQMwDSMwDRNwTQLgDRJgDSJwDSLgDSNwTjOgDiOADjOQDkPADhQAXzs5v+/fv////0vKbiRQvgPQHpdUr85NzuknPdKgDcIwDnZzj2w7HqeU/gPQLsimb/+PftjWn97Obpb0LdJQDeLQDtjmvsi2jgSBDnbULgOQD/39HgLQDeMgDpeFLgSBH0v670uqbaJQD2qImWvP/G1Ob5+/3u//+fvvXyp47dMwDaLwD0u6v0v6/aNQDiXi/aKQD3qozU7/8gSY2vvtg0ZK/OqLDaKQHYKgLgWTfaNADZMgDZMADZLADzqpD7//+xwdz//9H/5Bn/7Bn//ADofADYMADYMQDZOgPXLgDiZDj//97/0AD3tQDvlgHZOgbXLATXMADWMgDfXjLVLQD///z+0AD/3Rn/yRnwnQDcVjbVMQDyv67wuKTSJwDRHQD+8O/tg3/iQQDwhAHnawHWMADvtKfyva7XQxHga0bQGQD2vbH/u8LXIQCmPQzja07XQxLliGn99fPkcVHvhnGZ5VguvUU5wktBwCcAgxzydVv/8/XmiGngdlL+ysi3+I8LtCE80V6P3YmX4sDleljSNQLzr6D7sKPXNQTSIwAEAbMrAAAAF3RSTlMARqSkRvPz80PTpKRG3fPe3hio9/eoGP50jNsAAAABYktHRB5yCiArAAAAyElEQVQYGQXBvUqCYRiA4fu2V9Tn+UQddI3aCpxaOoU6iU4gcqqpoYbALXBuCuoYmttamqJDiEoh4YP+MOi6BNCh+uYKEGiOVNCXXxA2XDVV/UyfKbRCXTLQWAxbP2vt8Ue/uYDvfim91615sb2um6rqtrr/NFb1cUf1Ybd06areU6lSlYpK79jzK1SyJOkfhOl8JGEcqV5zoKrTRqO6yUzIzNu46ijdM1VV9bhuUJ/nZURExLRzUiPQm3kKXHi4BAEGOmOi78A/L1QoU/VHoTsAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTQtMDEtMTlUMjA6MDE6MTEtMDU6MDAuET6cAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE0LTAxLTE5VDIwOjAxOjExLTA1OjAwX0yGIAAAAABJRU5ErkJggg==</Image>
<Url type="text/html" method="POST" template="https://3g2upl4pq6kufc4m.onion">
<Param name="q" value="{searchTerms}"/>
</Url>
<SearchForm>https://3g2upl4pq6kufc4m.onion</SearchForm>
</SearchPlugin>
......@@ -4,20 +4,11 @@
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
<ShortName>DuckDuckGo</ShortName>
<Description>Duck Duck Go</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16">data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAMAAADVRocKAAADAFBMVEUAAADeWDPeWTTgWTPfWDPfYDXfWTPeWDP////90QplvEa1tbX+/Pv+/f31zcLibk/66OPeWTX88u8tT47jcVL++vnto4/pknrniG3zxrn77ur439jrmo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GwraJCuoczdI5jcBvcv1+2LYupfsD9RsQs1u3BBXUIUfrE70fkfuKS+0GRP0Oh8u4exqgyAmblzOYw+5won8LZbYn5ggBfZbxLuwW6q/v0bQJ7Xp79rTatAkT2+3ZtaJ7tP/6JvDXXWYYkCIM3mX+u9vYzMRtbGZHar/cJ1uCLH94n/wf3YhHE7//aMDvP3vw+w83/P3TE///eAYRO54ff/7zEz3OGZzH90bqAAAAAElFTkSuQmCC</Image>
<Url type="application/x-suggestions+json" method="GET" template="https://ac.duckduckgo.com/ac/">
<Url type="text/html" method="POST" template="https://duckduckgo.com">
<Param name="q" value="{searchTerms}"/>
<Param name="type" value="list"/>
</Url>
<!-- this is effectively x-moz-phonesearch, but search service expects a text/html entry -->
<Url type="text/html" method="GET" template="https://duckduckgo.com/">
<Param name="q" value="{searchTerms}" />
<Param name="t" value="fpas" />
</Url>
<Url type="application/x-moz-tabletsearch" method="GET" template="https://duckduckgo.com/">
<Param name="q" value="{searchTerms}" />
<Param name="t" value="ftas" />
</Url>
<SearchForm>https://duckduckgo.com</SearchForm>
</SearchPlugin>
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
<ShortName>Startpage</ShortName>
<Description>Start Page</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16">data:image/png;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2jkj+9YtD/vWLQ/71i0P+9otD/vaLRP72i0T+9YtE/vWLRP72i0T+9otD/vaNRP72jUT+9otF/vaLRf73kkv+9Yc///WJP//1iT//9Yk///rAmf/94Mz/+sCa//aRTv/1iUH/9ok///aJP//2i0H/9otB//aJQv/2iUL/9otC//aNRP/2jUT/9o1E//aNRP/6wpv////////////96dr/95dQ//aNRP/2kET/9pBG//aQRv/2kEb/9pBG//aRR//3lEz/95BH//mueP/7xJ3/959g//efYf/4p23//vDm//3p2//3kEr/95FJ//aRSf/niFH/95FK//aRSv/2mE//95hS/vq4iP/////////////////81bj/95xZ//q4iP//////+bF+//eZT//njFT/PSqi/2xGjv/2mVD/951V/vedVv783cX///////vQrf/++PP///////748//+8uj///////m3gf/olFr/PSuj/w8Pt/9sSJD/951V//eeWf73oVv++8ul///////5sXf/+KRi//vRsf////////////3r3v/olF//Piyk/w8Pt/9sSJH/+J5Z//ieWv/3oV/++KZf/vihXP/97N7//vn0//zTs//6wJP/+bBy//q6iP/onW//Piyl/w8Pt/8fGbH/m2iB/+icY//4pGD/96hl/viqZf74pmD/+Kxr//3iy/////////n1//ivbP/onGj/Pi2m/w8Pt/8uJKz/fFeQ/x8Zsf8+Lqb/6J9r//ivbP74rm3++Klm//mpZv/5q2f/+bR9//m0e//poW7/Pi6n/w8Pt/9sTZj/+Ktp//ira/+rd4P/Dw+3/4xijv/5snH++LN1/vmvbf/5r23/+a5t//mvb//4r2//TTuk/w8Pt/8fGrL/6ah1//ivcP/4r3P/q3yI/w8Pt/+MZpP/+bN5/vm4ev75t3X/+bV1//m1df/5t3X/+Ld3/8qUhP98XZn/Hxqz/+mse//5t3f/2p+B/x8as/8PD7f/u4qK//m7fv76u4D++bl7//m3fP/5uXz/+bl8//m5fP/5t3z/+bl//x8as/9NPKf/fWCb/x8as/8PD7f/bVOh//q5f//6v4X++sGI/vm9g//5voX/+b6F//m9hf/6vYX/+r6F//nCh/+bepr/Hxu0/w8Pt/8PD7f/fWOh//q+hf/6wof/+saN/vrGjf75xIv/+ceL//nEi//5xIv/+sSL//rHi//6x43/+ceN/+m7kP+7lpj/6ruQ//rHkP/6x43/+seQ//rLlf76ypT++seR//rJkf/6yZH/+seR//rJkf/6yZH/+8mR//vJlP/7yZT/+smU//rJlP/6yZT/+8yV//rJlf/6zpn+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==</Image>
<Url type="text/html" method="POST" template="https://startpage.com/rto/search">
<Param name="q" value="{searchTerms}"/>
</Url>
<SearchForm>https://startpage.com/rto/search/</SearchForm>
</SearchPlugin>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
<ShortName>Yahoo</ShortName>
<Description>Yahoo Search</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16">data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAG7ElEQVRYw7WX36sdVxXHP9+9Z+bc8yNNc7GxRTEFkwhNLQVFCwGjUf+Biu9VAvqQ1oIPPgqSJ0GNhUbQYkXTh4J9EhWLIq2itLSx0BebpimxQWt/xJsmufecmdl7+bD2zLlV6FsHhr1nnz2zvmut7/qufXSUU9bFK8+g9DTi97nTU89xesX7cH2SBydVHY+Z6Qtm+TN12vy0jnLKWt6hZoZhCPUrXbmswD8muul8pr+gmF5KeXWh6/rXznHm6nsbeWBPrDigGA/mbIcwO9zYvoOWw+0YHzZylWjJdDTsRUc5ZYmWSE3FHBHouEGmJdNTMUOCJW8hjAxJsg7YmXILmR4jkemaTLfR2GaEjGEAmGUmbGJkRKTlP/QsAaiYUQHF+IJIzYz9ZBItW+6SfNjQPoyEkaKRYla/0bDAsLKeMUtEzTF6MoloE5AxsU0AdnibKftp2aLlWgEBVMyZ88FiTzQsaDSn43oBYH5LnqYCylOGxwUwGcFqR20+CCEqjMSG7aPlKhV76NlZAxjcrJjSsMDkHjW6mTPnj7HYVzPdE/nJgy/y5I8vFTCUMDsEFaPH7zvA1x6+i+2rHdev9HzjyJ+JasiW6HQDmdjhCpEpmZ7gKWiomFEzo9KMmgWN9jBhwc8euMhisyb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FVSZ3s0TLBSjZczOGpmYLOIIoJoIM68kMCwPIAp1rRsjNpRkzzYViyECPaHUPZa9F1gRegsEyRFLhOzrCrZOQW30rHxPMTpGwEqZG1jhifMu7CahV2g213AZSAEz797GOvxZAUxMF9UIYLaosZzX56PReAaDPKYlkUgjiBFAplt7DAQLQMbk5h1I6Wbm6Yn1+iOKmcSySO/6eDZUQ6IvYEIJ/3L8rQBIBDJmvT8plGNfKNRx6ZBFxyijmojVtrO6mUZ660bDyVJJQ0FoETMjs/JjgDGW/PjHJFARqDHl0gmDK4A8HXJiDFAQIqsbn7EylgwPJWcGshowelsCwVNNR8PNw6l4EEsPleRMTwrIPA5OSDmRHBXZ1gCMtAtE9rXhNA8FkMi28r27ObBW/85V0Xr32jImJ5HMjXp0NIZx0EkH0bnHI/uHFLjM25CaIv7v4oB2UdPoMRPDJ4bDSUlrD9aJsLTyZvm5MWMiVI2md0mz6FE5CTmI/L8RGDtZi9I/q1Bdykp/l/RKCHrZcn6p67rL5/jRNd7j+gT3z2OtAyHEw5bzwWz2MYyPWuZ2M/sQpMZ3hl0kjG89I9kfEX9ouxtPvcAjHe/DdTcn6qaeH8P4fDY+O0m33PNf4tEZIRaYO2kAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjAtMDktMzBUMTA6NTg6NTQrMDA6MDDCZYccAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTA5LTMwVDEwOjU4OjU0KzAwOjAwszg/oAAAAABJRU5ErkJggg==</Image>
<Url type="application/x-suggestions+json" method="GET"
template="https://search.yahoo.com/sugg/ff">
<Param name="output" value="fxjson" />
<Param name="appid" value="ffd" />
<Param name="command" value="{searchTerms}" />
</Url>
<Url type="text/html" method="GET" template="https://search.yahoo.com/yhs/search"
resultdomain="yahoo.com" rel="searchform">
<Param name="p" value="{searchTerms}"/>
<Param name="ei" value="UTF-8"/>
<Param name="hspart" value="mozilla"/>
</Url>
</SearchPlugin>
......@@ -499,6 +499,7 @@ class DisplayToolbar internal constructor(
@ColorInt val color = when (siteSecurity) {
Toolbar.SiteSecurity.INSECURE -> colors.securityIconInsecure
Toolbar.SiteSecurity.SECURE -> colors.securityIconSecure
Toolbar.SiteSecurity.ONION -> colors.securityIconSecure
}
if (color == Color.TRANSPARENT) {
views.securityIndicator.clearColorFilter()
......
......@@ -43,6 +43,11 @@ internal class SiteSecurityIconView @JvmOverloads constructor(
View.mergeDrawableStates(drawableState, intArrayOf(R.attr.state_site_secure))
drawableState
}
SiteSecurity.ONION -> {
val drawableState = super.onCreateDrawableState(extraSpace + 1)
View.mergeDrawableStates(drawableState, intArrayOf(R.attr.state_site_onion))
drawableState
}
}
}
}
......@@ -3,6 +3,9 @@
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<selector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:ac="http://schemas.android.com/apk/res-auto">
<item
android:drawable="@drawable/mozac_ic_onion"
ac:state_site_onion="true" />
<item
android:drawable="@drawable/mozac_ic_lock"
ac:state_site_secure="true" />
......
......@@ -27,6 +27,10 @@
<attr name="state_site_secure" format="boolean"/>
</declare-styleable>
<declare-styleable name="BrowserToolbarSiteOnionState">
<attr name="state_site_onion" format="boolean"/>
</declare-styleable>
<declare-styleable name="ActionContainer">
<attr name="actionContainerItemSize" format="dimension" />
</declare-styleable>
......
......@@ -9,6 +9,7 @@ import android.graphics.Bitmap
import androidx.annotation.CallSuper
import mozilla.components.concept.engine.EngineSession.TrackingProtectionPolicy.CookiePolicy.ACCEPT_ALL
import mozilla.components.concept.engine.EngineSession.TrackingProtectionPolicy.CookiePolicy.ACCEPT_NON_TRACKERS
import mozilla.components.concept.engine.EngineSession.TrackingProtectionPolicy.CookiePolicy.ACCEPT_ONLY_FIRST_PARTY
import mozilla.components.concept.engine.content.blocking.Tracker
import mozilla.components.concept.engine.history.HistoryItem
import mozilla.components.concept.engine.manifest.WebAppManifest
......@@ -376,7 +377,9 @@ abstract class EngineSession(
companion object {
fun none() = TrackingProtectionPolicy(
trackingCategories = arrayOf(TrackingCategory.NONE),
cookiePolicy = ACCEPT_ALL
useForPrivateSessions = false,
useForRegularSessions = false,
cookiePolicy = ACCEPT_ONLY_FIRST_PARTY
)
/**
......
......@@ -179,6 +179,13 @@ abstract class Settings {
* Setting to control the clear color while drawing.
*/
open var clearColor: Int? by UnsupportedSetting()
/**
* Setting to control the current security level
*/
open var torSecurityLevel: Int by UnsupportedSetting()
open var spoofEnglish: Boolean by UnsupportedSetting()
}
/**
......@@ -214,7 +221,9 @@ data class DefaultSettings(
override var fontSizeFactor: Float? = null,
override var forceUserScalableContent: Boolean = false,
override var loginAutofillEnabled: Boolean = false,
override var clearColor: Int? = null
override var clearColor: Int? = null,
override var torSecurityLevel: Int = 4,
override var spoofEnglish: Boolean = false
) : Settings()
class UnsupportedSetting<T> {
......
......@@ -48,7 +48,8 @@ data class Request(
val redirect: Redirect = Redirect.FOLLOW,
val cookiePolicy: CookiePolicy = CookiePolicy.INCLUDE,
val useCaches: Boolean = true,
val private: Boolean = false
val private: Boolean = false,
val origin: String? = null
) {
/**
* A [Body] to be send with the [Request].
......
......@@ -407,6 +407,7 @@ interface Toolbar {
enum class SiteSecurity {
INSECURE,
SECURE,
ONION,
}
/**
......