diff --git a/build.gradle b/build.gradle
index 5a1bb4a5d2c..85cb88f5854 100644
--- a/build.gradle
+++ b/build.gradle
@@ -159,7 +159,7 @@ subprojects {
}
jacoco {
- toolVersion = "0.8.7"
+ toolVersion = "0.8.8"
}
// Format test output
diff --git a/buildSrc/src/main/java/Dependencies.kt b/buildSrc/src/main/java/Dependencies.kt
index 1e844ce2c89..fbf08e00f63 100644
--- a/buildSrc/src/main/java/Dependencies.kt
+++ b/buildSrc/src/main/java/Dependencies.kt
@@ -30,9 +30,9 @@ object Versions {
const val disklrucache = "2.0.2"
const val leakcanary = "2.8.1"
- const val mozilla_appservices = "93.7.1"
+ const val mozilla_appservices = "93.8.0"
- const val mozilla_glean = "50.1.3"
+ const val mozilla_glean = "51.0.1"
const val material = "1.2.1"
diff --git a/buildSrc/src/main/java/Gecko.kt b/buildSrc/src/main/java/Gecko.kt
index cdf3ef4861f..4088cddd257 100644
--- a/buildSrc/src/main/java/Gecko.kt
+++ b/buildSrc/src/main/java/Gecko.kt
@@ -9,7 +9,7 @@ object Gecko {
/**
* GeckoView Version.
*/
- const val version = "105.0.20220801034014"
+ const val version = "105.0.20220808092108"
/**
* GeckoView channel
diff --git a/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/prompt/ChoicePromptUpdateDelegate.kt b/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/prompt/ChoicePromptDelegate.kt
similarity index 92%
rename from components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/prompt/ChoicePromptUpdateDelegate.kt
rename to components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/prompt/ChoicePromptDelegate.kt
index 2917c475398..b8353e753a6 100644
--- a/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/prompt/ChoicePromptUpdateDelegate.kt
+++ b/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/prompt/ChoicePromptDelegate.kt
@@ -19,11 +19,17 @@ import org.mozilla.geckoview.GeckoSession.PromptDelegate.PromptInstanceDelegate
* with the onPromptUpdate callback.
* @param previousPrompt [PromptRequest] to be updated.
*/
-internal class ChoicePromptUpdateDelegate(
+internal class ChoicePromptDelegate(
private val geckoSession: GeckoEngineSession,
private var previousPrompt: PromptRequest,
) : PromptInstanceDelegate {
+ override fun onPromptDismiss(prompt: BasePrompt) {
+ geckoSession.notifyObservers {
+ onPromptDismissed(previousPrompt)
+ }
+ }
+
override fun onPromptUpdate(prompt: BasePrompt) {
if (prompt is ChoicePrompt) {
val promptRequest = updatePromptChoices(prompt)
diff --git a/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/prompt/GeckoPromptDelegate.kt b/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/prompt/GeckoPromptDelegate.kt
index f5f6fcb61ea..afa3a561016 100644
--- a/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/prompt/GeckoPromptDelegate.kt
+++ b/components/browser/engine-gecko/src/main/java/mozilla/components/browser/engine/gecko/prompt/GeckoPromptDelegate.kt
@@ -258,7 +258,7 @@ internal class GeckoPromptDelegate(private val geckoEngineSession: GeckoEngineSe
else -> throw InvalidParameterException("${geckoPrompt.type} is not a valid Gecko @Choice.ChoiceType")
}
- geckoPrompt.delegate = ChoicePromptUpdateDelegate(
+ geckoPrompt.delegate = ChoicePromptDelegate(
geckoEngineSession,
promptRequest
)
diff --git a/components/browser/engine-gecko/src/test/java/mozilla/components/browser/engine/gecko/prompt/ChoicePromptUpdateDelegateTest.kt b/components/browser/engine-gecko/src/test/java/mozilla/components/browser/engine/gecko/prompt/ChoicePromptDelegateTest.kt
similarity index 73%
rename from components/browser/engine-gecko/src/test/java/mozilla/components/browser/engine/gecko/prompt/ChoicePromptUpdateDelegateTest.kt
rename to components/browser/engine-gecko/src/test/java/mozilla/components/browser/engine/gecko/prompt/ChoicePromptDelegateTest.kt
index f6ca2a42e3b..7d61e3708ce 100644
--- a/components/browser/engine-gecko/src/test/java/mozilla/components/browser/engine/gecko/prompt/ChoicePromptUpdateDelegateTest.kt
+++ b/components/browser/engine-gecko/src/test/java/mozilla/components/browser/engine/gecko/prompt/ChoicePromptDelegateTest.kt
@@ -16,7 +16,7 @@ import org.junit.runner.RunWith
import org.mozilla.geckoview.GeckoSession
@RunWith(AndroidJUnit4::class)
-class ChoicePromptUpdateDelegateTest {
+class ChoicePromptDelegateTest {
@Test
fun `WHEN onPromptUpdate is called from GeckoView THEN notifyObservers is invoked with onPromptUpdate`() {
@@ -41,7 +41,7 @@ class ChoicePromptUpdateDelegateTest {
{ isOnConfirmCalled = true },
{ isOnDismissCalled = true }
)
- val delegate = ChoicePromptUpdateDelegate(mockSession, prompt)
+ val delegate = ChoicePromptDelegate(mockSession, prompt)
val updatedPrompt = mock()
ReflectionUtils.setField(updatedPrompt, "choices", arrayOf())
@@ -55,4 +55,23 @@ class ChoicePromptUpdateDelegateTest {
assertTrue(isOnDismissCalled)
assertTrue(isOnConfirmCalled)
}
+
+ @Test
+ fun `WHEN onPromptDismiss is called from GeckoView THEN notifyObservers is invoked with onPromptDismissed`() {
+ val mockSession = GeckoEngineSession(mock())
+ var isOnDismissCalled = false
+ mockSession.register(object : EngineSession.Observer {
+ override fun onPromptDismissed(promptRequest: PromptRequest) {
+ super.onPromptDismissed(promptRequest)
+ isOnDismissCalled = true
+ }
+ })
+ val basePrompt: GeckoSession.PromptDelegate.ChoicePrompt = mock()
+ val prompt: PromptRequest = mock()
+ val delegate = ChoicePromptDelegate(mockSession, prompt)
+
+ delegate.onPromptDismiss(basePrompt)
+
+ assertTrue(isOnDismissCalled)
+ }
}
diff --git a/components/browser/errorpages/src/main/res/values-ast/strings.xml b/components/browser/errorpages/src/main/res/values-ast/strings.xml
index 6f8b695168c..43fb88b5b14 100644
--- a/components/browser/errorpages/src/main/res/values-ast/strings.xml
+++ b/components/browser/errorpages/src/main/res/values-ast/strings.xml
@@ -39,6 +39,8 @@
Aceutar el riesgu y siguir
+
+ Esti sitiu web rique una conexón segura.
@@ -250,6 +252,8 @@
El sitiu seguru nun ta disponible
+
+ %1$s nun ta disponible.]]>
Siguir col sitiu HTTP
diff --git a/components/browser/errorpages/src/main/res/values-cs/strings.xml b/components/browser/errorpages/src/main/res/values-cs/strings.xml
index 76b0bce5f24..0a363b5e5ac 100644
--- a/components/browser/errorpages/src/main/res/values-cs/strings.xml
+++ b/components/browser/errorpages/src/main/res/values-cs/strings.xml
@@ -61,6 +61,8 @@ kdo se snaží vydávat za server.
%1$s má nastaveno bezpečnostní pravidlo HTTP Strict Transport Security (HSTS), které od aplikace %2$s vyžaduje používání pouze zabezpečeného spojení. Pro připojení k této stránce nelze udělit výjimku.]]>
+
+ %1$s má nastaveno bezpečnostní pravidlo HTTP Strict Transport Security (HSTS), které od aplikace %2$s vyžaduje používání pouze zabezpečeného spojení. Pro připojení k této stránce nelze udělit výjimku.]]>
Zpátky
@@ -78,6 +80,15 @@ kdo se snaží vydávat za server.
Vypršel čas spojení
+
+ Požadovaný server neodpověděl na požadavek o připojení a prohlížeč ukončil čekání na tuto odpověď.
+
+ - Server může být velmi vytížen. Opakujte akci později.
+ - Funguje načítání ostatních webových stránek? Zkontrolujte síťové připojení vašeho zařízení.
+ - Připojuje se vaše zařízení k síti skrze firewall nebo proxy server? Nesprávné nastavení může načítání stránek ovlivnit.
+ - Pokud problém přetrvává, poraďte se se správcem vaší sítě, nebo poskytovatelem připojení k internetu.
+
]]>
+
Nelze se připojit
@@ -233,18 +244,25 @@ kdo se snaží vydávat za server.
Proxy server odmítl spojení
- Prohlížeč je nakonfigurován k použití proxy serveru, který odmítl spojení.
+ Prohlížeč je nastaven, aby používal proxy server, který odmítá spojení.
- - Zkontrolujte v prohlížeči nastavení proxy serveru a opakujte akci.
+ - Zkontrolujte v prohlížeči nastavení proxy serveru a akci opakujte.
- Je možné, že proxy server nepovoluje připojení z vaší sítě.
- Pokud problém přetrvává, poraďte se se správcem vaší sítě, nebo poskytovatelem připojení k internetu.
- ]]>
+]]>
Proxy server nenalezen
+ Prohlížeč je nastaven, aby používal proxy server, který nelze nalézt.
+
+ - Zkontrolujte v prohlížeči nastavení proxy serveru a akci opakujte.
+ - Zkontrolujte síťové připojení vašeho zařízení.
+ - Pokud problém přetrvává, poraďte se se správcem vaší sítě, nebo poskytovatelem připojení k internetu.
+
+ ]]>
+
Problém se škodlivým softwarem
diff --git a/components/browser/errorpages/src/main/res/values-gd/strings.xml b/components/browser/errorpages/src/main/res/values-gd/strings.xml
index 95b22874699..156724f56e0 100644
--- a/components/browser/errorpages/src/main/res/values-gd/strings.xml
+++ b/components/browser/errorpages/src/main/res/values-gd/strings.xml
@@ -1,5 +1,5 @@
-
+
Feuch ris a-rithist
@@ -36,6 +36,32 @@
Tuigidh mi an cunnart, air adhart leam
+
+ Feumaidh an làrach-lìn seo ceangal tèarainte.
+
+
+ Chan urrainn dhuinn an duilleag seo a shealltainn dhut a chionn ’s gum feum an làrach-lìn seo ceangal tèarainte.
+ Mar is trice, ’s ann aig an làrach-lìn a bhios an duilgheadas agus chan eil dad ann as urrainn dhut-sa a dhèanamh airson a chur ceart.
+ Ach is urrainn dhut innse do rianaire na làraich-lìn gu bheil an duilgheadas seo ann.
+
+ ]]>
+
+
+ Adhartach…
+
+
+ Tha poileasaidh tèarainteachd aig %1$s air a bheil HTTP Strict Transport Security (HSTS), agus is ciall dha sin nach urrainn dha %2$s ach ceangal tèarainte a dhèanamh. Chan urrainn dhut eisgeachd a chur ris a thadhal air an làrach seo.
+ ]]>
+
+
+ Tha poileasaidh tèarainteachd aig %1$s air a bheil HTTP Strict Transport Security (HSTS), agus is ciall dha sin nach urrainn dha %2$s ach ceangal tèarainte a dhèanamh. Chan urrainn dhut eisgeachd a chur ris a thadhal air an làrach seo.
+ ]]>
+
+ Air ais
+
Bhris rudeigin a-steach air a’ cheangal
diff --git a/components/browser/errorpages/src/main/res/values-hy-rAM/strings.xml b/components/browser/errorpages/src/main/res/values-hy-rAM/strings.xml
index 715ab4cb57f..13801305b82 100644
--- a/components/browser/errorpages/src/main/res/values-hy-rAM/strings.xml
+++ b/components/browser/errorpages/src/main/res/values-hy-rAM/strings.xml
@@ -1,5 +1,5 @@
-
+
Կրկին փորձել
@@ -51,9 +51,14 @@
Լրացուցիչ…
+
- %1$s-ը ունի անվտանգության քաղաքականություն, որը կոչվում է HTTP Strict Transport Security (HSTS): Այն նշանակում է, որ %2$s-ը կարող է միայն անվտանգ կապակցում անել: Տվյալ կայքը այցելելու համար դուք չեք կարող բացառություն սահմանել:]]>
+
+ %1$s-ը ունի անվտանգության քաղաքականություն, որը կոչվում է HTTP Strict Transport Security (HSTS), ինչը նշանակում է, որ %2$s-ը կարող է դրան միմիայն անվտանգ կապակցվել: Դուք չեք կարող բացառություն ավելացնել տվյալ էջն այցելելու համար:
+ ]]>
Հետ գնալ
diff --git a/components/browser/errorpages/src/main/res/values-kab/strings.xml b/components/browser/errorpages/src/main/res/values-kab/strings.xml
index e85d1d109cc..a0f8fcc7d2a 100644
--- a/components/browser/errorpages/src/main/res/values-kab/strings.xml
+++ b/components/browser/errorpages/src/main/res/values-kab/strings.xml
@@ -1,5 +1,5 @@
-
+
Ɛreḍ tikkelt-nniḍen
@@ -55,10 +55,14 @@
Talqayt…
+
- %1$s ɣur-s tasertit n tɣellist HTTP Strict Transport Security (HSTS), ay-agi yemmal-d d akken %2$s izmer kan ad iqqen ɣur-s s tɣellist. Ur tezmireḍ ara ad ternuḍ tasureft akken ad twaliḍ asmel-agi.
]]>
+
+ %1$s ɣur-s tasertit n tɣellist HTTP Strict Transport Security (HSTS), ay-agi yemmal-d d akken %2$s izmer kan ad iqqen ɣur-s s tɣellist. Ur tezmireḍ ara ad ternuḍ tasureft akken ad twaliḍ asmel-agi.]]>
Uɣal ɣer deffir
diff --git a/components/browser/errorpages/src/main/res/values-ug/strings.xml b/components/browser/errorpages/src/main/res/values-ug/strings.xml
index 7d83a94b129..6822d863bce 100644
--- a/components/browser/errorpages/src/main/res/values-ug/strings.xml
+++ b/components/browser/errorpages/src/main/res/values-ug/strings.xml
@@ -1,5 +1,5 @@
-
+
قايتا سىناڭ
@@ -14,6 +14,24 @@
بىخەتەر ئۇلىنىش مەغلۇپ بولدى
+
+
+ سىز كۆرمەكچى بولغان بەتنى كۆرسەتكىلى بولمايدۇ ، چۈنكى تاپشۇرۇۋالغان سانلىق مەلۇماتلارنىڭ راست-يالغانلىقىنى تەكشۈرگىلى بولمايدۇ.
+ توربېكەت ئىگىلىرى بىلەن ئالاقىلىشىپ ، ئۇلارغا بۇ مەسىلىنى ئۇقتۇرۇڭ.
+
+ ]]>
+
+
+ بىخەتەر ئۇلىنىش مەغلۇپ بولدى
+
+
+ بۇ مۇلازىمىتىرنىڭ سەپلىمىسىدە مەسىلە بولغانلىقى، ياكى نامەلۈم كىشلەرنىڭ مۇلازىمىتىرنى دوراشقا ئۇرۇنغانلىق سەۋەبلىك بولۇشى مۇمكىن.
+ ئەگەر سىز بۇرۇن بۇ مۇلازىمېتىرغا مۇۋەپپەقىيەتلىك ئۇلىنالىغان بولسىڭىز، خاتالىق ۋاقىتلىق بولۇشى مۇمكىن، شۇنداقلا قايتا سىناپ باقسىڭىز بولىدۇ.
+
+ ]]>
+
ئالىي…
@@ -22,18 +40,79 @@
خەتەرنى قوبۇل قىلىپ داۋاملاشتۇرۇش
+
+ ئالىي…
+
+
+ قايتىش
+
ئۇلىنىش ئۈزۈلۈپ قالدى
+
+ توركۆرگۈچ مۇۋەپپەقىيەتلىك ئۇلاندى ، ئەمما ئۇچۇر يوللىغاندا ئۇلىنىش ئۈزۈلۈپ قالدى. قايتا سىناڭ.
+
+ - تور بېكەتنى ۋاقتىنچە زىيارەت قىلغىلى بولمايدۇ ياكى مۇلازىمىتىر ئالدىراش. بىر نەچچە مىنۇتتىن كېيىن قايتا سىناڭ.
+ - ئەگەر سىز ھېچقانداق بەتنى يۈكلىيەلمىسىڭىز ، ئۈسكۈنىڭىزنىڭ تور ئۇلىنىشىنى تەكشۈرۈپ بىقىڭ.
+
+ ]]>
+
+
+ ۋاقتىدا ئۇلىنالمىدى
+
ئۇلىنالمىدى
+
+ كۈتۈلمىگەن مۇلازىمېتىر ئىنكاسى
+
+ تور بېكەتنىڭ تور تەلىپىگە قايتۇرغان ئىنكاسى مۆلچەردىكىگە ئۇيغۇن ئەمەس، تور كۆرگۈچ داۋاملاشتۇرۇشقا ئامالسىز.
+ ]]>
+
+
+ تورسىز ھالەت
+
+
+ تور كۆرگۈچ تورسىز ھالەتتە، تەلەپ قىلغان تۈرگە ئۇلىنالمايدۇ.
+
+ - ئۈسكۈنە ئاكتىپ تورغا ئۇلانغانمۇ؟
+ - “قايتا سىناش” نى بېسىپ ئاكتىپ ھالەتكە ئالماشتۇرۇڭ ۋە بەتنى قايتا يۈكلەڭ.
+
+ ]]>
+
+
+ بىخەتەرلىك سەۋەبىدىن پورت چەكلەنگەن
+
+
+ ئۇلىنىش ئەسلىگە كەلتۈرۈلدى
+
خەتەرلىك ھۆججەت تىپى
+
+
+ توربېكەت ئىگىلىرى بىلەن ئالاقىلىشىپ ، ئۇلارغا بۇ مەسىلىنى ئۇقتۇرۇڭ.
+
+ ]]>
+
+
+ مەزمۇن بۇزۇلغان
+
+
+ مەزمۇن كودلاش خاتالىقى
+
+
+ ئادرېس تېپىلمىدى
+
تورغا ئۇلانمىغان
+
+ تور ئۇلىنىشىڭىزنى تەكشۈرۈڭ ياكى بىر نەچچە مىنۇتتىن كېيىن بەتنى قايتا يۈكلەڭ.
قايتا يۈكلە
@@ -42,6 +121,14 @@
ئادرېس ئىناۋەتسىز
+
+
+ تور ئادرېسى ئادەتتە مىسالدىكىدەك يېزىلىدۇ، مىسال- http://www.example.com/
+ ئىشلەتكىنىڭىزنىڭ يانتۇ سېزىق ئىكەنلىكىنى جەزىملەشتۈرۈڭ.(مىسال. /).
+
+ ]]>
+
نامەلۇم كېلىشىم
@@ -51,10 +138,28 @@
ھۆججەتنى زىيارەت قىلىش رەت قىلىندى
+
+ ھۆججەت يۇيۇلغان ياكى يۆتكەلگەن ۋە ياكى زىيارەت ھوقۇقى يوق بولۇشى مۇمكىن
+
+ ]]>
+
ۋاكالەتچى مۇلازىمېتىر ئۇلىنىشنى رەت قىلدى
ۋاكالەتچى مۇلازىمېتىر تېپىلمىدى
+
+ يامان غەرەزلىك تور بېكەت مەسىلىسى
+
+
+ كېرەكسىز بېكەت مەسىلىسى
+
+
+ زىيانلىق تور بېكەت مەسىلىسى
+
+
+ ئالدامچىلىق تور بېكىتى مەسىلىسى
+
diff --git a/components/browser/menu/src/main/res/values-ug/strings.xml b/components/browser/menu/src/main/res/values-ug/strings.xml
new file mode 100644
index 00000000000..2697dda1e4e
--- /dev/null
+++ b/components/browser/menu/src/main/res/values-ug/strings.xml
@@ -0,0 +1,11 @@
+
+
+
+ تىزىملىك
+
+ ئالاھىدە
+
+ قىستۇرما
+
+ قىستۇرما باشقۇرغۇچ
+
diff --git a/components/browser/menu2/src/main/res/values-ug/strings.xml b/components/browser/menu2/src/main/res/values-ug/strings.xml
new file mode 100644
index 00000000000..444cf112192
--- /dev/null
+++ b/components/browser/menu2/src/main/res/values-ug/strings.xml
@@ -0,0 +1,7 @@
+
+
+
+ تىزىملىك
+
+ ئالاھىدە
+
diff --git a/components/browser/toolbar/src/main/res/values-ug/strings.xml b/components/browser/toolbar/src/main/res/values-ug/strings.xml
new file mode 100644
index 00000000000..54765124e64
--- /dev/null
+++ b/components/browser/toolbar/src/main/res/values-ug/strings.xml
@@ -0,0 +1,16 @@
+
+
+
+ تىزىملىك
+ تازىلاش
+
+ ئىزلاشتىن توسۇش ئىقتىدارى ئوچۇق
+
+ بۇ توربېكەتكە نىسبەتەن ئىزلاش ئېتىلگەن
+
+ بېكەت ئۇچۇرى
+
+ يۈكلەۋاتىدۇ
+
+ بەزى مەزمۇنلار «ئاپتوماتىك قويۇش» تەرىپىدىن توسۇلدى
+
diff --git a/components/compose/awesomebar/src/main/java/mozilla/components/compose/browser/awesomebar/internal/Suggestion.kt b/components/compose/awesomebar/src/main/java/mozilla/components/compose/browser/awesomebar/internal/Suggestion.kt
index bdcd37126bb..0045172c602 100644
--- a/components/compose/awesomebar/src/main/java/mozilla/components/compose/browser/awesomebar/internal/Suggestion.kt
+++ b/components/compose/awesomebar/src/main/java/mozilla/components/compose/browser/awesomebar/internal/Suggestion.kt
@@ -17,13 +17,16 @@ import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
+import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
+import androidx.compose.ui.draw.clip
import androidx.compose.ui.draw.rotate
import androidx.compose.ui.graphics.ColorFilter
import androidx.compose.ui.graphics.asImageBitmap
+import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.platform.testTag
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
@@ -135,8 +138,10 @@ private fun SuggestionIcon(
contentDescription = null,
modifier = Modifier
.padding(top = 8.dp)
+ .clip(RoundedCornerShape(2.dp))
.width(24.dp)
- .height(24.dp)
+ .height(24.dp),
+ contentScale = ContentScale.Crop,
)
if (indicator != null) {
Image(
diff --git a/components/compose/awesomebar/src/main/res/values-ug/strings.xml b/components/compose/awesomebar/src/main/res/values-ug/strings.xml
new file mode 100644
index 00000000000..476b29d8a2a
--- /dev/null
+++ b/components/compose/awesomebar/src/main/res/values-ug/strings.xml
@@ -0,0 +1,5 @@
+
+
+
+ تەكلىپنى قوبۇل قىلىپ تەھرىرلەيدۇ
+
diff --git a/components/feature/addons/src/main/res/values-yo/strings.xml b/components/feature/addons/src/main/res/values-yo/strings.xml
index 5338d89aa56..f8781d8c022 100644
--- a/components/feature/addons/src/main/res/values-yo/strings.xml
+++ b/components/feature/addons/src/main/res/values-yo/strings.xml
@@ -169,7 +169,7 @@
Ó ní àṣeyọrí ṣíṣiṣẹ́ %1$s
- Kùnà láti ṣiṣẹ́ %1$s%1$s
+ Kùnà láti ṣiṣẹ́ %1$s
Ní àṣeyọrí ìyọkúrò %1$s
diff --git a/components/feature/media/src/main/java/mozilla/components/feature/media/fullscreen/MediaSessionFullscreenFeature.kt b/components/feature/media/src/main/java/mozilla/components/feature/media/fullscreen/MediaSessionFullscreenFeature.kt
index 4e8aa099b2d..a0669daacba 100644
--- a/components/feature/media/src/main/java/mozilla/components/feature/media/fullscreen/MediaSessionFullscreenFeature.kt
+++ b/components/feature/media/src/main/java/mozilla/components/feature/media/fullscreen/MediaSessionFullscreenFeature.kt
@@ -7,6 +7,7 @@ package mozilla.components.feature.media.fullscreen
import android.app.Activity
import android.content.pm.ActivityInfo
import android.os.Build
+import android.view.WindowManager
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.cancel
import kotlinx.coroutines.flow.collect
@@ -14,6 +15,7 @@ import kotlinx.coroutines.flow.map
import mozilla.components.browser.state.selector.findCustomTabOrSelectedTab
import mozilla.components.browser.state.state.SessionState
import mozilla.components.browser.state.store.BrowserStore
+import mozilla.components.concept.engine.mediasession.MediaSession
import mozilla.components.lib.state.ext.flowScoped
import mozilla.components.support.base.feature.LifecycleAwareFeature
import mozilla.components.support.ktx.kotlinx.coroutines.flow.ifChanged
@@ -37,6 +39,7 @@ class MediaSessionFullscreenFeature(
tab.filter { it.mediaSessionState != null && it.mediaSessionState!!.fullscreen }
}.ifChanged().collect { states ->
processFullscreen(states)
+ processDeviceSleepMode(states)
}
}
}
@@ -67,6 +70,23 @@ class MediaSessionFullscreenFeature(
}
}
+ private fun processDeviceSleepMode(sessionStates: List) {
+ val activeTabState = sessionStates.firstOrNull()
+ if (activeTabState == null || activeTabState.mediaSessionState?.fullscreen != true) {
+ return
+ }
+ activeTabState.mediaSessionState?.let {
+ when (activeTabState.mediaSessionState?.playbackState) {
+ MediaSession.PlaybackState.PLAYING -> {
+ activity.window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
+ }
+ else -> {
+ activity.window.clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
+ }
+ }
+ }
+ }
+
override fun stop() {
scope?.cancel()
}
diff --git a/components/feature/media/src/test/java/mozilla/components/feature/media/fullscreen/MediaSessionFullscreenFeatureTest.kt b/components/feature/media/src/test/java/mozilla/components/feature/media/fullscreen/MediaSessionFullscreenFeatureTest.kt
index fd1cff3afe2..941a0f8f7b6 100644
--- a/components/feature/media/src/test/java/mozilla/components/feature/media/fullscreen/MediaSessionFullscreenFeatureTest.kt
+++ b/components/feature/media/src/test/java/mozilla/components/feature/media/fullscreen/MediaSessionFullscreenFeatureTest.kt
@@ -7,6 +7,8 @@ package mozilla.components.feature.media.fullscreen
import android.app.Activity
import android.content.pm.ActivityInfo
import android.os.Build
+import android.view.Window
+import android.view.WindowManager
import androidx.test.ext.junit.runners.AndroidJUnit4
import mozilla.components.browser.state.action.ContentAction
import mozilla.components.browser.state.action.CustomTabListAction
@@ -23,12 +25,14 @@ import mozilla.components.support.test.ext.joinBlocking
import mozilla.components.support.test.libstate.ext.waitUntilIdle
import mozilla.components.support.test.mock
import mozilla.components.support.test.rule.MainCoroutineRule
+import mozilla.components.support.test.whenever
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotEquals
import org.junit.Assert.assertTrue
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
+import org.mockito.Mockito.atLeastOnce
import org.mockito.Mockito.verify
import org.robolectric.Robolectric
import org.robolectric.annotation.Config
@@ -320,4 +324,49 @@ class MediaSessionFullscreenFeatureTest {
assertNotEquals(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE, externalActivity.requestedOrientation)
}
+
+ @Test
+ fun `GIVEN the selected tab in fullscreen mode WHEN the media is paused or stopped THEN release the wake lock of the device`() {
+ val activity: Activity = mock()
+ val window: Window = mock()
+
+ whenever(activity.window).thenReturn(window)
+
+ val elementMetadata = MediaSession.ElementMetadata()
+ val initialState = BrowserState(
+ tabs = listOf(
+ createTab(
+ "https://www.mozilla.org", id = "tab1",
+ mediaSessionState = MediaSessionState(
+ mock(),
+ elementMetadata = elementMetadata,
+ playbackState = MediaSession.PlaybackState.PLAYING,
+ fullscreen = true
+ )
+ )
+ ),
+ selectedTabId = "tab1"
+ )
+ val store = BrowserStore(initialState)
+
+ val feature = MediaSessionFullscreenFeature(
+ activity,
+ store,
+ null
+ )
+ feature.start()
+ verify(activity.window).addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
+
+ store.dispatch(MediaSessionAction.UpdateMediaPlaybackStateAction("tab1", MediaSession.PlaybackState.PAUSED))
+ store.waitUntilIdle()
+ verify(activity.window).clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
+
+ store.dispatch(MediaSessionAction.UpdateMediaPlaybackStateAction("tab1", MediaSession.PlaybackState.PLAYING))
+ store.waitUntilIdle()
+ verify(activity.window, atLeastOnce()).addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
+
+ store.dispatch(MediaSessionAction.DeactivatedMediaSessionAction("tab1"))
+ store.waitUntilIdle()
+ verify(activity.window, atLeastOnce()).clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
+ }
}
diff --git a/components/feature/prompts/src/main/java/mozilla/components/feature/prompts/PromptFeature.kt b/components/feature/prompts/src/main/java/mozilla/components/feature/prompts/PromptFeature.kt
index 74a0bc7f0a3..2a812b6d796 100644
--- a/components/feature/prompts/src/main/java/mozilla/components/feature/prompts/PromptFeature.kt
+++ b/components/feature/prompts/src/main/java/mozilla/components/feature/prompts/PromptFeature.kt
@@ -319,6 +319,11 @@ class PromptFeature private constructor(
activePromptRequest as SelectAddress
)
}
+ is SingleChoice,
+ is MultipleChoice,
+ is MenuChoice -> {
+ (activePrompt?.get() as? ChoiceDialogFragment)?.dismissAllowingStateLoss()
+ }
else -> {
// no-op
}
diff --git a/components/feature/prompts/src/main/res/values-bg/strings.xml b/components/feature/prompts/src/main/res/values-bg/strings.xml
index 1274a411904..8c55aa095a6 100644
--- a/components/feature/prompts/src/main/res/values-bg/strings.xml
+++ b/components/feature/prompts/src/main/res/values-bg/strings.xml
@@ -1,5 +1,5 @@
-
+
Добре
@@ -107,4 +107,12 @@
Сгъва предложения списък с банкови карти
Управление на банкови карти
-
+
+ Обновяване на валидността на картата?
+
+
+
+ Изберете адрес
+
+ Управление на адреси
+
diff --git a/components/feature/prompts/src/main/res/values-gd/strings.xml b/components/feature/prompts/src/main/res/values-gd/strings.xml
index 1ba8e814751..1608e19afa1 100644
--- a/components/feature/prompts/src/main/res/values-gd/strings.xml
+++ b/components/feature/prompts/src/main/res/values-gd/strings.xml
@@ -1,5 +1,5 @@
-
+
Ceart ma-thà
@@ -107,4 +107,22 @@
Co-theannaich na cairtean-creideis a mholamaid
Stiùirich na cairtean-creideis
-
+
+ A bheil thu airson a’ chairt seo a shàbhaladh air dòigh thèarainte?
+
+ A bheil thu airson an latha a dh’fhalbhas an ùine air a’ chairt ùrachadh?
+
+ Thèid àireamh na cairte a chrioptachadh. Cha tèid an còd tèarainteachd a shàbhaladh.
+
+
+
+ Tagh na seòlaidhean
+
+ Tagh seòladh
+
+ Leudaich na seòlaidhean a tha gam moladh
+
+ Co-theannaich na seòlaidhean a tha gam moladh
+
+ Stiùirich na seòlaidhean
+
diff --git a/components/feature/prompts/src/main/res/values-yo/strings.xml b/components/feature/prompts/src/main/res/values-yo/strings.xml
index b0c6135af1e..3acb76ccda9 100644
--- a/components/feature/prompts/src/main/res/values-yo/strings.xml
+++ b/components/feature/prompts/src/main/res/values-yo/strings.xml
@@ -4,6 +4,8 @@
Ó DÁA
Parẹ́
+
+ Ṣe ìdíwọ́ fún ojú-ìwé yìí láti ṣẹ̀dá ìsọ̀rọ̀ńgbèsì mìíràn
Ṣètò
@@ -36,6 +38,9 @@
Ṣe ìsọdituntun fún ohun-ìwọlé yìí?
Ṣe àfikún orúkọ-aṣàmúlò mọ́ ọ̀rọ̀-ìṣínà tó wà ní ìpamọ́?
+
+
+ Lébẹ́ẹ̀lì fún títẹ ọ̀rọ̀ sí
Yan àwọ̀ kan
@@ -88,6 +93,7 @@
Tún dátà ráńṣẹ́ sí sáìtì yí?
+ Dídá ojú-ìwé yìí padà lé è sọ àwọn ìṣẹ̀lẹ̀ àìpẹ́ di méjì, gẹ́gẹ́ bíi ka máa fi owó ránṣé tàbí fífi ọ̀rọ̀ àsọyé ránṣẹ́ lẹ́ẹ̀mejì.
Fi dátà ráńṣẹ́ lẹ́ẹ̀kan si
@@ -107,6 +113,9 @@
Ṣe ìsọdituntun fún ọjọ́ òpin-ìlò káàdì?
+
+ A ó sọ nọ́ḿbà káàdì di kóòdù. A ò ní ṣe ìfipamọ́ kóòdù ààbò.
+
Yan àwọn àdírẹ́sì
diff --git a/components/feature/pwa/src/main/res/values-yo/strings.xml b/components/feature/pwa/src/main/res/values-yo/strings.xml
new file mode 100644
index 00000000000..8f67cb1d1cd
--- /dev/null
+++ b/components/feature/pwa/src/main/res/values-yo/strings.xml
@@ -0,0 +1,14 @@
+
+
+
+ Ojúlé wẹ́ẹ̀bù
+
+
+ Sáíìtì ìṣàkóso ìwòran gbogbogbò
+
+ Tẹ̀ẹ́ to bá fẹ́ da URL fún áàpù yí kọ
+
+ Sọdọ̀tun
+
+ URL ti wà ní àdàkọ.
+
diff --git a/components/feature/pwa/src/test/java/mozilla/components/feature/pwa/feature/WebAppActivityFeatureTest.kt b/components/feature/pwa/src/test/java/mozilla/components/feature/pwa/feature/WebAppActivityFeatureTest.kt
index aeb1606b28e..1d4961585de 100644
--- a/components/feature/pwa/src/test/java/mozilla/components/feature/pwa/feature/WebAppActivityFeatureTest.kt
+++ b/components/feature/pwa/src/test/java/mozilla/components/feature/pwa/feature/WebAppActivityFeatureTest.kt
@@ -9,7 +9,6 @@ import android.content.pm.ActivityInfo
import android.os.Looper.getMainLooper
import android.view.View
import android.view.Window
-import android.view.WindowManager
import androidx.test.ext.junit.runners.AndroidJUnit4
import kotlinx.coroutines.CompletableDeferred
import mozilla.components.browser.icons.BrowserIcons
@@ -22,7 +21,6 @@ import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.Mock
import org.mockito.Mockito.`when`
-import org.mockito.Mockito.never
import org.mockito.Mockito.verify
import org.mockito.MockitoAnnotations.openMocks
import org.robolectric.Shadows.shadowOf
@@ -52,13 +50,11 @@ class WebAppActivityFeatureTest {
display = WebAppManifest.DisplayMode.STANDALONE
)
WebAppActivityFeature(activity, icons, basicManifest).onResume(mock())
- verify(window, never()).addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
val fullscreenManifest = basicManifest.copy(
display = WebAppManifest.DisplayMode.FULLSCREEN
)
WebAppActivityFeature(activity, icons, fullscreenManifest).onResume(mock())
- verify(window).addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
}
@Test
diff --git a/components/feature/qr/src/main/res/values-yo/strings.xml b/components/feature/qr/src/main/res/values-yo/strings.xml
new file mode 100644
index 00000000000..a17b5f6d7a6
--- /dev/null
+++ b/components/feature/qr/src/main/res/values-yo/strings.xml
@@ -0,0 +1,10 @@
+
+
+
+
+ Síkánà QR
+
+
+ Kò sí ẹ̀rọ-ayàwòrán kankan lórí ẹ̀rọ yìí
+
+
diff --git a/components/feature/readerview/src/main/res/values-oc/strings.xml b/components/feature/readerview/src/main/res/values-oc/strings.xml
index 90c338c3346..b914e4e8565 100644
--- a/components/feature/readerview/src/main/res/values-oc/strings.xml
+++ b/components/feature/readerview/src/main/res/values-oc/strings.xml
@@ -5,17 +5,17 @@
Sans serif
- Poliça Sans Serif
+ Polissa Sans Serif
Serif
- Poliça Serif
+ Polissa Serif
- Reduccion de la talha de la poliça
+ Reduccion de la talha de la polissa
- Agrandiment de la talha de la poliça
+ Agrandiment de la talha de la polissa
Fosc
diff --git a/components/feature/readerview/src/main/res/values-yo/strings.xml b/components/feature/readerview/src/main/res/values-yo/strings.xml
new file mode 100644
index 00000000000..135da6274e0
--- /dev/null
+++ b/components/feature/readerview/src/main/res/values-yo/strings.xml
@@ -0,0 +1,29 @@
+
+
+
+ Sans serif
+
+ Sans Serif font
+
+ Serif
+
+ Fọ́ǹtì sérọ̀fù
+
+
+ Ìwọn fọ́ǹtì dínkù
+
+
+ Ìwọn fọ́ǹtì pọ̀ si
+
+ Dúdú
+
+ Ìlànà aláwọ̀ dúdú
+
+ Sepia
+
+ Ìlànà aláwọ̀ Sepia
+
+ Mọ́lẹ̀
+
+ Ìlànà aláwọ̀ tó mọ́lẹ̀
+
diff --git a/components/feature/sitepermissions/src/main/res/values-gd/strings.xml b/components/feature/sitepermissions/src/main/res/values-gd/strings.xml
index f520ca39980..5dd5cc7805d 100644
--- a/components/feature/sitepermissions/src/main/res/values-gd/strings.xml
+++ b/components/feature/sitepermissions/src/main/res/values-gd/strings.xml
@@ -35,4 +35,14 @@
An doir thu cead dha %1$s dàta a chumail san stòras bhuan?
A bheil thu airson cead a thoirt dha %1$s susbaint fo smachd DRM a chluich?
+
+ A bheil thu airson leigeil le %1$s na briosgaidean aice a chleachadh air %2$s?
+
+ Dh’fhaoidte gum b’ fheàirrde dhut an t-inntrigeadh a bhacadh mur eil thu cinnteach carson a dh’fheumas %s an dàta seo.
+
+ Bac
+
+ Barrachd fiosrachaidh
diff --git a/components/feature/sitepermissions/src/main/res/values-yo/strings.xml b/components/feature/sitepermissions/src/main/res/values-yo/strings.xml
new file mode 100644
index 00000000000..ca9ed2c1801
--- /dev/null
+++ b/components/feature/sitepermissions/src/main/res/values-yo/strings.xml
@@ -0,0 +1,48 @@
+
+
+
+ Fàyègba %1$s láti fi àwọn ìtanilólobó ráńṣẹ́?
+
+ Fàyègba %1$s láti lo èrọ-ayàwòrán rẹ?
+
+ Fàyègba %1$s láti lo ẹ̀rọ-ìgbóhùn rẹ?
+
+ Gbà láàyè %1$s láti lo ibi tí o wà?
+
+ Fàyègba %1$s láti lo ẹ̀rọ-ayàwòrán àti ẹ̀rọ-ìgbóhùn rẹ?
+
+ Ẹ̀rọ-ìgbóhùn 1
+
+ Ẹ̀rọ-ayàwòrán tó ń kọjú-sẹ́hìn
+
+ Ẹ̀rọ-ayàwòrán tó ń kojú-síwájú
+
+ Fàyègbà
+
+ Má ṣe fàyègbà
+
+ Rántí ìpinnu fún sáìtì yí
+
+ Ní gbogbo ìgbà
+
+ Láéláé
+
+ Fàyègba %1$s láti fi dátà pamọ́ sí àyè tó dúróore?
+
+ Fàyègba %1$s láti mú àkóónú ìṣàkóso DRM ṣiṣẹ́ bí?
+
+ Falyègba %1$s láti lo àwọn kúkì rẹ̀ lórí %2$s?
+
+ O lè fẹ́ dẹ̀nà ìwọlé tó bá rú ọ lójú ìdí %s tó fi nílò dátà yí.
+
+ Dẹ̀nà
+
+ Kẹ́kọ̀ọ́ si
+
diff --git a/components/feature/tabs/src/main/res/values-yo/strings.xml b/components/feature/tabs/src/main/res/values-yo/strings.xml
new file mode 100644
index 00000000000..5c52ab2051f
--- /dev/null
+++ b/components/feature/tabs/src/main/res/values-yo/strings.xml
@@ -0,0 +1,5 @@
+
+
+
+ Àwọn táàbù
+
diff --git a/components/feature/webnotifications/src/main/res/values-yo/strings.xml b/components/feature/webnotifications/src/main/res/values-yo/strings.xml
new file mode 100644
index 00000000000..2bde7e11dfb
--- /dev/null
+++ b/components/feature/webnotifications/src/main/res/values-yo/strings.xml
@@ -0,0 +1,5 @@
+
+
+
+ Àwọn ìtalólobó sáìtì
+
diff --git a/components/lib/crash/src/main/java/mozilla/components/lib/crash/handler/CrashHandlerService.kt b/components/lib/crash/src/main/java/mozilla/components/lib/crash/handler/CrashHandlerService.kt
index dce9f48c775..d4d0b4b6f09 100644
--- a/components/lib/crash/src/main/java/mozilla/components/lib/crash/handler/CrashHandlerService.kt
+++ b/components/lib/crash/src/main/java/mozilla/components/lib/crash/handler/CrashHandlerService.kt
@@ -49,10 +49,7 @@ class CrashHandlerService : Service() {
val channel = CrashNotification.ensureChannelExists(this)
val notification = NotificationCompat.Builder(this, channel)
.setContentTitle(
- getString(
- R.string.mozac_lib_crash_dialog_title,
- crashReporter.promptConfiguration.appName
- )
+ getString(R.string.mozac_lib_gathering_crash_data_in_progress)
)
.setSmallIcon(R.drawable.mozac_lib_crash_notification)
.setPriority(NotificationCompat.PRIORITY_DEFAULT)
diff --git a/components/lib/crash/src/main/java/mozilla/components/lib/crash/notification/CrashNotification.kt b/components/lib/crash/src/main/java/mozilla/components/lib/crash/notification/CrashNotification.kt
index be6aa7048a6..6bf36573532 100644
--- a/components/lib/crash/src/main/java/mozilla/components/lib/crash/notification/CrashNotification.kt
+++ b/components/lib/crash/src/main/java/mozilla/components/lib/crash/notification/CrashNotification.kt
@@ -15,10 +15,8 @@ import mozilla.components.lib.crash.Crash
import mozilla.components.lib.crash.CrashReporter
import mozilla.components.lib.crash.R
import mozilla.components.lib.crash.prompt.CrashPrompt
-import mozilla.components.lib.crash.service.SendCrashReportService
import mozilla.components.support.base.ids.SharedIdsHelper
import mozilla.components.support.utils.PendingIntentUtils
-import mozilla.components.support.utils.asForegroundServicePendingIntent
private const val NOTIFICATION_SDK_LEVEL = 29 // On Android Q+ we show a notification instead of a prompt
@@ -38,13 +36,6 @@ internal class CrashNotification(
CrashPrompt.createIntent(context, crash), getNotificationFlag()
)
- val reportPendingIntent = SendCrashReportService
- .createReportIntent(context, crash, NOTIFICATION_TAG, NOTIFICATION_ID)
- .asForegroundServicePendingIntent(
- context, SharedIdsHelper.getNextIdForTag(context, PENDING_INTENT_TAG),
- getNotificationFlag()
- )
-
val channel = ensureChannelExists(context)
val title = if (crash is Crash.NativeCodeCrash &&
@@ -69,7 +60,7 @@ internal class CrashNotification(
context.getString(
R.string.mozac_lib_crash_notification_action_report
),
- reportPendingIntent
+ pendingIntent,
)
.setAutoCancel(true)
.build()
diff --git a/components/lib/crash/src/main/java/mozilla/components/lib/crash/prompt/CrashReporterActivity.kt b/components/lib/crash/src/main/java/mozilla/components/lib/crash/prompt/CrashReporterActivity.kt
index 772c2e6a269..87d2ca41907 100644
--- a/components/lib/crash/src/main/java/mozilla/components/lib/crash/prompt/CrashReporterActivity.kt
+++ b/components/lib/crash/src/main/java/mozilla/components/lib/crash/prompt/CrashReporterActivity.kt
@@ -12,10 +12,14 @@ import androidx.annotation.VisibleForTesting
import androidx.annotation.VisibleForTesting.PRIVATE
import androidx.appcompat.app.AppCompatActivity
import androidx.constraintlayout.widget.ConstraintLayout
+import androidx.core.app.NotificationManagerCompat
import mozilla.components.lib.crash.Crash
import mozilla.components.lib.crash.CrashReporter
import mozilla.components.lib.crash.R
import mozilla.components.lib.crash.databinding.MozacLibCrashCrashreporterBinding
+import mozilla.components.lib.crash.notification.CrashNotification
+import mozilla.components.lib.crash.notification.NOTIFICATION_ID
+import mozilla.components.lib.crash.notification.NOTIFICATION_TAG
import kotlin.coroutines.CoroutineContext
import kotlin.coroutines.EmptyCoroutineContext
@@ -40,6 +44,12 @@ class CrashReporterActivity : AppCompatActivity() {
internal lateinit var binding: MozacLibCrashCrashreporterBinding
override fun onCreate(savedInstanceState: Bundle?) {
+ // if the activity is started by user tapping on the crash notification's report button,
+ // remove the crash notification.
+ if (CrashNotification.shouldShowNotificationInsteadOfPrompt(crash)) {
+ NotificationManagerCompat.from(applicationContext).cancel(NOTIFICATION_TAG, NOTIFICATION_ID)
+ }
+
setTheme(crashReporter.promptConfiguration.theme)
super.onCreate(savedInstanceState)
@@ -54,9 +64,7 @@ class CrashReporterActivity : AppCompatActivity() {
val appName = crashReporter.promptConfiguration.appName
val organizationName = crashReporter.promptConfiguration.organizationName
- val isBackgroundCrash = (crash as? Crash.NativeCodeCrash)?.processType ==
- Crash.NativeCodeCrash.PROCESS_TYPE_BACKGROUND_CHILD
- binding.titleView.text = when (isBackgroundCrash) {
+ binding.titleView.text = when (isRecoverableBackgroundCrash(crash)) {
true -> getString(
R.string.mozac_lib_crash_background_process_notification_title,
appName
@@ -74,7 +82,7 @@ class CrashReporterActivity : AppCompatActivity() {
binding.closeButton.setOnClickListener { close() }
// For background crashes show just the close button. Otherwise show close and restart.
- if (isBackgroundCrash) {
+ if (isRecoverableBackgroundCrash(crash)) {
binding.restartButton.visibility = View.GONE
val closeButtonParams = binding.closeButton.layoutParams as ConstraintLayout.LayoutParams
closeButtonParams.startToStart = ConstraintLayout.LayoutParams.UNSET
@@ -130,6 +138,15 @@ class CrashReporterActivity : AppCompatActivity() {
}
}
+ /*
+ * Return true if the crash occurred in the background and is recoverable. (ex: GPU process crash)
+ */
+ @VisibleForTesting
+ internal fun isRecoverableBackgroundCrash(crash: Crash): Boolean {
+ return crash is Crash.NativeCodeCrash &&
+ crash.processType == Crash.NativeCodeCrash.PROCESS_TYPE_BACKGROUND_CHILD
+ }
+
companion object {
@VisibleForTesting(otherwise = PRIVATE)
diff --git a/components/lib/crash/src/main/res/values-ast/strings.xml b/components/lib/crash/src/main/res/values-ast/strings.xml
index c95f70e6a38..ddeb6024e7c 100644
--- a/components/lib/crash/src/main/res/values-ast/strings.xml
+++ b/components/lib/crash/src/main/res/values-ast/strings.xml
@@ -24,6 +24,9 @@
Unviando l\'informe del fallu a %1$s
+
+ Recoyendo los datos del casque
+
Recoyendo los datos telemétricos del casque
diff --git a/components/lib/crash/src/main/res/values-cs/strings.xml b/components/lib/crash/src/main/res/values-cs/strings.xml
index 0cb4cf68768..95e35643acf 100644
--- a/components/lib/crash/src/main/res/values-cs/strings.xml
+++ b/components/lib/crash/src/main/res/values-cs/strings.xml
@@ -24,6 +24,12 @@
Odesílání hlášení o pádu společnosti %1$s
+
+ Shromažďování dat o pádu
+
+
+ Shromažďování telemetrických dat o pádu
+
Hlášení pádů
diff --git a/components/lib/crash/src/main/res/values-de/strings.xml b/components/lib/crash/src/main/res/values-de/strings.xml
index 1367ff5fb7b..54e7c24653f 100644
--- a/components/lib/crash/src/main/res/values-de/strings.xml
+++ b/components/lib/crash/src/main/res/values-de/strings.xml
@@ -24,6 +24,9 @@
Absturzbericht wird an %1$s gesendet
+
+ Absturzdaten werden erfasst
+
Telemetriedaten zum Absturz werden gesammelt
diff --git a/components/lib/crash/src/main/res/values-dsb/strings.xml b/components/lib/crash/src/main/res/values-dsb/strings.xml
index 0fb6ba7fb17..ba05b962f66 100644
--- a/components/lib/crash/src/main/res/values-dsb/strings.xml
+++ b/components/lib/crash/src/main/res/values-dsb/strings.xml
@@ -24,6 +24,9 @@
Wowaleńska rozpšawa se %1$s sćelo
+
+ Daty wowalenja se gromaźe
+
Telemetrijowe daty wowalenjow se gromaźe
diff --git a/components/lib/crash/src/main/res/values-el/strings.xml b/components/lib/crash/src/main/res/values-el/strings.xml
index 312d645611b..452732b283f 100644
--- a/components/lib/crash/src/main/res/values-el/strings.xml
+++ b/components/lib/crash/src/main/res/values-el/strings.xml
@@ -25,6 +25,9 @@
Αποστολή αναφοράς κατάρρευσης στη %1$s
+
+ Συλλογή δεδομένων κατάρρευσης
+
Συλλογή δεδομένων τηλεμετρίας κατάρρευσης
diff --git a/components/lib/crash/src/main/res/values-en-rGB/strings.xml b/components/lib/crash/src/main/res/values-en-rGB/strings.xml
index 8b240113af4..38b0b2e6475 100644
--- a/components/lib/crash/src/main/res/values-en-rGB/strings.xml
+++ b/components/lib/crash/src/main/res/values-en-rGB/strings.xml
@@ -24,6 +24,9 @@
Sending crash report to %1$s
+
+ Gathering crash data
+
Gathering crash telemetry data
diff --git a/components/lib/crash/src/main/res/values-es-rAR/strings.xml b/components/lib/crash/src/main/res/values-es-rAR/strings.xml
index dbf5d1537b1..05bfa9734ca 100644
--- a/components/lib/crash/src/main/res/values-es-rAR/strings.xml
+++ b/components/lib/crash/src/main/res/values-es-rAR/strings.xml
@@ -24,6 +24,9 @@
Enviando informe de fallo a %1$s
+
+ Recopilando datos de la colgada
+
Recopilación de datos de telemetría de fallos
diff --git a/components/lib/crash/src/main/res/values-es-rCL/strings.xml b/components/lib/crash/src/main/res/values-es-rCL/strings.xml
index f77ecd86570..b4cd64fb0d1 100644
--- a/components/lib/crash/src/main/res/values-es-rCL/strings.xml
+++ b/components/lib/crash/src/main/res/values-es-rCL/strings.xml
@@ -24,6 +24,9 @@
Enviando reporte de fallos a %1$s
+
+ Recopilando datos de fallos
+
Recopilación de datos de telemetría de fallos
diff --git a/components/lib/crash/src/main/res/values-es-rMX/strings.xml b/components/lib/crash/src/main/res/values-es-rMX/strings.xml
index 8c20fb9582a..f68b71a3efc 100644
--- a/components/lib/crash/src/main/res/values-es-rMX/strings.xml
+++ b/components/lib/crash/src/main/res/values-es-rMX/strings.xml
@@ -24,6 +24,9 @@
Enviando informe de fallo a %1$s
+
+ Recopilación de datos de errores
+
Recopilación de datos de telemetría de fallos
diff --git a/components/lib/crash/src/main/res/values-eu/strings.xml b/components/lib/crash/src/main/res/values-eu/strings.xml
index aed922167b9..de1d055c872 100644
--- a/components/lib/crash/src/main/res/values-eu/strings.xml
+++ b/components/lib/crash/src/main/res/values-eu/strings.xml
@@ -24,6 +24,9 @@
Hutsegite-txostena %1$s(e)ra bidaltzen
+
+ Hutsegitearen datuak biltzen
+
Hutsegitearen datu telemetrikoak biltzen
diff --git a/components/lib/crash/src/main/res/values-fi/strings.xml b/components/lib/crash/src/main/res/values-fi/strings.xml
index e3a2793a371..6a720554ceb 100644
--- a/components/lib/crash/src/main/res/values-fi/strings.xml
+++ b/components/lib/crash/src/main/res/values-fi/strings.xml
@@ -25,6 +25,9 @@
Lähetetään kaatumisraportti %1$slle
+
+ Kerätään kaatumistietoja
+
Kerätään kaatumistelemetriatietoja
diff --git a/components/lib/crash/src/main/res/values-gd/strings.xml b/components/lib/crash/src/main/res/values-gd/strings.xml
index ed08a0fbac9..cb41a846145 100644
--- a/components/lib/crash/src/main/res/values-gd/strings.xml
+++ b/components/lib/crash/src/main/res/values-gd/strings.xml
@@ -15,12 +15,21 @@
Tuislidhean
+
+ Tha sinn duilich ach dh’èirich duilgheadas ann an %1$s.
+
Dèan aithris
A’ cur aithisg an tuislidh gu %1$s
+
+ A’ cruinneachadh an dàta mun tuisleadh
+
+
+ A’ cruinneachadh dàta telemeatraidh mun tuisleadh
+
Aithisgean tuislidh
diff --git a/components/lib/crash/src/main/res/values-hsb/strings.xml b/components/lib/crash/src/main/res/values-hsb/strings.xml
index 5988021b2a2..d838bfa9e4b 100644
--- a/components/lib/crash/src/main/res/values-hsb/strings.xml
+++ b/components/lib/crash/src/main/res/values-hsb/strings.xml
@@ -24,6 +24,9 @@
Spadowa rozprawa so %1$s sćele
+
+ Daty spada so hromadźa
+
Telemetrijowe daty spadow so hromadźa
diff --git a/components/lib/crash/src/main/res/values-hu/strings.xml b/components/lib/crash/src/main/res/values-hu/strings.xml
index 2f2eb7442f1..e5529da97b9 100644
--- a/components/lib/crash/src/main/res/values-hu/strings.xml
+++ b/components/lib/crash/src/main/res/values-hu/strings.xml
@@ -24,6 +24,9 @@
Összeomlás-jelentés elküldése a %1$s számára
+
+ Összeomlási adatok gyűjtése
+
Összeomlási telemetriai adatok gyűjtése
diff --git a/components/lib/crash/src/main/res/values-hy-rAM/strings.xml b/components/lib/crash/src/main/res/values-hy-rAM/strings.xml
index 46bbd192982..be6443788f8 100644
--- a/components/lib/crash/src/main/res/values-hy-rAM/strings.xml
+++ b/components/lib/crash/src/main/res/values-hy-rAM/strings.xml
@@ -24,6 +24,9 @@
Ուղարկել վթարի զեկույցը %1$s-ին
+
+ Վթարի հեռաչափության տվյալների հավաքում
+
Վթարի զեկույց
diff --git a/components/lib/crash/src/main/res/values-ia/strings.xml b/components/lib/crash/src/main/res/values-ia/strings.xml
index 84aed2069fb..841dcecd255 100644
--- a/components/lib/crash/src/main/res/values-ia/strings.xml
+++ b/components/lib/crash/src/main/res/values-ia/strings.xml
@@ -24,6 +24,9 @@
Invio de reporto de crash a %1$s
+
+ Collection datos de crash
+
Colligente datos de telemetria de crash
diff --git a/components/lib/crash/src/main/res/values-in/strings.xml b/components/lib/crash/src/main/res/values-in/strings.xml
index beaa77ee8e3..24f7d67e80b 100644
--- a/components/lib/crash/src/main/res/values-in/strings.xml
+++ b/components/lib/crash/src/main/res/values-in/strings.xml
@@ -25,6 +25,9 @@
Kirim laporan mogok ke %1$s
+
+ Mengumpulkan data mogok
+
Mengumpulkan data telemetri mogok
diff --git a/components/lib/crash/src/main/res/values-is/strings.xml b/components/lib/crash/src/main/res/values-is/strings.xml
index 4eab4500c4a..e13fe8bef70 100644
--- a/components/lib/crash/src/main/res/values-is/strings.xml
+++ b/components/lib/crash/src/main/res/values-is/strings.xml
@@ -24,6 +24,9 @@
Senda hrunaskýrslu til %1$s
+
+ Safna hrungögnum
+
Safna fjarmælingargögnum um hrun
diff --git a/components/lib/crash/src/main/res/values-it/strings.xml b/components/lib/crash/src/main/res/values-it/strings.xml
index 5406dbf0739..3a1cb7deef7 100644
--- a/components/lib/crash/src/main/res/values-it/strings.xml
+++ b/components/lib/crash/src/main/res/values-it/strings.xml
@@ -24,6 +24,9 @@
Invio in corso della segnalazione di arresto anomalo a %1$s
+
+ Raccolta dei dati sugli arresti anomali
+
Raccolta dei dati di telemetria relativi agli arresti anomali
diff --git a/components/lib/crash/src/main/res/values-iw/strings.xml b/components/lib/crash/src/main/res/values-iw/strings.xml
index 7cf04364eb2..36da8bccdb5 100644
--- a/components/lib/crash/src/main/res/values-iw/strings.xml
+++ b/components/lib/crash/src/main/res/values-iw/strings.xml
@@ -25,6 +25,9 @@
דיווח קריסה נשלח אל %1$s
+
+ בתהליך איסוף נתוני קריסה
+
בתהליך איסוף נתוני קריסה
diff --git a/components/lib/crash/src/main/res/values-ka/strings.xml b/components/lib/crash/src/main/res/values-ka/strings.xml
index 30ba1a1a41d..ca895abf3dd 100644
--- a/components/lib/crash/src/main/res/values-ka/strings.xml
+++ b/components/lib/crash/src/main/res/values-ka/strings.xml
@@ -24,6 +24,9 @@
გათიშვის მოხსენება ეგზავნება %1$s-ს
+
+ გროვდება გათიშვის მონაცემები
+
აღირიცხება უეცარი გათიშვის მონაცემები
diff --git a/components/lib/crash/src/main/res/values-kab/strings.xml b/components/lib/crash/src/main/res/values-kab/strings.xml
index 5d9a9cd8e8d..093ac3608f0 100644
--- a/components/lib/crash/src/main/res/values-kab/strings.xml
+++ b/components/lib/crash/src/main/res/values-kab/strings.xml
@@ -24,6 +24,12 @@
Tuzna n uneqqis n uɣelluy i %1$s
+
+ Alqaḍ n yisefka yerrẓen
+
+
+ Alqaḍ n yisefka n tilisɣelt yerrẓen
+
Ineqqisen n uɣelluy
diff --git a/components/lib/crash/src/main/res/values-kk/strings.xml b/components/lib/crash/src/main/res/values-kk/strings.xml
index 7515b7c4294..631c4cda4ee 100644
--- a/components/lib/crash/src/main/res/values-kk/strings.xml
+++ b/components/lib/crash/src/main/res/values-kk/strings.xml
@@ -24,6 +24,9 @@
%1$s адресіне құлау жөнінде хабарламаны жіберу
+
+ Құлау деректерін жинау
+
Құлау телеметрия деректерін жинау
diff --git a/components/lib/crash/src/main/res/values-ko/strings.xml b/components/lib/crash/src/main/res/values-ko/strings.xml
index ecdbd7e00f6..c3b3ce333ea 100644
--- a/components/lib/crash/src/main/res/values-ko/strings.xml
+++ b/components/lib/crash/src/main/res/values-ko/strings.xml
@@ -24,6 +24,9 @@
%1$s에 충돌 보고서 보내기
+
+ 충돌 데이터 수집 중
+
충돌 원격 분석 데이터 수집 중
diff --git a/components/lib/crash/src/main/res/values-nb-rNO/strings.xml b/components/lib/crash/src/main/res/values-nb-rNO/strings.xml
index 4e4e2fcc293..12f4477c51d 100644
--- a/components/lib/crash/src/main/res/values-nb-rNO/strings.xml
+++ b/components/lib/crash/src/main/res/values-nb-rNO/strings.xml
@@ -24,6 +24,9 @@
Sender krasjrapport til %1$s
+
+ Samler inn krasjdata
+
Samler krasj-telemetridata
diff --git a/components/lib/crash/src/main/res/values-nn-rNO/strings.xml b/components/lib/crash/src/main/res/values-nn-rNO/strings.xml
index 41b034efaaa..7406570a665 100644
--- a/components/lib/crash/src/main/res/values-nn-rNO/strings.xml
+++ b/components/lib/crash/src/main/res/values-nn-rNO/strings.xml
@@ -24,6 +24,9 @@
Sender krasjrapport til %1$s
+
+ Samlar inn krasjdata
+
Samlar krasj-telemetridata
diff --git a/components/lib/crash/src/main/res/values-oc/strings.xml b/components/lib/crash/src/main/res/values-oc/strings.xml
index 54398d85144..58f48f7a0ce 100644
--- a/components/lib/crash/src/main/res/values-oc/strings.xml
+++ b/components/lib/crash/src/main/res/values-oc/strings.xml
@@ -25,6 +25,9 @@
Mandadís del rapòrt de plantatge a %1$s
+
+ Amassada de las donadas de plantatge
+
Amassada de las donadas de telemetria de plantatge
diff --git a/components/lib/crash/src/main/res/values-pa-rIN/strings.xml b/components/lib/crash/src/main/res/values-pa-rIN/strings.xml
index 88e31f68b1d..39b371daa13 100644
--- a/components/lib/crash/src/main/res/values-pa-rIN/strings.xml
+++ b/components/lib/crash/src/main/res/values-pa-rIN/strings.xml
@@ -25,6 +25,9 @@
ਕਰੈਸ਼ ਰਿਪੋਰਟ %1$s ਨੂੰ ਭੇਜੀ ਜਾ ਰਹੀ ਹੈ
+
+ ਕਰੈਸ਼ ਸੰਬੰਧੀ ਡਾਟੇ ਨੂੰ ਇਕੱਤਰ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ
+
ਕਰੈਸ਼ ਟੈਲੀਮੈਂਟਰੀ ਡਾਟਾ ਇਕੱਤਰ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ
diff --git a/components/lib/crash/src/main/res/values-pt-rBR/strings.xml b/components/lib/crash/src/main/res/values-pt-rBR/strings.xml
index ee67527c10f..9da369c1661 100644
--- a/components/lib/crash/src/main/res/values-pt-rBR/strings.xml
+++ b/components/lib/crash/src/main/res/values-pt-rBR/strings.xml
@@ -24,6 +24,9 @@
Enviando relatório de travamento para a %1$s
+
+ Coletando dados de falha
+
Recolhendo dados de telemetria de travamentos
diff --git a/components/lib/crash/src/main/res/values-ru/strings.xml b/components/lib/crash/src/main/res/values-ru/strings.xml
index fb564a37b85..e99e7015eaf 100644
--- a/components/lib/crash/src/main/res/values-ru/strings.xml
+++ b/components/lib/crash/src/main/res/values-ru/strings.xml
@@ -24,6 +24,9 @@
Сообщение о падении отправляется в %1$s
+
+ Сбор данных о падении
+
Сбор данных телеметрии о падениях
diff --git a/components/lib/crash/src/main/res/values-sk/strings.xml b/components/lib/crash/src/main/res/values-sk/strings.xml
index afbe12006f1..2d35f006a0e 100644
--- a/components/lib/crash/src/main/res/values-sk/strings.xml
+++ b/components/lib/crash/src/main/res/values-sk/strings.xml
@@ -24,6 +24,9 @@
Odosielanie správy o zlyhaní spoločnosti %1$s
+
+ Zhromažďujú sa údaje o zlyhaní
+
Zhromažďujú sa telemetrické údaje o zlyhaní
diff --git a/components/lib/crash/src/main/res/values-sv-rSE/strings.xml b/components/lib/crash/src/main/res/values-sv-rSE/strings.xml
index b65cf8a6108..a4c7ed95112 100644
--- a/components/lib/crash/src/main/res/values-sv-rSE/strings.xml
+++ b/components/lib/crash/src/main/res/values-sv-rSE/strings.xml
@@ -25,6 +25,9 @@
Skicka kraschrapport till %1$s
+
+ Samlar in kraschdata
+
Samlar in krasch-telemetridata
diff --git a/components/lib/crash/src/main/res/values-tg/strings.xml b/components/lib/crash/src/main/res/values-tg/strings.xml
index c003cd24439..ed7ddd9b30d 100644
--- a/components/lib/crash/src/main/res/values-tg/strings.xml
+++ b/components/lib/crash/src/main/res/values-tg/strings.xml
@@ -24,6 +24,9 @@
Гузориш дар бораи вайронӣ ба %1$s фиристода шуда истодааст
+
+ Ҷамъоварии маълумот дар бораи вайрониҳо
+
Ҷамъоварии маълумот дар бораи вайрониҳои дурсанҷӣ (телеметрия)
diff --git a/components/lib/crash/src/main/res/values-th/strings.xml b/components/lib/crash/src/main/res/values-th/strings.xml
index 2150643b3df..f32997c9b7d 100644
--- a/components/lib/crash/src/main/res/values-th/strings.xml
+++ b/components/lib/crash/src/main/res/values-th/strings.xml
@@ -24,6 +24,9 @@
กำลังส่งรายงานข้อขัดข้องไปยัง %1$s
+
+ กำลังรวบรวมข้อมูลข้อขัดข้อง
+
รายงานข้อขัดข้อง
diff --git a/components/lib/crash/src/main/res/values-tr/strings.xml b/components/lib/crash/src/main/res/values-tr/strings.xml
index 55e785bcc1f..c4b923ffb7f 100644
--- a/components/lib/crash/src/main/res/values-tr/strings.xml
+++ b/components/lib/crash/src/main/res/values-tr/strings.xml
@@ -25,6 +25,9 @@
Çökme raporu %1$s\'ya gönderiliyor
+
+ Çökme verileri toplanıyor
+
Çökme verileri toplanıyor
diff --git a/components/lib/crash/src/main/res/values-uk/strings.xml b/components/lib/crash/src/main/res/values-uk/strings.xml
index 4ed57a5f81b..26c3f264f26 100644
--- a/components/lib/crash/src/main/res/values-uk/strings.xml
+++ b/components/lib/crash/src/main/res/values-uk/strings.xml
@@ -24,6 +24,9 @@
Надсилання звіту про збій до %1$s
+
+ Збір даних про збої
+
Збір даних телеметрії про збої
diff --git a/components/lib/crash/src/main/res/values-vi/strings.xml b/components/lib/crash/src/main/res/values-vi/strings.xml
index 3ccd10f9f8b..fe466d3e2e7 100644
--- a/components/lib/crash/src/main/res/values-vi/strings.xml
+++ b/components/lib/crash/src/main/res/values-vi/strings.xml
@@ -24,6 +24,9 @@
Gửi báo cáo sự cố đến %1$s
+
+ Thu thập dữ liệu sự cố
+
Thu thập dữ liệu đo từ xa của sự cố
diff --git a/components/lib/crash/src/main/res/values-yo/strings.xml b/components/lib/crash/src/main/res/values-yo/strings.xml
new file mode 100644
index 00000000000..0676f335e14
--- /dev/null
+++ b/components/lib/crash/src/main/res/values-yo/strings.xml
@@ -0,0 +1,41 @@
+
+
+
+ Pẹ̀lẹ́. %1$s ní ìṣòro tó sì lulẹ̀.
+
+
+ Fi àwọn ìròyìn ìjákulẹ̀ ránṣẹ́ sí %1$s
+
+
+ Padé
+
+
+ Tún-un bẹ̀rẹ̀ %1$s
+
+
+ Àwọn ìjákulẹ̀
+
+
+ Pẹ̀lẹ́. Ìṣòrò kan wáyé ní %1$s.
+
+
+ Ìròyìn
+
+
+ Fifi àwọn ìròyìn ìjákulẹ̀ ránṣẹ́ sí %1$s
+
+
+ Kíkó àwọn dátà tó ti ní ìjákulẹ̀ pọ̀
+
+
+ Kíkó àwọn dátà tẹlímẹ́tírì tó ti ní ìjákulẹ̀ pọ̀
+
+
+ Àwọn ìròyìn ìjákulẹ̀
+
+
+ Kò sí àwọn ìròyìn ìjákulẹ̀ tí a ti fi sílẹ̀.
+
+
+ Pín
+
diff --git a/components/lib/crash/src/main/res/values-zh-rTW/strings.xml b/components/lib/crash/src/main/res/values-zh-rTW/strings.xml
index d5558cf3cd9..21177e0a22f 100644
--- a/components/lib/crash/src/main/res/values-zh-rTW/strings.xml
+++ b/components/lib/crash/src/main/res/values-zh-rTW/strings.xml
@@ -24,6 +24,9 @@
正在傳送錯誤報告給 %1$s
+
+ 收集錯誤資料
+
正在取得發生錯誤的 telemetry 資料
diff --git a/components/lib/crash/src/main/res/values/strings.xml b/components/lib/crash/src/main/res/values/strings.xml
index 8b372a8ceb8..c0403c6995a 100644
--- a/components/lib/crash/src/main/res/values/strings.xml
+++ b/components/lib/crash/src/main/res/values/strings.xml
@@ -27,6 +27,9 @@
Sending crash report to %1$s
+
+ Gathering crash data
+
Gathering crash telemetry data
diff --git a/components/lib/crash/src/test/java/mozilla/components/lib/crash/prompt/CrashReporterActivityTest.kt b/components/lib/crash/src/test/java/mozilla/components/lib/crash/prompt/CrashReporterActivityTest.kt
index f5e5a120ae6..1800518cd9c 100644
--- a/components/lib/crash/src/test/java/mozilla/components/lib/crash/prompt/CrashReporterActivityTest.kt
+++ b/components/lib/crash/src/test/java/mozilla/components/lib/crash/prompt/CrashReporterActivityTest.kt
@@ -196,6 +196,31 @@ class CrashReporterActivityTest {
assertEquals(activity.restartButton.visibility, View.GONE)
}
}
+
+ @Test
+ fun `WHEN crash is native AND background child THEN is background returns true`() = runTestOnMain {
+ CrashReporter(
+ context = testContext,
+ shouldPrompt = CrashReporter.Prompt.ALWAYS,
+ services = listOf(service),
+ scope = scope
+ ).install(testContext)
+
+ val crash = Crash.NativeCodeCrash(
+ 123,
+ "",
+ true,
+ "",
+ Crash.NativeCodeCrash.PROCESS_TYPE_BACKGROUND_CHILD,
+ arrayListOf()
+ )
+
+ val scenario = coroutineContext.launchActivityWithCrash(crash)
+
+ scenario.onActivity { activity ->
+ assert(activity.isRecoverableBackgroundCrash(crash))
+ }
+ }
}
/**
diff --git a/components/service/nimbus/src/main/res/values-yo/strings.xml b/components/service/nimbus/src/main/res/values-yo/strings.xml
new file mode 100644
index 00000000000..3ae1b05c962
--- /dev/null
+++ b/components/service/nimbus/src/main/res/values-yo/strings.xml
@@ -0,0 +1,5 @@
+
+
+
+ Kò sí ìṣàyẹ̀wò níbí
+
diff --git a/components/support/base/src/main/res/values-yo/strings.xml b/components/support/base/src/main/res/values-yo/strings.xml
new file mode 100644
index 00000000000..55dc8e49db6
--- /dev/null
+++ b/components/support/base/src/main/res/values-yo/strings.xml
@@ -0,0 +1,7 @@
+
+
+
+ Lọ sí àwọn ètò
+
+ Yọ ọ́ kúrò
+
diff --git a/components/support/ktx/src/main/java/mozilla/components/support/ktx/android/view/Activity.kt b/components/support/ktx/src/main/java/mozilla/components/support/ktx/android/view/Activity.kt
index 31c47a38a76..6348ea5166f 100644
--- a/components/support/ktx/src/main/java/mozilla/components/support/ktx/android/view/Activity.kt
+++ b/components/support/ktx/src/main/java/mozilla/components/support/ktx/android/view/Activity.kt
@@ -6,7 +6,6 @@ package mozilla.components.support.ktx.android.view
import android.app.Activity
import android.view.View
-import android.view.WindowManager
import androidx.annotation.VisibleForTesting
import androidx.core.view.ViewCompat
import androidx.core.view.ViewCompat.onApplyWindowInsets
@@ -21,7 +20,7 @@ import mozilla.components.support.base.log.logger.Logger
* - a system visibility listener: [View.OnSystemUiVisibilityChangeListener] for below APIs.
*
* to restore immersive mode if interactions with various other widgets like the keyboard or dialogs
- * got the activity out of immersive mode without [exitImmersiveModeIfNeeded] being called.
+ * got the activity out of immersive mode without [exitImmersiveMode] being called.
*/
fun Activity.enterToImmersiveMode() {
setAsImmersive()
@@ -30,7 +29,6 @@ fun Activity.enterToImmersiveMode() {
@VisibleForTesting
internal fun Activity.setAsImmersive() {
- window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
window.getWindowInsetsController().apply {
hide(WindowInsetsCompat.Type.systemBars())
systemBarsBehavior = WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
@@ -57,15 +55,9 @@ internal fun Activity.enableImmersiveModeRestore() {
/**
* Attempts to come out from immersive mode.
*/
-fun Activity.exitImmersiveModeIfNeeded() {
- if (WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON and window.attributes.flags == 0) {
- // We left immersive mode already.
- return
- }
-
+fun Activity.exitImmersiveMode() {
ViewCompat.setOnApplyWindowInsetsListener(window.decorView, null)
- window.clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
window.getWindowInsetsController().apply {
show(WindowInsetsCompat.Type.systemBars())
}
diff --git a/components/support/ktx/src/main/res/values-yo/strings.xml b/components/support/ktx/src/main/res/values-yo/strings.xml
new file mode 100644
index 00000000000..3014483150f
--- /dev/null
+++ b/components/support/ktx/src/main/res/values-yo/strings.xml
@@ -0,0 +1,9 @@
+
+
+
+ Pè pẹ̀lú…
+
+ Ímeelì pẹ̀lú…
+ Pín-in pẹ̀lú…
+ Pín-in nípasẹ̀
+
diff --git a/components/support/ktx/src/test/java/mozilla/components/support/ktx/android/view/ActivityTest.kt b/components/support/ktx/src/test/java/mozilla/components/support/ktx/android/view/ActivityTest.kt
index 3e2bd91fd2f..e4997d9bcb5 100644
--- a/components/support/ktx/src/test/java/mozilla/components/support/ktx/android/view/ActivityTest.kt
+++ b/components/support/ktx/src/test/java/mozilla/components/support/ktx/android/view/ActivityTest.kt
@@ -9,7 +9,6 @@ import android.view.View
import android.view.ViewTreeObserver
import android.view.Window
import android.view.WindowInsets
-import android.view.WindowManager
import androidx.core.view.WindowInsetsCompat
import androidx.test.ext.junit.runners.AndroidJUnit4
import mozilla.components.support.test.any
@@ -21,7 +20,6 @@ import org.junit.runner.RunWith
import org.mockito.Mockito.`when`
import org.mockito.Mockito.anyInt
import org.mockito.Mockito.doReturn
-import org.mockito.Mockito.mock
import org.mockito.Mockito.never
import org.mockito.Mockito.times
import org.mockito.Mockito.verify
@@ -59,7 +57,6 @@ class ActivityTest {
activity.enterToImmersiveMode()
// verify entering immersive mode
- verify(window).addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
verify(decorView).systemUiVisibility = View.SYSTEM_UI_FLAG_FULLSCREEN
verify(decorView).systemUiVisibility = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
// verify that the immersive mode restoration is set as expected
@@ -70,7 +67,6 @@ class ActivityTest {
fun `check setAsImmersive sets the correct flags`() {
activity.setAsImmersive()
- verify(window).addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
verify(decorView).systemUiVisibility = View.SYSTEM_UI_FLAG_FULLSCREEN
verify(decorView).systemUiVisibility = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
verify(window.decorView, never()).setOnSystemUiVisibilityChangeListener(any())
@@ -95,7 +91,6 @@ class ActivityTest {
insetListenerCaptor.value.onApplyWindowInsets(window.decorView, windowInsets)
// Cannot test if "setAsImmersive()" was called it being an extension function but we can check the effect of that call.
- verify(window).addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
verify(decorView).systemUiVisibility = View.SYSTEM_UI_FLAG_FULLSCREEN
verify(decorView).systemUiVisibility = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
}
@@ -118,39 +113,16 @@ class ActivityTest {
}
@Test
- fun `check exitImmersiveModeIfNeeded sets the correct flags`() {
- val attributes = mock(WindowManager.LayoutParams::class.java)
- `when`(window.attributes).thenReturn(attributes)
- attributes.flags = 0
+ fun `check exitImmersiveMode sets the correct flags`() {
+ activity.exitImmersiveMode()
- activity.exitImmersiveModeIfNeeded()
-
- verify(window, never()).clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
- verify(decorView, never()).systemUiVisibility = View.SYSTEM_UI_FLAG_FULLSCREEN.inv()
- verify(decorView, never()).systemUiVisibility = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION.inv()
- verify(decorView, never()).setOnApplyWindowInsetsListener(null)
-
- attributes.flags = WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON
-
- activity.exitImmersiveModeIfNeeded()
-
- verify(window).clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
verify(decorView, times(2)).systemUiVisibility = View.SYSTEM_UI_FLAG_VISIBLE
verify(decorView).setOnApplyWindowInsetsListener(null)
}
@Test
- fun `check exitImmersiveModeIfNeeded correctly cleanups the insets listeners`() {
- val attributes = mock(WindowManager.LayoutParams::class.java)
- `when`(window.attributes).thenReturn(attributes)
- attributes.flags = 0
-
- activity.exitImmersiveModeIfNeeded()
-
- verify(decorView, never()).setOnApplyWindowInsetsListener(null)
-
- attributes.flags = WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON
- activity.exitImmersiveModeIfNeeded()
+ fun `check exitImmersiveMode correctly cleanups the insets listeners`() {
+ activity.exitImmersiveMode()
verify(decorView).setOnApplyWindowInsetsListener(null)
}
diff --git a/components/support/migration/src/main/res/values-yo/strings.xml b/components/support/migration/src/main/res/values-yo/strings.xml
new file mode 100644
index 00000000000..ac1de43ef3c
--- /dev/null
+++ b/components/support/migration/src/main/res/values-yo/strings.xml
@@ -0,0 +1,11 @@
+
+
+
+ Ìsọdọ̀tun ń lọ lọ́wọ́
+
+ Firefox yóò ṣetán láìpẹ́…
+
+ Ìsọdọ̀tun ti parí
+
+ Wọ́n ti sọ Firefox dọ̀tun - àti ó ti ní ìlọsíwájú!
+
diff --git a/components/ui/tabcounter/src/main/res/values-yo/strings.xml b/components/ui/tabcounter/src/main/res/values-yo/strings.xml
new file mode 100644
index 00000000000..13d72778f60
--- /dev/null
+++ b/components/ui/tabcounter/src/main/res/values-yo/strings.xml
@@ -0,0 +1,17 @@
+
+
+
+ 1 sí táàbù. Tẹ̀ ẹ́ láti bọ́ sí àwọn táàbù.
+
+ %1$s sí táàbù. Tẹ̀ ẹ́ láti bọ́ sí àwọn táàbù.
+
+ Táàbù tuntun
+
+ Táàbù ìkọ̀kọ̀ tuntun
+
+ Pa táàbù dé
+
+ Ẹ̀dà táàbù
+
+ Táàbù náà rí bọ́tìnì irinṣé.
+
diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock
index 0f50adc2898..4ae380cf2ca 100644
--- a/docs/Gemfile.lock
+++ b/docs/Gemfile.lock
@@ -242,7 +242,7 @@ GEM
thread_safe (0.3.6)
typhoeus (1.4.0)
ethon (>= 0.9.0)
- tzinfo (1.2.7)
+ tzinfo (1.2.10)
thread_safe (~> 0.1)
unf (0.1.4)
unf_ext
diff --git a/docs/changelog.md b/docs/changelog.md
index d3bb87452b3..47a0e2207a0 100644
--- a/docs/changelog.md
+++ b/docs/changelog.md
@@ -11,6 +11,9 @@ permalink: /changelog/
* [Gecko](https://github.com/mozilla-mobile/android-components/blob/main/buildSrc/src/main/java/Gecko.kt)
* [Configuration](https://github.com/mozilla-mobile/android-components/blob/main/.config.yml)
+* **feature-prompts**:
+ * Added prompt dismiss listener to `ChoicePromptDelegate`. [#12562](https://github.com/mozilla-mobile/android-components/issues/12562)
+
* **browser-storage-sync**:
* Stop reporting to the crash servers the expected `OperationInterrupted` exceptions for when interrupting in progress reads/writes from Application-Services. [#12557](https://github.com/mozilla-mobile/android-components/issues/12557), [#12569](https://github.com/mozilla-mobile/android-components/issues/12569).
diff --git a/docs/contribute/release_checklist.md b/docs/contribute/release_checklist.md
index c00baebc1b8..033c59c8fef 100644
--- a/docs/contribute/release_checklist.md
+++ b/docs/contribute/release_checklist.md
@@ -8,11 +8,12 @@ These are instructions for preparing a release branch for Android Components and
## [Release Management] Creating a new Beta release branch
-**This part is 100% covered by the Release Management team. Please do not handle it anymore.**
+**This part is 100% covered by the Release Management team. The dev team should not perform these steps.**
1. Create a branch name with the format `releases/[beta_version].0` off of the `main` branch (for example, `releases/98.0`) through the GitHub UI.
`[beta_version]` should follow the Firefox Beta release number. See [Firefox Release Calendar](https://wiki.mozilla.org/Release_Management/Calendar).
-2. In [Gecko.kt](https://github.com/mozilla-mobile/android-components/blob/main/buildSrc/src/main/java/Gecko.kt):
+2. Notify the dev team that they can start the new Nightly development cycle per the steps given in the next section ⬇️
+3. In [Gecko.kt](https://github.com/mozilla-mobile/android-components/blob/main/buildSrc/src/main/java/Gecko.kt):
- Set the `channel` to `val channel = GeckoChannel.BETA`.
```diff
@@ -30,11 +31,17 @@ These are instructions for preparing a release branch for Android Components and
/**
```
-3. Create a commit and pull request named `Switch to GeckoView Beta` for this change. The pull request should be committed into the `releases/[beta_version].0` branch. Land the pull request. This will create busted builds which are expected. The next step should green it up.
-4. Let the Github Action bump the geckoview version like in [#12485](https://github.com/mozilla-mobile/android-components/pull/12485).
-5. Once both pull requests are landed, go to [Shipit](https://shipit.mozilla-releng.net/) and kick off a new release.
-6. After 30-60 minutes, follow up to see if a `[beta_version].0.0` build is available in one of the AC components on [maven/components](https://maven.mozilla.org/?prefix=maven2/org/mozilla/components/).
-7. Tell the dev team they can handle the changes down below ⬇️
+4. Create a commit named `Switch to GeckoView Beta` for this change. This change can either be directly committed to the newly-created `releases/[beta_version].0` branch or a pull request can be created against it and then merged. Once landed, it is expected that this will create busted builds. The next step should green it up.
+5. The Github Action will automatically bump the GeckoView version once the new Beta build is created and uploaded to Maven, as shown in [#12547](https://github.com/mozilla-mobile/android-components/pull/12547) for example.
+6. Once both of the above commits have landed, create a new AC release in [Ship-It](https://shipit.mozilla-releng.net/) per normal practice.
+7. When the release automation completes, a new `v[beta_version].0.0` release tag will be created in Github.
+ - Following the template below, update the description with the release notes URL, commit range, and milestone like shown in [v104.0.0](https://github.com/mozilla-mobile/android-components/releases/tag/v104.0.0) and click `Update release` when ready.
+
+ ```
+ * [Release notes](https://mozac.org/changelog/#9800)
+ * [Commits](https://github.com/mozilla-mobile/android-components/compare/v97.0.0...v98.0.0)
+ * [Milestone](https://github.com/mozilla-mobile/android-components/milestone/145?closed=1)
+ ```
## [Dev team] Starting the next Nightly development cycle
@@ -90,7 +97,7 @@ These are instructions for preparing a release branch for Android Components and
5. Create a pull request with these 2 commits and land.
- If this is landed after the scheduled [cron task](https://github.com/mozilla-mobile/android-components/blob/main/.cron.yml#L13) that will build and bump AC automatically, trigger a manual AC build through the [hook](https://firefox-ci-tc.services.mozilla.com/hooks/project-releng/cron-task-mozilla-mobile-android-components%2Fnightly). At time of writing, the morning cron task is schedule to run at 14:30 UTC (9:30AM EST).
- When the manual AC build is complete, trigger the [hook](https://firefox-ci-tc.services.mozilla.com/hooks/project-releng/cron-task-mozilla-mobile-fenix%2Fbump-android-components) to bump AC in Fenix.
-6. After an hour, follow up by checking if a new `[nightly_version]` AC build is available in [nightly.maven/components](https://nightly.maven.mozilla.org/?prefix=maven2/org/mozilla/components/). Fenix will automatically receive the Nightly AC bump.
+6. After an hour, follow up by checking if a new `[nightly_version]` AC build is available in [nightly.maven/components](https://nightly.maven.mozilla.org/?prefix=maven2/org/mozilla/components/). Fenix and Focus will automatically receive the Nightly AC bump.
See [https://github.com/mozilla-mobile/android-components/pull/11519](https://github.com/mozilla-mobile/android-components/pull/11519) for an example.
diff --git a/samples/browser/src/main/java/org/mozilla/samples/browser/BrowserFragment.kt b/samples/browser/src/main/java/org/mozilla/samples/browser/BrowserFragment.kt
index 8148b14be0f..09d021e55dc 100644
--- a/samples/browser/src/main/java/org/mozilla/samples/browser/BrowserFragment.kt
+++ b/samples/browser/src/main/java/org/mozilla/samples/browser/BrowserFragment.kt
@@ -21,7 +21,7 @@ import mozilla.components.feature.toolbar.WebExtensionToolbarFeature
import mozilla.components.support.base.feature.UserInteractionHandler
import mozilla.components.support.base.feature.ViewBoundFeatureWrapper
import mozilla.components.support.ktx.android.view.enterToImmersiveMode
-import mozilla.components.support.ktx.android.view.exitImmersiveModeIfNeeded
+import mozilla.components.support.ktx.android.view.exitImmersiveMode
import org.mozilla.samples.browser.ext.components
import org.mozilla.samples.browser.integration.ReaderViewIntegration
@@ -111,7 +111,7 @@ class BrowserFragment : BaseBrowserFragment(), UserInteractionHandler {
if (inFullScreen) {
activity?.enterToImmersiveMode()
} else {
- activity?.exitImmersiveModeIfNeeded()
+ activity?.exitImmersiveMode()
}
},
owner = this,