From f8af2315828b0f5a8168ea41dad6846d6ec7c0f8 Mon Sep 17 00:00:00 2001 From: Christian Hernandez Date: Tue, 20 Apr 2021 09:09:09 -0700 Subject: [PATCH 001/256] For #18830 - Remove card nickname from credit card editor (#18891) * Removed all views with regards to credit card nickname. Removed the TextInputLayout and TextInputEditText where information would be typed in. Also removed the credit card nickname title text view. I added a margin of 16 dp to the bottom ConstraintLayout that houses the delete, cancel, and save buttons as requested. * #18830 - Removed all views with regards to credit card nickname. Removed the TextInputLayout and TextInputEditText where information would be typed in. Also removed the credit card nickname title text view. I added a margin of 16 dp to the bottom ConstraintLayout that houses the delete, cancel, and save buttons as requested. --- .../layout/fragment_credit_card_editor.xml | 42 +------------------ 1 file changed, 2 insertions(+), 40 deletions(-) diff --git a/app/src/main/res/layout/fragment_credit_card_editor.xml b/app/src/main/res/layout/fragment_credit_card_editor.xml index 4efcf05ca..697d32c6d 100644 --- a/app/src/main/res/layout/fragment_credit_card_editor.xml +++ b/app/src/main/res/layout/fragment_credit_card_editor.xml @@ -149,48 +149,10 @@ - - - - - - - - - + android:layout_height="wrap_content" + android:paddingTop="16dp"> Date: Tue, 20 Apr 2021 10:32:50 -0400 Subject: [PATCH 002/256] [taskcluster] Use string.capitalize() rather than custom utility function --- taskcluster/fenix_taskgraph/transforms/build.py | 3 +-- taskcluster/fenix_taskgraph/util.py | 11 ----------- 2 files changed, 1 insertion(+), 13 deletions(-) delete mode 100644 taskcluster/fenix_taskgraph/util.py diff --git a/taskcluster/fenix_taskgraph/transforms/build.py b/taskcluster/fenix_taskgraph/transforms/build.py index 032a746a6..c4514f236 100644 --- a/taskcluster/fenix_taskgraph/transforms/build.py +++ b/taskcluster/fenix_taskgraph/transforms/build.py @@ -12,7 +12,6 @@ import datetime from taskgraph.transforms.base import TransformSequence from fenix_taskgraph.gradle import get_variant -from fenix_taskgraph.util import upper_case_first_letter transforms = TransformSequence() @@ -72,7 +71,7 @@ def build_gradle_command(config, tasks): task["run"]["gradlew"] = [ "clean", - "assemble{}".format(upper_case_first_letter(variant_config["name"])) + "assemble{}".format(variant_config["name"].capitalize()), ] yield task diff --git a/taskcluster/fenix_taskgraph/util.py b/taskcluster/fenix_taskgraph/util.py deleted file mode 100644 index d613fc2f7..000000000 --- a/taskcluster/fenix_taskgraph/util.py +++ /dev/null @@ -1,11 +0,0 @@ -# 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/. - -from __future__ import absolute_import, print_function, unicode_literals - -import re - - -def upper_case_first_letter(string): - return string[0].upper() + string[1:] From 90c9e634afda589b7d4ba384aa63f1b676db42d9 Mon Sep 17 00:00:00 2001 From: mcarare Date: Tue, 20 Apr 2021 14:31:23 +0300 Subject: [PATCH 003/256] For #18240: Adjust preference screen to fit UX specs. --- ...reference_credit_cards_add_credit_card.xml | 40 ------------------- app/src/main/res/values/dimens.xml | 7 ---- .../main/res/xml/credit_cards_preferences.xml | 6 ++- 3 files changed, 4 insertions(+), 49 deletions(-) delete mode 100644 app/src/main/res/layout/preference_credit_cards_add_credit_card.xml diff --git a/app/src/main/res/layout/preference_credit_cards_add_credit_card.xml b/app/src/main/res/layout/preference_credit_cards_add_credit_card.xml deleted file mode 100644 index 41c8b247c..000000000 --- a/app/src/main/res/layout/preference_credit_cards_add_credit_card.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index e2c8297ae..88cf1973d 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -214,13 +214,6 @@ 8dp - - 48dp - - 16dp - 16sp 16dp 48dp diff --git a/app/src/main/res/xml/credit_cards_preferences.xml b/app/src/main/res/xml/credit_cards_preferences.xml index ea745e992..21b58a5c2 100644 --- a/app/src/main/res/xml/credit_cards_preferences.xml +++ b/app/src/main/res/xml/credit_cards_preferences.xml @@ -14,10 +14,12 @@ android:title="@string/preferences_credit_cards_sync_cards_across_devices" app:allowDividerBelow="true" /> + app:allowDividerAbove="true" /> + android:title="@string/preferences_credit_cards_manage_saved_cards" + app:allowDividerAbove="true" /> From 59c94e447c47a71f7378e7e7103e16bf7f697c33 Mon Sep 17 00:00:00 2001 From: Elise Richards Date: Tue, 20 Apr 2021 12:18:19 -0500 Subject: [PATCH 004/256] For #19005: new tab three-dot menu sync sign in (#19037) * Show synced tabs or sync account in new tab menu * Sync sign in item navigates to account settings * Check account auth and get sync item title * Look for sync sign in item on home menu for UI test * Sync sign in menu item UI test --- .../java/org/mozilla/fenix/ui/SmokeTest.kt | 19 ++++++-- .../mozilla/fenix/ui/ThreeDotMenuMainTest.kt | 7 ++- .../fenix/ui/robots/SyncSignInRobot.kt | 46 +++++++++++++++++++ .../fenix/ui/robots/ThreeDotMenuMainRobot.kt | 10 ++++ .../org/mozilla/fenix/home/HomeFragment.kt | 7 +++ .../java/org/mozilla/fenix/home/HomeMenu.kt | 41 ++++++++++------- 6 files changed, 108 insertions(+), 22 deletions(-) create mode 100644 app/src/androidTest/java/org/mozilla/fenix/ui/robots/SyncSignInRobot.kt diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/SmokeTest.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/SmokeTest.kt index bdb2e31bb..cf63c7806 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/SmokeTest.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/SmokeTest.kt @@ -17,6 +17,7 @@ import org.junit.Before import org.junit.Ignore import org.junit.Rule import org.junit.Test +import org.mozilla.fenix.FeatureFlags import org.mozilla.fenix.R import org.mozilla.fenix.ext.settings import org.mozilla.fenix.helpers.AndroidAssetDispatcher @@ -227,11 +228,19 @@ class SmokeTest { @Test // Verifies the Synced tabs menu opens from a tab's 3 dot menu - fun openMainMenuSyncedTabsItemTest() { - homeScreen { - }.openThreeDotMenu { - }.openSyncedTabs { - verifySyncedTabsMenuHeader() + fun openMainMenuSyncItemTest() { + if (FeatureFlags.tabsTrayRewrite) { + homeScreen { + }.openThreeDotMenu { + }.openSyncSignIn { + verifyAccountSettingsMenuHeader() + } + } else { + homeScreen { + }.openThreeDotMenu { + }.openSyncedTabs { + verifySyncedTabsMenuHeader() + } } } diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/ThreeDotMenuMainTest.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/ThreeDotMenuMainTest.kt index f4814f2ee..69b2f294a 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/ThreeDotMenuMainTest.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/ThreeDotMenuMainTest.kt @@ -9,6 +9,7 @@ import org.junit.After import org.junit.Before import org.junit.Rule import org.junit.Test +import org.mozilla.fenix.FeatureFlags import org.mozilla.fenix.helpers.AndroidAssetDispatcher import org.mozilla.fenix.helpers.HomeActivityTestRule import org.mozilla.fenix.ui.robots.homeScreen @@ -48,7 +49,11 @@ class ThreeDotMenuMainTest { verifyHistoryButton() verifyDownloadsButton() verifyAddOnsButton() - verifySyncedTabsButton() + if (FeatureFlags.tabsTrayRewrite) { + verifySyncSignInButton() + } else { + verifySyncedTabsButton() + } verifyDesktopSite() verifyWhatsNewButton() verifyHelpButton() diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/SyncSignInRobot.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/SyncSignInRobot.kt new file mode 100644 index 000000000..e355174a5 --- /dev/null +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/SyncSignInRobot.kt @@ -0,0 +1,46 @@ +/* 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/. */ + +package org.mozilla.fenix.ui.robots + +import androidx.test.espresso.Espresso.onView +import androidx.test.espresso.assertion.ViewAssertions.matches +import androidx.test.espresso.matcher.ViewMatchers.withContentDescription +import androidx.test.espresso.matcher.ViewMatchers.withEffectiveVisibility +import androidx.test.espresso.matcher.ViewMatchers.withText +import androidx.test.espresso.matcher.ViewMatchers.Visibility +import androidx.test.platform.app.InstrumentationRegistry +import androidx.test.uiautomator.UiDevice +import org.hamcrest.CoreMatchers.allOf +import org.mozilla.fenix.R +import org.mozilla.fenix.helpers.click + +/** + * Implementation of Robot Pattern for Sync Sign In sub menu. + */ +class SyncSignInRobot { + + fun verifyAccountSettingsMenuHeader() = assertAccountSettingsMenuHeader() + + class Transition { + val mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation())!! + + fun goBack(interact: BrowserRobot.() -> Unit): BrowserRobot.Transition { + goBackButton().click() + + BrowserRobot().interact() + return BrowserRobot.Transition() + } + } +} + +private fun goBackButton() = + onView(allOf(withContentDescription("Navigate up"))) + +private fun assertAccountSettingsMenuHeader() { + // Replaced with the new string here, the test is assuming we are NOT signed in + // Sync tests in SettingsSyncTest are still TO-DO, so I'm not sure that we have a test for signing into Sync + onView(withText(R.string.preferences_account_settings)) + .check((matches(withEffectiveVisibility(Visibility.VISIBLE)))) +} diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/ThreeDotMenuMainRobot.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/ThreeDotMenuMainRobot.kt index fcfaac7e4..28e212658 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/ThreeDotMenuMainRobot.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/ThreeDotMenuMainRobot.kt @@ -51,6 +51,7 @@ class ThreeDotMenuMainRobot { fun verifyHistoryButton() = assertHistoryButton() fun verifyBookmarksButton() = assertBookmarksButton() fun verifySyncedTabsButton() = assertSyncedTabsButton() + fun verifySyncSignInButton() = assertSignInToSyncButton() fun verifyHelpButton() = assertHelpButton() fun verifyThreeDotMenuExists() = threeDotMenuRecyclerViewExists() fun verifyForwardButton() = assertForwardButton() @@ -164,6 +165,15 @@ class ThreeDotMenuMainRobot { return SyncedTabsRobot.Transition() } + fun openSyncSignIn(interact: SyncSignInRobot.() -> Unit): SyncSignInRobot.Transition { + onView(withId(R.id.mozac_browser_menu_recyclerView)).perform(swipeDown()) + mDevice.waitNotNull(Until.findObject(By.text("Sign in to sync")), waitingTime) + signInToSyncButton().click() + + SyncSignInRobot().interact() + return SyncSignInRobot.Transition() + } + fun openBookmarks(interact: BookmarksRobot.() -> Unit): BookmarksRobot.Transition { onView(withId(R.id.mozac_browser_menu_recyclerView)).perform(swipeDown()) mDevice.waitNotNull(Until.findObject(By.text("Bookmarks")), waitingTime) diff --git a/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt b/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt index 693c14444..9df47af02 100644 --- a/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt @@ -792,6 +792,13 @@ class HomeFragment : Fragment() { HomeFragmentDirections.actionGlobalSyncedTabsFragment() ) } + HomeMenu.Item.SyncAccount -> { + hideOnboardingIfNeeded() + nav( + R.id.homeFragment, + HomeFragmentDirections.actionGlobalAccountSettingsFragment() + ) + } HomeMenu.Item.Bookmarks -> { hideOnboardingIfNeeded() nav( diff --git a/app/src/main/java/org/mozilla/fenix/home/HomeMenu.kt b/app/src/main/java/org/mozilla/fenix/home/HomeMenu.kt index 6d2f6f877..2f277aa29 100644 --- a/app/src/main/java/org/mozilla/fenix/home/HomeMenu.kt +++ b/app/src/main/java/org/mozilla/fenix/home/HomeMenu.kt @@ -24,6 +24,7 @@ import mozilla.components.concept.sync.AuthType import mozilla.components.concept.sync.OAuthAccount import mozilla.components.support.ktx.android.content.getColorFromAttr import org.mozilla.fenix.FeatureFlags +import org.mozilla.fenix.FeatureFlags.tabsTrayRewrite import org.mozilla.fenix.R import org.mozilla.fenix.experiments.ExperimentBranch import org.mozilla.fenix.experiments.Experiments @@ -47,6 +48,7 @@ class HomeMenu( object Downloads : Item() object Extensions : Item() object SyncTabs : Item() + object SyncAccount : Item() object WhatsNew : Item() object Help : Item() object Settings : Item() @@ -55,8 +57,7 @@ class HomeMenu( data class DesktopMode(val checked: Boolean) : Item() } - private val primaryTextColor = - ThemeManager.resolveAttribute(R.attr.primaryText, context) + private val primaryTextColor = ThemeManager.resolveAttribute(R.attr.primaryText, context) private val syncDisconnectedColor = ThemeManager.resolveAttribute(R.attr.syncDisconnected, context) private val syncDisconnectedBackgroundColor = @@ -92,17 +93,6 @@ class HomeMenu( } } - private fun getSyncItemTitle(): String { - val authenticatedAccount = accountManager.authenticatedAccount() != null - val email = accountManager.accountProfile()?.email - - return if (authenticatedAccount && email != null) { - email - } else { - context.getString(R.string.sync_menu_sign_in) - } - } - private val oldCoreMenuItems by lazy { val whatsNewItem = BrowserMenuHighlightableItem( context.getString(R.string.browser_menu_whats_new), @@ -236,6 +226,17 @@ class HomeMenu( onItemTapped.invoke(Item.DesktopMode(checked)) } + private fun getSyncItemTitle(): String { + val authenticatedAccount = accountManager.authenticatedAccount() != null + val email = accountManager.accountProfile()?.email + + return if (authenticatedAccount && email != null) { + email + } else { + context.getString(R.string.sync_menu_sign_in) + } + } + @Suppress("ComplexMethod") private fun newCoreMenuItems(): List { val experiments = context.components.analytics.experiments @@ -293,14 +294,22 @@ class HomeMenu( onItemTapped.invoke(Item.Extensions) } - val syncSignInItem = BrowserMenuImageText( - context.getString(R.string.library_synced_tabs), + val syncedTabsItem = BrowserMenuImageText( + context.getString(R.string.synced_tabs), R.drawable.ic_synced_tabs, primaryTextColor ) { onItemTapped.invoke(Item.SyncTabs) } + val syncSignInMenuItem = BrowserMenuImageText( + getSyncItemTitle(), + R.drawable.ic_synced_tabs, + primaryTextColor + ) { + onItemTapped.invoke(Item.SyncAccount) + } + val whatsNewItem = BrowserMenuHighlightableItem( context.getString(R.string.browser_menu_whats_new), R.drawable.ic_whats_new, @@ -344,7 +353,7 @@ class HomeMenu( historyItem, downloadsItem, extensionsItem, - syncSignInItem, + if (tabsTrayRewrite) syncSignInMenuItem else syncedTabsItem, accountAuthItem, BrowserMenuDivider(), desktopItem, From f6933752701fa0000e5193fea58d4300a54490c9 Mon Sep 17 00:00:00 2001 From: mcarare Date: Thu, 15 Apr 2021 11:44:39 +0300 Subject: [PATCH 005/256] For #18852: Add metrics for default browser settings experiment. --- app/metrics.yaml | 15 +++++++++++++++ .../org/mozilla/fenix/components/metrics/Event.kt | 1 + .../components/metrics/GleanMetricsService.kt | 4 ++++ .../mozilla/fenix/settings/SettingsFragment.kt | 3 +++ docs/metrics.md | 1 + 5 files changed, 24 insertions(+) diff --git a/app/metrics.yaml b/app/metrics.yaml index 158fcf938..59f89331d 100644 --- a/app/metrics.yaml +++ b/app/metrics.yaml @@ -5377,3 +5377,18 @@ set_default_newtab_experiment: notification_emails: - fenix-core@mozilla.com expires: "2021-10-01" + +set_default_setting_experiment: + set_default_browser_clicked: + type: event + description: | + Set default browser was clicked from settings screen. + bugs: + - https://github.com/mozilla-mobile/fenix/issues/18852 + data_reviews: + - https://github.com/mozilla-mobile/fenix/pull/19047 + data_sensitivity: + - interaction + notification_emails: + - fenix-core@mozilla.com + expires: "2021-10-01" diff --git a/app/src/main/java/org/mozilla/fenix/components/metrics/Event.kt b/app/src/main/java/org/mozilla/fenix/components/metrics/Event.kt index f0dac803b..ff79f9bdd 100644 --- a/app/src/main/java/org/mozilla/fenix/components/metrics/Event.kt +++ b/app/src/main/java/org/mozilla/fenix/components/metrics/Event.kt @@ -230,6 +230,7 @@ sealed class Event { object CloseExperimentCardClicked : Event() object ToolbarMenuShown : Event() object SetDefaultBrowserToolbarMenuClicked : Event() + object SetDefaultBrowserSettingsScreenClicked : Event() // Home menu interaction object HomeMenuSettingsItemClicked : Event() diff --git a/app/src/main/java/org/mozilla/fenix/components/metrics/GleanMetricsService.kt b/app/src/main/java/org/mozilla/fenix/components/metrics/GleanMetricsService.kt index 83a1f97f4..edb2a1a7d 100644 --- a/app/src/main/java/org/mozilla/fenix/components/metrics/GleanMetricsService.kt +++ b/app/src/main/java/org/mozilla/fenix/components/metrics/GleanMetricsService.kt @@ -56,6 +56,7 @@ import org.mozilla.fenix.GleanMetrics.SearchShortcuts import org.mozilla.fenix.GleanMetrics.SearchSuggestions import org.mozilla.fenix.GleanMetrics.SearchWidget import org.mozilla.fenix.GleanMetrics.SetDefaultNewtabExperiment +import org.mozilla.fenix.GleanMetrics.SetDefaultSettingExperiment import org.mozilla.fenix.GleanMetrics.SyncAccount import org.mozilla.fenix.GleanMetrics.SyncAuth import org.mozilla.fenix.GleanMetrics.SyncedTabs @@ -835,6 +836,9 @@ private val Event.wrapper: EventWrapper<*>? is Event.SetDefaultBrowserClicked -> EventWrapper( { SetDefaultNewtabExperiment.setDefaultBrowserClicked.record(it) } ) + is Event.SetDefaultBrowserSettingsScreenClicked -> EventWrapper( + { SetDefaultSettingExperiment.setDefaultBrowserClicked.record(it) } + ) is Event.HomeScreenDisplayed -> EventWrapper( { HomeScreen.homeScreenDisplayed.record(it) } ) diff --git a/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt b/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt index a4ab2090b..8f03b0146 100644 --- a/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/settings/SettingsFragment.kt @@ -480,6 +480,9 @@ class SettingsFragment : PreferenceFragmentCompat() { */ private fun getClickListenerForMakeDefaultBrowser(): Preference.OnPreferenceClickListener { return Preference.OnPreferenceClickListener { + if (isDefaultBrowserExperimentBranch() && !isFirefoxDefaultBrowser()) { + requireContext().metrics.track(Event.SetDefaultBrowserSettingsScreenClicked) + } activity?.openSetDefaultBrowserOption() true } diff --git a/docs/metrics.md b/docs/metrics.md index 211d807bb..704f337f4 100644 --- a/docs/metrics.md +++ b/docs/metrics.md @@ -212,6 +212,7 @@ In addition to those built-in metrics, the following metrics are added to the pi | search_widget.voice_button |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user pressed the microphone icon, opening a new voice search screen. |[mozilla-mobile/fenix#4714](https://github.com/mozilla-mobile/fenix/pull/4714), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | | set_default_newtab_experiment.close_experiment_card_clicked |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |Close experiment card was clicked from new tab screen. |[mozilla-mobile/fenix#18895](https://github.com/mozilla-mobile/fenix/pull/18895)||2021-10-01 |2 | | set_default_newtab_experiment.set_default_browser_clicked |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |Set default browser was clicked from new tab screen. |[mozilla-mobile/fenix#18895](https://github.com/mozilla-mobile/fenix/pull/18895)||2021-10-01 |2 | +| set_default_setting_experiment.set_default_browser_clicked |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |Set default browser was clicked from settings screen. |[mozilla-mobile/fenix#19047](https://github.com/mozilla-mobile/fenix/pull/19047)||2021-10-01 |2 | | sync_account.opened |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user opened the sync account page |[mozilla-mobile/fenix#2745](https://github.com/mozilla-mobile/fenix/pull/2745#issuecomment-494918532), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | | sync_account.send_tab |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user sent the current tab to another FxA device |[mozilla-mobile/fenix#5106](https://github.com/mozilla-mobile/fenix/pull/5106), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | | sync_account.sign_in_to_send_tab |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user pressed the "sign in to send tab" button inside the share tab menu |[mozilla-mobile/fenix#5106](https://github.com/mozilla-mobile/fenix/pull/5106), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | From 8b3a878062d01cd9dc1578fcb46b6844961963b1 Mon Sep 17 00:00:00 2001 From: mcarare Date: Thu, 15 Apr 2021 11:52:50 +0300 Subject: [PATCH 006/256] No issue: Rename Event for naming consistency. --- app/src/main/java/org/mozilla/fenix/components/metrics/Event.kt | 2 +- .../org/mozilla/fenix/components/metrics/GleanMetricsService.kt | 2 +- .../fenix/home/sessioncontrol/SessionControlController.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/mozilla/fenix/components/metrics/Event.kt b/app/src/main/java/org/mozilla/fenix/components/metrics/Event.kt index ff79f9bdd..aff2f88d8 100644 --- a/app/src/main/java/org/mozilla/fenix/components/metrics/Event.kt +++ b/app/src/main/java/org/mozilla/fenix/components/metrics/Event.kt @@ -226,7 +226,7 @@ sealed class Event { object OpenedTabSuggestionClicked : Event() // Set default browser experiment metrics - object SetDefaultBrowserClicked : Event() + object SetDefaultBrowserNewTabClicked : Event() object CloseExperimentCardClicked : Event() object ToolbarMenuShown : Event() object SetDefaultBrowserToolbarMenuClicked : Event() diff --git a/app/src/main/java/org/mozilla/fenix/components/metrics/GleanMetricsService.kt b/app/src/main/java/org/mozilla/fenix/components/metrics/GleanMetricsService.kt index edb2a1a7d..7eb8ee48b 100644 --- a/app/src/main/java/org/mozilla/fenix/components/metrics/GleanMetricsService.kt +++ b/app/src/main/java/org/mozilla/fenix/components/metrics/GleanMetricsService.kt @@ -833,7 +833,7 @@ private val Event.wrapper: EventWrapper<*>? is Event.CloseExperimentCardClicked -> EventWrapper( { SetDefaultNewtabExperiment.closeExperimentCardClicked.record(it) } ) - is Event.SetDefaultBrowserClicked -> EventWrapper( + is Event.SetDefaultBrowserNewTabClicked -> EventWrapper( { SetDefaultNewtabExperiment.setDefaultBrowserClicked.record(it) } ) is Event.SetDefaultBrowserSettingsScreenClicked -> EventWrapper( diff --git a/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlController.kt b/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlController.kt index 62cd02563..318dcb163 100644 --- a/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlController.kt +++ b/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlController.kt @@ -567,7 +567,7 @@ class DefaultSessionControlController( override fun handleSetDefaultBrowser() { settings.userDismissedExperimentCard = true - metrics.track(Event.SetDefaultBrowserClicked) + metrics.track(Event.SetDefaultBrowserNewTabClicked) activity.openSetDefaultBrowserOption() } From b396ede0687600702455bfe6ae40b76e1e5870c0 Mon Sep 17 00:00:00 2001 From: Roger Yang Date: Tue, 20 Apr 2021 16:25:01 -0400 Subject: [PATCH 007/256] No issue: Suppress deprecation for LoginStorageDelegate (#19145) --- app/src/geckoBeta/java/org/mozilla/fenix/engine/GeckoProvider.kt | 1 + .../geckoRelease/java/org/mozilla/fenix/engine/GeckoProvider.kt | 1 + 2 files changed, 2 insertions(+) diff --git a/app/src/geckoBeta/java/org/mozilla/fenix/engine/GeckoProvider.kt b/app/src/geckoBeta/java/org/mozilla/fenix/engine/GeckoProvider.kt index 49d36c121..733563ee8 100644 --- a/app/src/geckoBeta/java/org/mozilla/fenix/engine/GeckoProvider.kt +++ b/app/src/geckoBeta/java/org/mozilla/fenix/engine/GeckoProvider.kt @@ -83,6 +83,7 @@ object GeckoProvider { val geckoRuntime = GeckoRuntime.create(context, runtimeSettings) val loginStorageDelegate = GeckoLoginStorageDelegate(storage) + @Suppress("Deprecation") geckoRuntime.loginStorageDelegate = GeckoLoginDelegateWrapper(loginStorageDelegate) return geckoRuntime diff --git a/app/src/geckoRelease/java/org/mozilla/fenix/engine/GeckoProvider.kt b/app/src/geckoRelease/java/org/mozilla/fenix/engine/GeckoProvider.kt index 16ad137f4..2637bdc8e 100644 --- a/app/src/geckoRelease/java/org/mozilla/fenix/engine/GeckoProvider.kt +++ b/app/src/geckoRelease/java/org/mozilla/fenix/engine/GeckoProvider.kt @@ -93,6 +93,7 @@ object GeckoProvider { val geckoRuntime = GeckoRuntime.create(context, runtimeSettings) val loginStorageDelegate = GeckoLoginStorageDelegate(storage) + @Suppress("Deprecation") geckoRuntime.loginStorageDelegate = GeckoLoginDelegateWrapper(loginStorageDelegate) return geckoRuntime From 118f53d6d76e9c58b3c13462c3eb7ac4ae72206c Mon Sep 17 00:00:00 2001 From: Stefan Arentz Date: Tue, 20 Apr 2021 22:16:13 -0400 Subject: [PATCH 008/256] Run the sync-strings workflow daily at 2am (#19148) --- .github/workflows/sync-strings.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync-strings.yml b/.github/workflows/sync-strings.yml index 35e1c5544..2b9e457a7 100644 --- a/.github/workflows/sync-strings.yml +++ b/.github/workflows/sync-strings.yml @@ -6,7 +6,7 @@ name: "Sync Strings" on: schedule: - - cron: '0 */4 * * *' + - cron: '0 2 * * *' jobs: main: From 056326904b09a2528925e3e92000b12ed606899d Mon Sep 17 00:00:00 2001 From: Stefan Arentz Date: Tue, 20 Apr 2021 22:42:45 -0400 Subject: [PATCH 009/256] Update the sync-strings workflow (#19149) --- .github/workflows/sync-strings.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/sync-strings.yml b/.github/workflows/sync-strings.yml index 2b9e457a7..6578c36a1 100644 --- a/.github/workflows/sync-strings.yml +++ b/.github/workflows/sync-strings.yml @@ -15,9 +15,7 @@ jobs: steps: - name: "Discover Fenix Beta Version" id: fenix-beta-version - uses: mozilla-mobile/fenix-beta-version@1.0.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: mozilla-mobile/fenix-beta-version@1.1.0 - name: "Checkout Master Branch" uses: actions/checkout@v2 with: From a126f0913a1538cce7538484655024b1440ff508 Mon Sep 17 00:00:00 2001 From: Sebastian Kaspari Date: Tue, 20 Apr 2021 17:50:57 +0200 Subject: [PATCH 010/256] Update to Mozilla Android Components 90.0 --- app/build.gradle | 16 +--- .../org/mozilla/fenix/engine/GeckoProvider.kt | 91 ------------------- .../java/org/mozilla/fenix/components/Core.kt | 2 +- .../org/mozilla/fenix/gecko}/GeckoProvider.kt | 2 + buildSrc/src/main/java/AndroidComponents.kt | 2 +- buildSrc/src/main/java/Dependencies.kt | 4 +- 6 files changed, 8 insertions(+), 109 deletions(-) delete mode 100644 app/src/geckoBeta/java/org/mozilla/fenix/engine/GeckoProvider.kt rename app/src/{geckoNightly/java/org/mozilla/fenix/engine => main/java/org/mozilla/fenix/gecko}/GeckoProvider.kt (99%) diff --git a/app/build.gradle b/app/build.gradle index da5d7bfdf..de84bf761 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -161,18 +161,12 @@ android { androidTest { resources.srcDirs += ['src/androidTest/resources'] } - debug { - java.srcDirs = ['src/geckoNightly/java'] - } - nightly { - java.srcDirs = ['src/geckoNightly/java'] - } beta { - java.srcDirs = ['src/migration/java', 'src/geckoBeta/java'] + java.srcDirs = ['src/migration/java'] manifest.srcFile "src/migration/AndroidManifest.xml" } release { - java.srcDirs = ['src/migration/java', 'src/geckoRelease/java'] + java.srcDirs = ['src/migration/java'] manifest.srcFile "src/migration/AndroidManifest.xml" } } @@ -418,11 +412,7 @@ dependencies { jnaForTest Deps.jna testImplementation files(configurations.jnaForTest.copyRecursive().files) - debugImplementation Deps.mozilla_browser_engine_gecko_nightly - - nightlyImplementation Deps.mozilla_browser_engine_gecko_nightly - betaImplementation Deps.mozilla_browser_engine_gecko_beta - releaseImplementation Deps.mozilla_browser_engine_gecko_release + implementation Deps.mozilla_browser_engine_gecko implementation Deps.kotlin_stdlib implementation Deps.kotlin_coroutines diff --git a/app/src/geckoBeta/java/org/mozilla/fenix/engine/GeckoProvider.kt b/app/src/geckoBeta/java/org/mozilla/fenix/engine/GeckoProvider.kt deleted file mode 100644 index 733563ee8..000000000 --- a/app/src/geckoBeta/java/org/mozilla/fenix/engine/GeckoProvider.kt +++ /dev/null @@ -1,91 +0,0 @@ -/* 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/. */ - -import android.content.Context -import mozilla.components.browser.engine.gecko.autofill.GeckoLoginDelegateWrapper -import mozilla.components.browser.engine.gecko.ext.toContentBlockingSetting -import mozilla.components.browser.engine.gecko.glean.GeckoAdapter -import mozilla.components.concept.engine.EngineSession.TrackingProtectionPolicy -import mozilla.components.concept.storage.LoginsStorage -import mozilla.components.lib.crash.handler.CrashHandlerService -import mozilla.components.service.sync.logins.GeckoLoginStorageDelegate -import org.mozilla.fenix.Config -import org.mozilla.fenix.ext.components -import org.mozilla.geckoview.ContentBlocking -import org.mozilla.geckoview.GeckoRuntime -import org.mozilla.geckoview.GeckoRuntimeSettings -import org.mozilla.geckoview.ContentBlocking.SafeBrowsingProvider - -object GeckoProvider { - private var runtime: GeckoRuntime? = null - const val CN_UPDATE_URL = - "https://sb.firefox.com.cn/downloads?client=SAFEBROWSING_ID&appver=%MAJOR_VERSION%&pver=2.2" - const val CN_GET_HASH_URL = - "https://sb.firefox.com.cn/gethash?client=SAFEBROWSING_ID&appver=%MAJOR_VERSION%&pver=2.2" - - @Synchronized - fun getOrCreateRuntime( - context: Context, - storage: Lazy, - trackingProtectionPolicy: TrackingProtectionPolicy - ): GeckoRuntime { - if (runtime == null) { - runtime = createRuntime(context, storage, trackingProtectionPolicy) - } - - return runtime!! - } - - private fun createRuntime( - context: Context, - storage: Lazy, - policy: TrackingProtectionPolicy - ): GeckoRuntime { - val builder = GeckoRuntimeSettings.Builder() - - val runtimeSettings = builder - .crashHandler(CrashHandlerService::class.java) - .telemetryDelegate(GeckoAdapter()) - .contentBlocking(policy.toContentBlockingSetting()) - .aboutConfigEnabled(Config.channel.isBeta) - .debugLogging(Config.channel.isDebug) - .build() - - val settings = context.components.settings - if (!settings.shouldUseAutoSize) { - runtimeSettings.automaticFontSizeAdjustment = false - val fontSize = settings.fontSizeFactor - runtimeSettings.fontSizeFactor = fontSize - } - - // Add safebrowsing providers for China - if (Config.channel.isMozillaOnline) { - val mozcn = SafeBrowsingProvider - .withName("mozcn") - .version("2.2") - .lists("m6eb-phish-shavar", "m6ib-phish-shavar") - .updateUrl(CN_UPDATE_URL) - .getHashUrl(CN_GET_HASH_URL) - .build() - - runtimeSettings.contentBlocking.setSafeBrowsingProviders(mozcn, - // Keep the existing configuration - ContentBlocking.GOOGLE_SAFE_BROWSING_PROVIDER, - ContentBlocking.GOOGLE_LEGACY_SAFE_BROWSING_PROVIDER) - - runtimeSettings.contentBlocking.setSafeBrowsingPhishingTable( - "m6eb-phish-shavar", - "m6ib-phish-shavar", - // Existing configuration - "goog-phish-proto") - } - - val geckoRuntime = GeckoRuntime.create(context, runtimeSettings) - val loginStorageDelegate = GeckoLoginStorageDelegate(storage) - @Suppress("Deprecation") - geckoRuntime.loginStorageDelegate = GeckoLoginDelegateWrapper(loginStorageDelegate) - - return geckoRuntime - } -} diff --git a/app/src/main/java/org/mozilla/fenix/components/Core.kt b/app/src/main/java/org/mozilla/fenix/components/Core.kt index 837d00ee4..fb7a74509 100644 --- a/app/src/main/java/org/mozilla/fenix/components/Core.kt +++ b/app/src/main/java/org/mozilla/fenix/components/Core.kt @@ -4,7 +4,7 @@ package org.mozilla.fenix.components -import GeckoProvider +import org.mozilla.fenix.gecko.GeckoProvider import android.content.Context import android.content.res.Configuration import android.os.Build diff --git a/app/src/geckoNightly/java/org/mozilla/fenix/engine/GeckoProvider.kt b/app/src/main/java/org/mozilla/fenix/gecko/GeckoProvider.kt similarity index 99% rename from app/src/geckoNightly/java/org/mozilla/fenix/engine/GeckoProvider.kt rename to app/src/main/java/org/mozilla/fenix/gecko/GeckoProvider.kt index 9a1d2f8b1..5bb1d3ac9 100644 --- a/app/src/geckoNightly/java/org/mozilla/fenix/engine/GeckoProvider.kt +++ b/app/src/main/java/org/mozilla/fenix/gecko/GeckoProvider.kt @@ -2,6 +2,8 @@ * 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/. */ +package org.mozilla.fenix.gecko + import android.content.Context import mozilla.components.browser.engine.gecko.autofill.GeckoLoginDelegateWrapper import mozilla.components.browser.engine.gecko.ext.toContentBlockingSetting diff --git a/buildSrc/src/main/java/AndroidComponents.kt b/buildSrc/src/main/java/AndroidComponents.kt index e166a81f1..c8ea43e48 100644 --- a/buildSrc/src/main/java/AndroidComponents.kt +++ b/buildSrc/src/main/java/AndroidComponents.kt @@ -3,5 +3,5 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ object AndroidComponents { - const val VERSION = "75.0.20210419143149" + const val VERSION = "90.0.20210420185510" } diff --git a/buildSrc/src/main/java/Dependencies.kt b/buildSrc/src/main/java/Dependencies.kt index 3e117e06c..cd948ff06 100644 --- a/buildSrc/src/main/java/Dependencies.kt +++ b/buildSrc/src/main/java/Dependencies.kt @@ -76,9 +76,7 @@ object Deps { const val mozilla_concept_sync = "org.mozilla.components:concept-sync:${Versions.mozilla_android_components}" const val mozilla_browser_awesomebar = "org.mozilla.components:browser-awesomebar:${Versions.mozilla_android_components}" - const val mozilla_browser_engine_gecko_nightly = "org.mozilla.components:browser-engine-gecko-nightly:${Versions.mozilla_android_components}" - const val mozilla_browser_engine_gecko_beta = "org.mozilla.components:browser-engine-gecko-beta:${Versions.mozilla_android_components}" - const val mozilla_browser_engine_gecko_release = "org.mozilla.components:browser-engine-gecko:${Versions.mozilla_android_components}" + const val mozilla_browser_engine_gecko = "org.mozilla.components:browser-engine-gecko:${Versions.mozilla_android_components}" const val mozilla_browser_domains = "org.mozilla.components:browser-domains:${Versions.mozilla_android_components}" const val mozilla_browser_icons = "org.mozilla.components:browser-icons:${Versions.mozilla_android_components}" const val mozilla_browser_search = "org.mozilla.components:browser-search:${Versions.mozilla_android_components}" From acb24396e5623c79b1ca8297b6a494ac75bc9fc0 Mon Sep 17 00:00:00 2001 From: Arturo Mejia Date: Mon, 19 Apr 2021 19:54:37 -0400 Subject: [PATCH 011/256] Address WebExtensionBrowserMenuBuilder breaking change --- .../mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt b/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt index 7157e4df2..f2c7d5f4a 100644 --- a/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt +++ b/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt @@ -90,7 +90,9 @@ open class DefaultToolbarMenu( }, endOfMenuAlwaysVisible = shouldUseBottomToolbar, store = store, - webExtIconTintColorResource = primaryTextColor(), + style = WebExtensionBrowserMenuBuilder.Style( + webExtIconTintColorResource = primaryTextColor() + ), onAddonsManagerTapped = { onItemTapped.invoke(ToolbarMenu.Item.AddonsManager) }, From 8f1b3e03f1cd7feb4728ba9542cf31e5dc895efd Mon Sep 17 00:00:00 2001 From: mcarare Date: Wed, 21 Apr 2021 14:35:28 +0300 Subject: [PATCH 012/256] For #18608: Also add default browser item in new menu. --- .../mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt b/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt index f2c7d5f4a..21ab04666 100644 --- a/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt +++ b/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt @@ -364,7 +364,9 @@ open class DefaultToolbarMenu( BrowserMenuDivider(), reportSiteIssuePlaceholder, findInPage, + getSetDefaultBrowserItem()?.let { BrowserMenuDivider() }, getSetDefaultBrowserItem(), + getSetDefaultBrowserItem()?.let { BrowserMenuDivider() }, addToTopSites, addToHomescreen.apply { visible = ::canAddToHomescreen }, installToHomescreen.apply { visible = ::canInstall }, @@ -563,6 +565,8 @@ open class DefaultToolbarMenu( extensionsItem, if (tabsTrayRewrite) syncMenuItem else syncedTabsItem, BrowserMenuDivider(), + getSetDefaultBrowserItem(), + getSetDefaultBrowserItem()?.let { BrowserMenuDivider() }, findInPageItem, desktopSiteItem, customizeReaderView.apply { visible = ::shouldShowReaderViewCustomization }, From 29fa49ff12f7cecf54645f2b4390c7a58cabdcf9 Mon Sep 17 00:00:00 2001 From: Aaron Train Date: Wed, 21 Apr 2021 10:20:34 -0400 Subject: [PATCH 013/256] No issue: add Android Emulator action for contributor PRs (#18901) --- .github/workflows/build-contributor-pr.yml | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.github/workflows/build-contributor-pr.yml b/.github/workflows/build-contributor-pr.yml index e890fa5bc..4f09120a9 100644 --- a/.github/workflows/build-contributor-pr.yml +++ b/.github/workflows/build-contributor-pr.yml @@ -105,3 +105,30 @@ jobs: name: lintDebug report path: app/build/reports/lint-results-debug.html + run-ui: + runs-on: macos-latest + if: github.event.pull_request.head.repo.full_name != github.repository && github.actor != 'MickeyMoz' + + timeout-minutes: 60 + strategy: + matrix: + api-level: [28] + target: [google_apis] + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Run subset of UI Tests + uses: reactivecircus/android-emulator-runner@v2 + with: + api-level: ${{ matrix.api-level }} + target: ${{ matrix.target }} + arch: x86_64 + profile: pixel_3a + script: + "./gradlew connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=\ + org.mozilla.fenix.ui.NavigationToolbarTest#visitURLTest" + - name: Upload Test Artifacts + uses: actions/upload-artifact@v2 + with: + name: test-report + path: app/build/reports From 0ad767730987745e0c76080cd0c64d0b41b92b96 Mon Sep 17 00:00:00 2001 From: Sebastian Kaspari Date: Wed, 21 Apr 2021 18:44:22 +0200 Subject: [PATCH 014/256] update_android_components.sh: Watch different component. `browser-engine-gecko-nightly` doesn't exist anymore. Let's watch `browser-engine-gecko` instead. --- automation/taskcluster/update_android_components.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automation/taskcluster/update_android_components.sh b/automation/taskcluster/update_android_components.sh index c16180564..33c64a95a 100755 --- a/automation/taskcluster/update_android_components.sh +++ b/automation/taskcluster/update_android_components.sh @@ -13,7 +13,7 @@ export REPO="fenix" git config --global user.email "$EMAIL" git config --global user.name "$GITHUB_USER" -COMPONENT_TO_WATCH='browser-engine-gecko-nightly' +COMPONENT_TO_WATCH='browser-engine-gecko' MAVEN_URL="https://nightly.maven.mozilla.org/maven2/org/mozilla/components/$COMPONENT_TO_WATCH" # Fetch latest version From db76b8fe21389cf907a12da172e5d9ca545f5787 Mon Sep 17 00:00:00 2001 From: Elise Richards Date: Wed, 21 Apr 2021 14:13:44 -0500 Subject: [PATCH 015/256] For #19114: check state of sync account when navigating from sync sign in menu item (#19118) --- .../java/org/mozilla/fenix/ui/SmokeTest.kt | 5 +- .../fenix/ui/robots/SyncSignInRobot.kt | 6 ++ .../accounts/FenixAccountManager.kt | 33 ++++++ .../toolbar/BrowserToolbarMenuController.kt | 7 +- .../components/toolbar/DefaultToolbarMenu.kt | 12 +-- .../fenix/components/toolbar/ToolbarMenu.kt | 2 +- .../org/mozilla/fenix/home/HomeFragment.kt | 10 +- .../java/org/mozilla/fenix/home/HomeMenu.kt | 67 ++++++------ .../accounts/FenixAccountManagerTest.kt | 101 ++++++++++++++++++ ...DefaultBrowserToolbarMenuControllerTest.kt | 22 ++++ 10 files changed, 216 insertions(+), 49 deletions(-) create mode 100644 app/src/main/java/org/mozilla/fenix/components/accounts/FenixAccountManager.kt create mode 100644 app/src/test/java/org/mozilla/fenix/components/accounts/FenixAccountManagerTest.kt diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/SmokeTest.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/SmokeTest.kt index cf63c7806..473e9a8fe 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/SmokeTest.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/SmokeTest.kt @@ -227,13 +227,14 @@ class SmokeTest { } @Test - // Verifies the Synced tabs menu opens from a tab's 3 dot menu + // Verifies the Synced tabs menu or Sync Sign In menu opens from a tab's 3 dot menu. + // The test is assuming we are NOT signed in. fun openMainMenuSyncItemTest() { if (FeatureFlags.tabsTrayRewrite) { homeScreen { }.openThreeDotMenu { }.openSyncSignIn { - verifyAccountSettingsMenuHeader() + verifySyncSignInMenuHeader() } } else { homeScreen { diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/SyncSignInRobot.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/SyncSignInRobot.kt index e355174a5..ac7132ea7 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/SyncSignInRobot.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/SyncSignInRobot.kt @@ -22,6 +22,7 @@ import org.mozilla.fenix.helpers.click class SyncSignInRobot { fun verifyAccountSettingsMenuHeader() = assertAccountSettingsMenuHeader() + fun verifySyncSignInMenuHeader() = assertSyncSignInMenuHeader() class Transition { val mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation())!! @@ -44,3 +45,8 @@ private fun assertAccountSettingsMenuHeader() { onView(withText(R.string.preferences_account_settings)) .check((matches(withEffectiveVisibility(Visibility.VISIBLE)))) } + +private fun assertSyncSignInMenuHeader() { + onView(withText(R.string.sign_in_with_camera)) + .check((matches(withEffectiveVisibility(Visibility.VISIBLE)))) +} diff --git a/app/src/main/java/org/mozilla/fenix/components/accounts/FenixAccountManager.kt b/app/src/main/java/org/mozilla/fenix/components/accounts/FenixAccountManager.kt new file mode 100644 index 000000000..fe5397bd1 --- /dev/null +++ b/app/src/main/java/org/mozilla/fenix/components/accounts/FenixAccountManager.kt @@ -0,0 +1,33 @@ +/* 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/. */ + +package org.mozilla.fenix.components.accounts + +import android.content.Context +import mozilla.components.service.fxa.manager.FxaAccountManager +import org.mozilla.fenix.ext.components + +/** + * Component which holds a reference to [FxaAccountManager]. Manages account authentication, + * profiles, and profile state observers. + */ +open class FenixAccountManager(context: Context) { + val accountManager = context.components.backgroundServices.accountManager + + val authenticatedAccount + get() = accountManager.authenticatedAccount() != null + + val accountProfileEmail + get() = accountManager.accountProfile()?.email + + /** + * Check if the current account is signed in and authenticated. + */ + fun signedInToFxa(): Boolean { + val account = accountManager.authenticatedAccount() + val needsReauth = accountManager.accountNeedsReauth() + + return account != null && !needsReauth + } +} diff --git a/app/src/main/java/org/mozilla/fenix/components/toolbar/BrowserToolbarMenuController.kt b/app/src/main/java/org/mozilla/fenix/components/toolbar/BrowserToolbarMenuController.kt index fee10c378..8f7fdd0f0 100644 --- a/app/src/main/java/org/mozilla/fenix/components/toolbar/BrowserToolbarMenuController.kt +++ b/app/src/main/java/org/mozilla/fenix/components/toolbar/BrowserToolbarMenuController.kt @@ -226,10 +226,15 @@ class DefaultBrowserToolbarMenuController( ) } is ToolbarMenu.Item.SyncAccount -> { + val directions = if (item.signedIn) { + BrowserFragmentDirections.actionGlobalAccountSettingsFragment() + } else { + BrowserFragmentDirections.actionGlobalTurnOnSync() + } browserAnimator.captureEngineViewAndDrawStatically { navController.nav( R.id.browserFragment, - BrowserFragmentDirections.actionGlobalAccountSettingsFragment() + directions ) } } diff --git a/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt b/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt index 21ab04666..405fbfbf8 100644 --- a/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt +++ b/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt @@ -39,6 +39,7 @@ import org.mozilla.fenix.FeatureFlags.tabsTrayRewrite import org.mozilla.fenix.HomeActivity import org.mozilla.fenix.R import org.mozilla.fenix.browser.browsingmode.BrowsingMode +import org.mozilla.fenix.components.accounts.FenixAccountManager import org.mozilla.fenix.experiments.ExperimentBranch import org.mozilla.fenix.experiments.Experiments import org.mozilla.fenix.ext.asActivity @@ -74,12 +75,11 @@ open class DefaultToolbarMenu( private val shouldDeleteDataOnQuit = context.settings().shouldDeleteBrowsingDataOnQuit private val shouldUseBottomToolbar = context.settings().shouldUseBottomToolbar + private val accountManager = FenixAccountManager(context) private val selectedSession: TabSessionState? get() = store.state.selectedTab - private val accountManager = context.components.backgroundServices.accountManager - override val menuBuilder by lazy { WebExtensionBrowserMenuBuilder( items = @@ -534,10 +534,10 @@ open class DefaultToolbarMenu( } private fun getSyncItemTitle(): String { - val authenticatedAccount = accountManager.authenticatedAccount() != null - val email = accountManager.accountProfile()?.email + val authenticatedAccount = accountManager.authenticatedAccount + val email = accountManager.accountProfileEmail - return if (authenticatedAccount && email != null) { + return if (authenticatedAccount && !email.isNullOrEmpty()) { email } else { context.getString(R.string.sync_menu_sign_in) @@ -549,7 +549,7 @@ open class DefaultToolbarMenu( R.drawable.ic_synced_tabs, primaryTextColor() ) { - onItemTapped.invoke(ToolbarMenu.Item.SyncAccount) + onItemTapped.invoke(ToolbarMenu.Item.SyncAccount(accountManager.signedInToFxa())) } @VisibleForTesting(otherwise = PRIVATE) diff --git a/app/src/main/java/org/mozilla/fenix/components/toolbar/ToolbarMenu.kt b/app/src/main/java/org/mozilla/fenix/components/toolbar/ToolbarMenu.kt index 7b547e7fe..ec384c188 100644 --- a/app/src/main/java/org/mozilla/fenix/components/toolbar/ToolbarMenu.kt +++ b/app/src/main/java/org/mozilla/fenix/components/toolbar/ToolbarMenu.kt @@ -23,7 +23,7 @@ interface ToolbarMenu { object InstallPwaToHomeScreen : Item() object AddToHomeScreen : Item() object SyncedTabs : Item() - object SyncAccount : Item() + data class SyncAccount(val signedIn: Boolean) : Item() object AddonsManager : Item() object Quit : Item() object OpenInApp : Item() diff --git a/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt b/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt index 9df47af02..a43261f41 100644 --- a/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt @@ -89,6 +89,7 @@ import org.mozilla.fenix.GleanMetrics.PerfStartup import org.mozilla.fenix.HomeActivity import org.mozilla.fenix.R import org.mozilla.fenix.browser.BrowserAnimator.Companion.getToolbarNavOptions +import org.mozilla.fenix.browser.BrowserFragmentDirections import org.mozilla.fenix.browser.browsingmode.BrowsingMode import org.mozilla.fenix.components.FenixSnackbar import org.mozilla.fenix.components.PrivateShortcutCreateManager @@ -792,11 +793,16 @@ class HomeFragment : Fragment() { HomeFragmentDirections.actionGlobalSyncedTabsFragment() ) } - HomeMenu.Item.SyncAccount -> { + is HomeMenu.Item.SyncAccount -> { hideOnboardingIfNeeded() + val directions = if (it.signedIn) { + BrowserFragmentDirections.actionGlobalAccountSettingsFragment() + } else { + BrowserFragmentDirections.actionGlobalTurnOnSync() + } nav( R.id.homeFragment, - HomeFragmentDirections.actionGlobalAccountSettingsFragment() + directions ) } HomeMenu.Item.Bookmarks -> { diff --git a/app/src/main/java/org/mozilla/fenix/home/HomeMenu.kt b/app/src/main/java/org/mozilla/fenix/home/HomeMenu.kt index 2f277aa29..4c22f21d8 100644 --- a/app/src/main/java/org/mozilla/fenix/home/HomeMenu.kt +++ b/app/src/main/java/org/mozilla/fenix/home/HomeMenu.kt @@ -26,6 +26,7 @@ import mozilla.components.support.ktx.android.content.getColorFromAttr import org.mozilla.fenix.FeatureFlags import org.mozilla.fenix.FeatureFlags.tabsTrayRewrite import org.mozilla.fenix.R +import org.mozilla.fenix.components.accounts.FenixAccountManager import org.mozilla.fenix.experiments.ExperimentBranch import org.mozilla.fenix.experiments.Experiments import org.mozilla.fenix.ext.components @@ -48,7 +49,7 @@ class HomeMenu( object Downloads : Item() object Extensions : Item() object SyncTabs : Item() - object SyncAccount : Item() + data class SyncAccount(val signedIn: Boolean) : Item() object WhatsNew : Item() object Help : Item() object Settings : Item() @@ -64,7 +65,7 @@ class HomeMenu( context.getColorFromAttr(R.attr.syncDisconnectedBackground) private val shouldUseBottomToolbar = context.settings().shouldUseBottomToolbar - private val accountManager = context.components.backgroundServices.accountManager + private val accountManager = FenixAccountManager(context) // 'Reconnect' and 'Quit' items aren't needed most of the time, so we'll only create the if necessary. private val reconnectToSyncItem by lazy { @@ -93,6 +94,33 @@ class HomeMenu( } } + val syncedTabsItem = BrowserMenuImageText( + context.getString(R.string.synced_tabs), + R.drawable.ic_synced_tabs, + primaryTextColor + ) { + onItemTapped.invoke(Item.SyncTabs) + } + + private fun getSyncItemTitle(): String { + val authenticatedAccount = accountManager.authenticatedAccount + val email = accountManager.accountProfileEmail + + return if (authenticatedAccount && !email.isNullOrEmpty()) { + email + } else { + context.getString(R.string.sync_menu_sign_in) + } + } + + val syncSignInMenuItem = BrowserMenuImageText( + getSyncItemTitle(), + R.drawable.ic_synced_tabs, + primaryTextColor + ) { + onItemTapped.invoke(Item.SyncAccount(accountManager.signedInToFxa())) + } + private val oldCoreMenuItems by lazy { val whatsNewItem = BrowserMenuHighlightableItem( context.getString(R.string.browser_menu_whats_new), @@ -159,14 +187,6 @@ class HomeMenu( onItemTapped.invoke(Item.Settings) } - val syncedTabsItem = BrowserMenuImageText( - getSyncItemTitle(), - R.drawable.ic_synced_tabs, - primaryTextColor - ) { - onItemTapped.invoke(Item.SyncTabs) - } - val helpItem = BrowserMenuImageText( context.getString(R.string.browser_menu_help), R.drawable.ic_help, @@ -226,17 +246,6 @@ class HomeMenu( onItemTapped.invoke(Item.DesktopMode(checked)) } - private fun getSyncItemTitle(): String { - val authenticatedAccount = accountManager.authenticatedAccount() != null - val email = accountManager.accountProfile()?.email - - return if (authenticatedAccount && email != null) { - email - } else { - context.getString(R.string.sync_menu_sign_in) - } - } - @Suppress("ComplexMethod") private fun newCoreMenuItems(): List { val experiments = context.components.analytics.experiments @@ -294,22 +303,6 @@ class HomeMenu( onItemTapped.invoke(Item.Extensions) } - val syncedTabsItem = BrowserMenuImageText( - context.getString(R.string.synced_tabs), - R.drawable.ic_synced_tabs, - primaryTextColor - ) { - onItemTapped.invoke(Item.SyncTabs) - } - - val syncSignInMenuItem = BrowserMenuImageText( - getSyncItemTitle(), - R.drawable.ic_synced_tabs, - primaryTextColor - ) { - onItemTapped.invoke(Item.SyncAccount) - } - val whatsNewItem = BrowserMenuHighlightableItem( context.getString(R.string.browser_menu_whats_new), R.drawable.ic_whats_new, diff --git a/app/src/test/java/org/mozilla/fenix/components/accounts/FenixAccountManagerTest.kt b/app/src/test/java/org/mozilla/fenix/components/accounts/FenixAccountManagerTest.kt new file mode 100644 index 000000000..d93616bc5 --- /dev/null +++ b/app/src/test/java/org/mozilla/fenix/components/accounts/FenixAccountManagerTest.kt @@ -0,0 +1,101 @@ +/* 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/. */ + +package org.mozilla.fenix.components.accounts + +import android.content.Context +import io.mockk.every +import io.mockk.mockk +import mozilla.components.concept.sync.OAuthAccount +import mozilla.components.concept.sync.Profile +import mozilla.components.service.fxa.manager.FxaAccountManager +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.mozilla.fenix.ext.components +import org.mozilla.fenix.helpers.FenixRobolectricTestRunner + +@RunWith(FenixRobolectricTestRunner::class) +class FenixAccountManagerTest { + + private lateinit var fenixFxaManager: FenixAccountManager + private lateinit var accountManagerComponent: FxaAccountManager + private lateinit var context: Context + private lateinit var account: OAuthAccount + private lateinit var profile: Profile + + @Before + fun setUp() { + context = mockk(relaxed = true) + account = mockk(relaxed = true) + profile = mockk(relaxed = true) + accountManagerComponent = mockk(relaxed = true) + } + + @Test + fun `GIVEN an account exists THEN fetch the associated email address`() { + every { accountManagerComponent.authenticatedAccount() } returns account + every { accountManagerComponent.accountProfile() } returns profile + every { context.components.backgroundServices.accountManager } returns accountManagerComponent + + fenixFxaManager = FenixAccountManager(context) + + val emailAddress = "firefoxIsFun@test.com" + every { accountManagerComponent.accountProfile()?.email } returns emailAddress + + val result = fenixFxaManager.accountProfileEmail + assertEquals(emailAddress, result) + } + + @Test + fun `GIVEN an account does not exist THEN return null when fetching the associated email address`() { + every { accountManagerComponent.authenticatedAccount() } returns null + every { accountManagerComponent.accountProfile() } returns null + every { context.components.backgroundServices.accountManager } returns accountManagerComponent + + fenixFxaManager = FenixAccountManager(context) + + val result = fenixFxaManager.accountProfileEmail + assertEquals(null, result) + } + + @Test + fun `GIVEN an account is signed in and authenticated THEN check returns true`() { + every { accountManagerComponent.authenticatedAccount() } returns account + every { accountManagerComponent.accountNeedsReauth() } returns false + every { context.components.backgroundServices.accountManager } returns accountManagerComponent + + fenixFxaManager = FenixAccountManager(context) + + val signedIn = fenixFxaManager.signedInToFxa() + assertTrue(signedIn) + } + + @Test + fun `GIVEN an account is signed in and NOT authenticated THEN check returns false`() { + every { accountManagerComponent.authenticatedAccount() } returns account + every { accountManagerComponent.accountNeedsReauth() } returns true + every { context.components.backgroundServices.accountManager } returns accountManagerComponent + + fenixFxaManager = FenixAccountManager(context) + + val signedIn = fenixFxaManager.signedInToFxa() + assertFalse(signedIn) + } + + @Test + fun `GIVEN an account is not signed in THEN check returns false`() { + every { accountManagerComponent.authenticatedAccount() } returns null + every { accountManagerComponent.accountNeedsReauth() } returns true + every { context.components.backgroundServices.accountManager } returns accountManagerComponent + + fenixFxaManager = FenixAccountManager(context) + + val signedIn = fenixFxaManager.signedInToFxa() + assertFalse(signedIn) + } +} diff --git a/app/src/test/java/org/mozilla/fenix/components/toolbar/DefaultBrowserToolbarMenuControllerTest.kt b/app/src/test/java/org/mozilla/fenix/components/toolbar/DefaultBrowserToolbarMenuControllerTest.kt index 118043de8..a60977431 100644 --- a/app/src/test/java/org/mozilla/fenix/components/toolbar/DefaultBrowserToolbarMenuControllerTest.kt +++ b/app/src/test/java/org/mozilla/fenix/components/toolbar/DefaultBrowserToolbarMenuControllerTest.kt @@ -572,6 +572,28 @@ class DefaultBrowserToolbarMenuControllerTest { } } + @Test + fun `WHEN sync sign in menu item is pressed AND account is signed out THEN navigate to sync sign in`() = runBlockingTest { + val item = ToolbarMenu.Item.SyncAccount(false) + val directions = BrowserFragmentDirections.actionGlobalTurnOnSync() + + val controller = createController(scope = this, store = browserStore) + controller.handleToolbarItemInteraction(item) + + verify { navController.navigate(directions, null) } + } + + @Test + fun `WHEN sync sign in menu item is pressed AND account is signed in THEN navigate to sync sign in`() = runBlockingTest { + val item = ToolbarMenu.Item.SyncAccount(true) + val directions = BrowserFragmentDirections.actionGlobalAccountSettingsFragment() + + val controller = createController(scope = this, store = browserStore) + controller.handleToolbarItemInteraction(item) + + verify { navController.navigate(directions, null) } + } + private fun createController( scope: CoroutineScope, store: BrowserStore, From 688453f61fe4d8e2f186b7142b636cff988ad161 Mon Sep 17 00:00:00 2001 From: Elise Richards Date: Wed, 21 Apr 2021 16:02:14 -0500 Subject: [PATCH 016/256] Remove strings marked as deprecated that are no longer being used. (#19060) --- app/src/main/res/values/strings.xml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index b6e7685db..107349023 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -776,8 +776,6 @@ Deleted %1$s Add folder - - Bookmark created. Bookmark saved! @@ -1712,19 +1710,6 @@ Remove - - Get the most out of %s. - Click for more details - - - Collect the things that matter to you - - Group together similar searches, sites, and tabs for quick access later. - - You are signed in as %s on another Firefox browser on this phone. Would you like to sign in with this account? - - You can easily add this website to your phone’s Home screen to have instant access and browse faster with an app-like experience. From 0bc5c22b6307494409b46311176177c38ce81192 Mon Sep 17 00:00:00 2001 From: Mozilla L10n Automation Bot Date: Thu, 22 Apr 2021 00:05:36 +0000 Subject: [PATCH 017/256] Import l10n. --- app/src/main/res/values-ar/strings.xml | 6 +- app/src/main/res/values-br/strings.xml | 83 ++++++++------ app/src/main/res/values-cy/strings.xml | 2 +- app/src/main/res/values-eo/strings.xml | 99 ++++++++++++----- app/src/main/res/values-gn/strings.xml | 8 +- app/src/main/res/values-hi-rIN/strings.xml | 45 ++++++++ app/src/main/res/values-kmr/strings.xml | 119 ++++++++++++++++----- app/src/main/res/values-nn-rNO/strings.xml | 2 +- app/src/main/res/values-oc/strings.xml | 37 ++++++- app/src/main/res/values-te/strings.xml | 22 ++++ app/src/main/res/values-tt/strings.xml | 52 +++++++++ 11 files changed, 377 insertions(+), 98 deletions(-) diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml index 806034678..0d4a6b2d1 100644 --- a/app/src/main/res/values-ar/strings.xml +++ b/app/src/main/res/values-ar/strings.xml @@ -629,6 +629,8 @@ شارِك كل الألسنة الألسنة المُغلقة حديثًا + + إعدادات الحساب إعدادات اللسان @@ -983,8 +985,6 @@ كل الإجراءات المستخدمة حديثًا - - ولجت باسم %1$s لِج كي تبدأ المزامنة @@ -1574,6 +1574,8 @@ الاسم على البطاقة الاسم المستعار للبطاقة + + احذف البطاقة احذف البطاقة diff --git a/app/src/main/res/values-br/strings.xml b/app/src/main/res/values-br/strings.xml index 5dbe8b20e..92867f22e 100644 --- a/app/src/main/res/values-br/strings.xml +++ b/app/src/main/res/values-br/strings.xml @@ -17,10 +17,6 @@ Diskouezet e vo amañ hocʼh ivinelloù digoret. Diskouezet e vo amañ hocʼh ivinelloù prevez. - - Baidu - - JD 1 ivinell digor. Stokit evit mont dʼun ivinell all. @@ -177,6 +173,11 @@ Digeriñ en arload Neuz + + Ouzhpennañ + + Embann + Ne cʼhaller ket kennaskañ. Steuñv URL dianav. @@ -612,6 +613,8 @@ Rannañ an holl ivinelloù Ivinelloù serret nevez zo + + Arventennoù ar gont Arventennoù an ivinelloù @@ -1160,9 +1163,6 @@ Donemat war %s! Ur gont hoc’h eus dija? - - Grit anaoudegezh gant %s Gwelout pezh a zo nevez Amañ emañ ar respontoù - - Krogit da c’houbredañ ho sinedoù, ho kerioù-tremen, ha muioc’h c’hoazh gant ho kont FIrefox. - - Gouzout hiroc’h @@ -1182,35 +1178,18 @@ Ya, kennaskit ac’hanon O kennaskañ… - - Kennaskañ ouzh FIrefox Chom kennasket Enaouet eo Sync C’hwitadenn war ar c’hennaskañ - - Prevezded emgefreek - - Ar arventennoù prevezded ha diogelroez a stank an heulierien, ar meziantoù touellus hag an embregerezhioù a heuilh ac’hanoc’h. Skoueriek (dre ziouer) - - Na stank ket kement a heulier. Ar pajennoù a gargo evel boaz. Strizh (erbedet) Strizh - - Stankañ a raio muioc’h a heulierien, bruderezhioù ha diflugelloù. Buanoc’h e kargo ar pajennoù, met gallout a ra traoù ’zo chom hep mont en-dro. - - Dibabit un tu - - Klaskit ar merdeiñ gant un dorn a-drugarez d’ar varrenn-ostilhoù en traoñ, pe laoskit anezhi en nec’h. Merdeiñ prevez Ho puhez prevez + The first parameter is the name of the app (e.g. Firefox Preview) Substitute %s for long browser name. --> Savet hon eus %s evit ma c’hallfec’h reoliñ ar pezh a rannit enlinenn hag ar pezh a rannit ganeomp. Lennit hon evezhiadenn a-get buhez prevez @@ -1237,8 +1216,6 @@ Dibabit an neuz - - Espernit ho patiri hag ho taoulagad gant ar mod teñval. Emgefreek @@ -1292,14 +1269,10 @@ Gouzout hiroc’h Skoueriek (dre ziouer) - - Na stank ket kement a heulier. Ar pajennoù a gargo evel boaz. Ar pezh a zo stanket gant ar gwarez heuliañ skoueriek Strizh - - Stankañ a raio muioc’h a heulierien, bruderezhioù ha diflugelloù. Buanoc’h e kargo ar pajennoù, met gallout a ra traoù ’zo chom hep mont en-dro. Ar pezh a zo stanket gant ar gwarez heuliañ strizh @@ -1533,6 +1506,43 @@ Lañser rummañ an titouroù kennaskañ + + + Kartennoù kred + + Enrollañ ha leuniañ ar c’hartennoù en un doare emgefreek + + Rineget eo ar roadennoù + + Ouzhpennañ ur gartenn gred + + Merañ ar c’hartennoù enrollet + + Ouzhpennañ ur gartenn + + Kemmañ ar gartenn + + Niverenn ar gartenn + + + Deiziad termen + + Anv war ar gartenn + + Lesanv ar gartenn + + Dilemel ar gartenn + + Dilemel ar gartenn + + Enrollañ + + Enrollañ + + Nullañ + + Kartennoù enrollet + Ouzhpennañ ul lusker klask @@ -1691,6 +1701,9 @@ Nullañ + + Digeriñ liammoù al lec’hiennoù, posteloù ha kemennadennoù e Firefox en un doare emgefreek. + Dilemel diff --git a/app/src/main/res/values-cy/strings.xml b/app/src/main/res/values-cy/strings.xml index 7d9d0d8ae..616a81865 100644 --- a/app/src/main/res/values-cy/strings.xml +++ b/app/src/main/res/values-cy/strings.xml @@ -907,7 +907,7 @@ Rhwystro sain a fideo ar ddata cellol yn unig - Bydd sain a fideo yn chwarae ar ddiwifr + Bydd sain a fideo yn chwarae ar Wi-Fi Rhwystro sain yn unig diff --git a/app/src/main/res/values-eo/strings.xml b/app/src/main/res/values-eo/strings.xml index f0bde9b86..847323746 100644 --- a/app/src/main/res/values-eo/strings.xml +++ b/app/src/main/res/values-eo/strings.xml @@ -19,10 +19,6 @@ Viaj privataj langetoj aperos ĉi tie. - - Baidu - - JD 1 malfermita langeto. Tuŝetu por ŝanĝi langeton. @@ -181,6 +177,11 @@ Personecigi legilan vidon + + Aldoni + + Modifi + Konekto neebla. Nerekonita skemo de URL. @@ -603,12 +604,16 @@ Privata seanco Privataj langetoj + + Spegulitaj langetoj Aldoni langeton Aldoni privatan langeton Privata + + Spegulado Malfermi langetojn @@ -619,6 +624,8 @@ Dividi ĉiujn langetojn Ĵuse fermitaj langetoj + + Agordoj de konto Agordoj de langetoj @@ -980,6 +987,8 @@ Ĉiuj agoj Ĵuse uzitaj + + Komenci seancon por speguli Komenci seancon en Speguli @@ -1174,9 +1183,6 @@ Bonvenon al %s! Ĉu vi jam havas konton? - - Malkovru %s Vidi la novaĵojn Trovu respondojn ĉi tie - - Komenci speguli legosignojn, pasvortojn kaj aliajn aferojn per via konto de Firefox. + + Speguli Firefox inter aparatoj - Pli da informo + Porti legosignojn, historion kaj pasvortojn al Firefox en tiu ĉi aparato. @@ -1196,8 +1202,8 @@ Jes, komenci seancon Komenco de seanco… - - Komenci seancon en Firefox + + Registriĝi Ne komenci seancon @@ -1205,26 +1211,23 @@ Malsukcesa komenco de seanco - Aŭtomata privateco - - La agordoj privatecaj kaj sekurecaj blokas spurilojn, malicajn programojn kaj kompaniojn kiuj sekvas vin. + Privateco ĉiam aktiva + + Firefox aŭtomate evitas ke entreprenoj sekrete sekvu vin tra la teksaĵo. Norma - Malpli da spuriloj blokitaj. Paĝoj ŝargiĝos normale. + Ekvilibrita por privateco kaj efikeco. Paĝoj ŝargiĝos normale. Rigora (rekomendita) Rigora - Pli da spuriloj, reklamoj kaj ŝprucaĵoj blokitaj. Paĝoj ŝargiĝos pli rapide, sed kelkaj aferoj povus ne bone funkcii. - - Preni pozicion + Pli da spuriloj blokitaj signifas ke paĝoj ŝargiĝos pli rapide, sed kelkaj misfunkcioj povus okazi. + + Elektu lokon por la ilaro - Provu la unumanan retumon per la malsupra ilaro, aŭ movu ĝin al la supro. + Metu la ilaron ĉemanen. Lasu ĝin malsupre aŭ movu ĝin supren. Retumi private Via privateco + The first parameter is the name of the app (e.g. Firefox Preview) Substitute %s for long browser name. --> Ni kreis %s por doni al vi la eblon plene regi kion vi dividas en la reto kaj kion vi dividas kun ni. Legu nian rimarkon pri privateco @@ -1253,7 +1256,7 @@ Elektu vian etoson - Ŝparu iom da baterio kaj protektu viajn okulojn per malhela reĝimo. + Ŝparu iom da baterio kaj protektu viajn okulojn per malhela reĝimo. Aŭtomate @@ -1309,13 +1312,13 @@ Norma - Malpli da spuriloj blokitaj. Paĝoj ŝargiĝos normale. + Ekvilibrita por privateco kaj efikeco. Paĝoj ŝargiĝos normale. Aferoj blokitaj de la norma protekto kontraŭ spurado Rigora - Pli da spuriloj, reklamoj kaj ŝprucaĵoj blokitaj. Paĝoj ŝargiĝos pli rapide, sed kelkaj aferoj povus ne bone funkcii. + Pli da spuriloj blokitaj signifas ke paĝoj ŝargiĝos pli rapide, sed kelkaj misfunkcioj povus okazi. Aferoj blokitaj de la rigora protekto kontraŭ spurado @@ -1553,6 +1556,45 @@ Ordigi menuon de legitimiloj + + + Kreditkartoj + + Konservi kaj aŭtomate plenigi kreditkartojn + + La datumoj estas ĉifritaj + + Speguli kreditkartojn inter aparatoj + + Aldoni kreditkarton + + Administri konservitajn kreditkartojn + + Aldoni kreditkarton + + Modifi kreditkarton + + + Numero de kreditkarto + + Dato de senvalidiĝo + + Nomo sur kreditkarto + + Kromnomo por kreditkarto + + Forigi kreditkarton + + Forigi kreditkarton + + Konservi + + Konservi + + Nuligi + + Konservitaj kreditkartoj + Aldoni serĉilon @@ -1713,6 +1755,9 @@ Nuligi + + Aŭtomate malfermi ligilon en retejoj, retpoŝtoj kaj mesaĝoj per Firefox. + Forigi diff --git a/app/src/main/res/values-gn/strings.xml b/app/src/main/res/values-gn/strings.xml index e4471d19e..3c5612e01 100644 --- a/app/src/main/res/values-gn/strings.xml +++ b/app/src/main/res/values-gn/strings.xml @@ -634,6 +634,8 @@ Emoherakuã opaite tendayke Tendayke oñemboty ramóva + + Mba’ete ñemboheko Tendayke ñemboheko @@ -997,8 +999,6 @@ Opaite tembiaporã Ojepururamovéva - - Eike %1$s-ramo Eike embojuehe hag̃ua @@ -1592,6 +1592,8 @@ Eñangareko kuatia’atã ñongatupyrére Embojuaju kuatia’atã + + Embosako’i kuatia’atã Kuatia’atã papy @@ -1600,6 +1602,8 @@ Kuatia’atã réra Kuatia’atã je’erã + + Emboguete kuatia’atã Emboguete kuatia’atã diff --git a/app/src/main/res/values-hi-rIN/strings.xml b/app/src/main/res/values-hi-rIN/strings.xml index f14d093bc..b2966adbe 100644 --- a/app/src/main/res/values-hi-rIN/strings.xml +++ b/app/src/main/res/values-hi-rIN/strings.xml @@ -528,6 +528,13 @@ एक महीने बाद + + एक दिन के बाद बंद करें + + एक हफ्ते के बाद बंद करें + + एक महीने के बाद बंद करें + खुले टैब @@ -549,6 +556,8 @@ सभी टैब साझा करें हाल ही में बंद किए गए टैब + + खाता सेटिंग टैब सेटिंग @@ -563,8 +572,12 @@ बुकमार्क बंद करें + + चयनित टैब साझा करें संग्रहण से टैब हटायें + + टैब चुनें टैब बंद करें @@ -636,6 +649,8 @@ %1$d चीज़ों को मिटाएं + + आज पिछले 24 घंटे @@ -862,6 +877,8 @@ सभी क्रियाएं हाल ही में उपयोग किया गया + + सिंक करने के लिए साइन इन करें सिंक करने के लिए साइन इन करें @@ -1064,6 +1081,8 @@ हां, मुझे साइन इन करें साइन इन हो रहा है… + + साइन अप साइन आउट रहें @@ -1389,6 +1408,32 @@ लॉगिन मेन्यू को क्रमबद्ध करें + + + क्रेडिट कार्ड + + क्रेडिट कार्ड जोड़ें + + कार्ड जोड़ें + + कार्ड संपादित करें + + कार्ड नंबर + + कार्ड पर नाम + + कार्ड हटाएं + + कार्ड हटाएं + + सहेजें + + सहेजें + + रद्द करें + + सहेजे गए कार्ड + खोज ईंजन जोड़ें diff --git a/app/src/main/res/values-kmr/strings.xml b/app/src/main/res/values-kmr/strings.xml index 10e034fd7..5cc849d06 100644 --- a/app/src/main/res/values-kmr/strings.xml +++ b/app/src/main/res/values-kmr/strings.xml @@ -19,10 +19,6 @@ Hilpekînên te yên vekirî ew ê li vir bên nîşandan. Hilpekînên te yên veşartî ew ê li vir bên nîşandan. - - Baidu - - JD 1 hilpekîna vekirî. Ji bo hilpekînê biguherînî, bitikîne. @@ -180,6 +176,13 @@ Di sepanê de veke Xuyang + + Moda xwînerê taybet bike + + Lê zêde bike + + Serast bike + Nayê girêdan. Şemaya URLyê nayê nasîn. @@ -218,6 +221,11 @@ Zêdetir bizane + + Bi %s bigere + + Lêgerînê rasterast ji darikê navnîşanan bike + Hilpekîna nû ya Firefoxê veke @@ -603,12 +611,16 @@ Rûniştina veşartî Hilpekînên veşartî + + Hilpekînên senkronîzekirî Hilpekînê tevlî bike Hilpekîna veşartî tevlî bike Veşartî + + Senkronîzekirin Hilpekînên vekirî @@ -619,6 +631,8 @@ Hemû hilpekînan parve bike Hilpekînên herî dawî hatine girtin + + Sazkariyên hesabî Sazkariyên hilpekînê @@ -970,6 +984,8 @@ Hemû çalakî Bikaranînên herî dawî + + Ji bo senkronîzekirinê têkevê Têkeve Sync’ê @@ -1165,9 +1181,6 @@ Tu bi xêr hatî %s’ê! Jixwe hesabekî te heye? - - %s’ê nas bike Tiştên nû bibîne Bersiv li vir in - - Bi hesabê xwe yê Firefoxê dest bi senkronîzekirina favoriyan, pêborînan û zêdetirî wan, bike. + + Firefoxê di navbera amûran de senkronîze bike - Zêdetir bizane + Favorî, raborî û şîfreyên xwe bîne Firefoxa vê amûrê. @@ -1187,8 +1200,8 @@ Erê, têkeve Dikevê… - - Têkeve Firefox’ê + + Xwe tomar bike Têketinê neke @@ -1196,26 +1209,23 @@ Têketin bi ser neket - Nihêniya otomatîk - - Sazkariyên nihênî û ewlekariyê şopîneran û sepanên niyetxerab û şirketênku dixwazin te bişopînin asteng dike. + Her car -nepen + + Firefox bixweber rê li şirketan digire ku bi dizî li dora te tevnegerin. Standard (jixweber) - Hindiktir şopîneran asteng dike. Rûpel ew ê bi awayê normal vebin. + Nepenî û performansa bi aheng. Rûpel bi asayî tên barkirin. Tund (tê pêşniyarkirin) Tund - Zêdetir şopîneran, reklaman û pencereyên vebûnok asteng dike. Rûpel zûtir vedibin, lê dibe ku hin taybetî nexebitin. - - Aliyê xwe hilbijêre + Ji bo rûpel zûtir bên vekirin zêdetir şopîneran asteng dike lê dibe ku hin fonksiyonên rûpelan xira bibin. + + Ciyê darikê amûran hilbijêre - Darikê amûran ê jêrîn bi destekî biceribîne an jî wê bibe jorê tu bi kêfa xwe yî. + Darikê amûran dayne ciyekê bi hêsanî bigihîjiyê. Dikarî wê li xwarê bihêlî yan jî bibî jorê. Bi nihênî bigere Nihêniya te + The first parameter is the name of the app (e.g. Firefox Preview) Substitute %s for long browser name. --> Me %s ji bo hindê çêkiriye ku derbarê tiştên tu li ser înternetê û tiştên bi me re parve dikî de kontrol di destê te de be. Agahdariya me ya nihêniyê bixwîne @@ -1242,7 +1252,7 @@ Rûkara xwe hilbijêre - Bi çalakkirina moda tarî him ji bataryayê teserûf bike him jî çavên xwe rehet bike. + Bi moda tarî dikarî ji bataryayê teseruf bikî û çavên xwe vehesînî. Otomatîk @@ -1298,13 +1308,13 @@ Standard (heyî) - Hindiktir şopîneran asteng dike. Rûpel ew ê bi awayê normal vebin. + Hevsengiya ji bo nepenî û performansê. Rûpel asayî tên barkirin. Bi parastina ji şopandinê ya standard çi tên astengkirin? Tund - Zêdetir şopîneran, reklaman û pencereyên vebûnok asteng dike. Rûpel zûtir vedibin, lê dibe ku hin taybetî nexebitin. + Ji bo rûpel zûtir bên vekirin zêdetir şopîneran asteng dike lê dibe ku hin fonksiyonên rûpelan xira bibin. Bi parastina ji şopandinê ya tund çi tên astengkirin? @@ -1353,6 +1363,8 @@ Skrîptên xirab yên ji bo ku kankerên krîpto ji bo çêkirina pereyên krîpto xwe bigihînin amûra te asteng dike. Şoptilî + + Rê li berhevkirina zanyariyên derbarê amûra te de yên pêkan e biawayekî bêmînak bên pênasekirin digire ku pêkan e ji bo şopandinê bên bikaranîn. Naverokên şopandinê @@ -1381,6 +1393,9 @@ Şoînerên beralîkirinê + + Kûkiyên ji aliyê beralîkirinên malperên tên naskirin ve hatine bicîkirin paqij dike. + Piştgirî @@ -1515,6 +1530,8 @@ ji bo hesabên xwe yên tomarkirî bibînî, kilîdê veke Hesab û pêborînên xwe biparêze + + Deseneke kilîdê, PIN yan jî şîfreyekê diyar bike da ku gava amûra te bikeve destê kesên din têketin û şîfreyên te yên tomarkirî parastî bin. Piştre @@ -1523,6 +1540,8 @@ Kilîda cîhaza xwe rake Hemû malperan nêzîk bike + + Ji bo destûrdana jidandin û nêzîkkirinê çalak bike, di wan malperan de jî ku vê tevgeriyanê asteng dikin. Nav (A-Z) @@ -1531,6 +1550,45 @@ Menûya rêzkirina hesaban + + + Kartên krediyê + + Kartên tomarkirî û xweber tên dagirtin + + Dane şîfrekirî ne + + + Kartan di navbera amûran de senkronîze bike + + Kredîkartekê lê zêde bike + + Kartên tomarkirî bi rê ve bibe + + Kartê lê zêde bike + + Kartê serast bike + + Hejmara kartê + + Dema dawî ya bikaranînê + + Navê li ser kartê + + Navê kartê + + Kartê jê bibe + + Kartê jê bibe + + Tomar bike + + Tomar bike + + Betal + + Kartên tomarkirî + Motora lêgerînê tevlî bike @@ -1688,6 +1746,9 @@ Betal bike + + Bila lînkên ji malperan, e-posteyan û peyaman xweber di Firefoxê de bên vekirin. + Rake @@ -1704,4 +1765,6 @@ Lêgerîn, malper û hilpekînên wekhev, bike kom da ku paşê tu karibî xwe zû bigihînî wan. Tu li ser vê telefonê di gerokeke din a Firefoxê de wekî %s têketî yê. Tu dixwazî bi vî hesabî têkevî? - + + Tu dikarî vê malperê bi hêsanî li ekrana Malê ya telefona xwe zêde bikî û dikarî vê malperê bilez û wekî ku bernamokek be bi kar bînî. + diff --git a/app/src/main/res/values-nn-rNO/strings.xml b/app/src/main/res/values-nn-rNO/strings.xml index 620296a6c..8848f06af 100644 --- a/app/src/main/res/values-nn-rNO/strings.xml +++ b/app/src/main/res/values-nn-rNO/strings.xml @@ -517,7 +517,7 @@ Trekk for å oppdatere - Bla for å skjule verktøylinja + Bla for å gøyme verktøylinja Sveip verktøylinja sidelengs for å byte fane diff --git a/app/src/main/res/values-oc/strings.xml b/app/src/main/res/values-oc/strings.xml index 158b1c033..f10979d26 100644 --- a/app/src/main/res/values-oc/strings.xml +++ b/app/src/main/res/values-oc/strings.xml @@ -629,6 +629,8 @@ Partejar totes los onglets Onglets tampats recentament + + Paramètres del compte Paramètres dels onglets @@ -990,8 +992,6 @@ Totas las accions Utilizats fa res - - Identificat coma %1$s Se connectar per sincronizar @@ -1161,17 +1161,29 @@ Firefox Preview ara es Firefox Nightly + + + Firefox Nightly es actualizat cada nuèch e prepausa de foncionalitats novèlas experimentalas. + Pasmens es mens estable. Telecargatz la version beta de nòstre navegador per una experiéncia mai estabala. Installar Firefox per Android Beta Firefox Nightly a mudat los catons + + + Aquesta aplicacion aurà pas mai de mesa a jorn de seguretat. Deuriatz quitar de l’utilizar e utilizar puslèu lo Nightly novèl a la plaça. + \n\nPer transferir vòstres marcapaginas, vòstres identificants e vòstre istoric cap a una autra aplicacion, creatz un compte Firefox. Passar la Nightly nòu Firefox Nightly a mudat los catons + + + Aquesta aplicacion aurà pas mai de mesa a jorn de seguretat. Deuriatz quitar de l’utilizar e utilizar puslèu lo Nightly novèl a la plaça.. + \n\nPer transferir vòstres marcapaginas, vòstres identificants e vòstre istoric cap a una autra aplicacion, creatz un compte Firefox. Obténer lo novèl Nightly @@ -1188,6 +1200,10 @@ Avètz de question tocant lo nòu %s ? Volètz saber çò que cambièt ? Trobatz de responsas aquí + + Sincronizar Firefox entre vòstres aparelhs + + Importatz vòstres marcapaginas, vòstre istoric e vòstres senhals dins Firefox sus aqueste aparelh. @@ -1216,6 +1232,12 @@ Estricte (recomandat) Estricte + + Bloca mai de traçadors, accelèra la cargament de las paginas mas d’unas pòdon quitar de foncionar. + + Causissètz ont conhar la barra d’aisinas + + Plaçatz la barra d’aisinas a portada de man. Daissatz-la enbàs o ennaut. Navegatz d’un biais privat Causissètz vòstre tèma + + Estalviatz la batariá e vòstra vista en activant lo mòde fosc. Automatic @@ -1301,6 +1325,8 @@ Çò que la proteccion contra lo seguiment estandarda bloca Estricte + + Bloca mai de traçadors, accelèra la cargament de las paginas mas d’unas pòdon quitar de foncionar. Çò que la proteccion contra lo seguiment estricta bloca @@ -1559,6 +1585,8 @@ Gerir las cartas enregistradas Apondre una carta + + Modificar la carta Numèro de carta @@ -1567,6 +1595,8 @@ Titular Nom de la carta + + Suprimir la carta Suprimir la carta @@ -1739,6 +1769,9 @@ Anullar + + Causir de dobrir los sites web, los corrièls e messatges automaticament dins Firefox. + Suprimir diff --git a/app/src/main/res/values-te/strings.xml b/app/src/main/res/values-te/strings.xml index 9f0c900ea..362b58e2c 100644 --- a/app/src/main/res/values-te/strings.xml +++ b/app/src/main/res/values-te/strings.xml @@ -209,6 +209,9 @@ ఇంకా తెలుసుకోండి + + %s‌లో వెతకండి + ఒక కొత్త Firefox ట్యాబును తెరువండి @@ -886,15 +889,21 @@ అచేతనం ఆడియో, వీడియోలను అనుమతించు + + ఆడియో, వీడియోలను అనుమతించు ఆడియో, వీడియోలను సెల్యులార్ డేటాని వాడుతున్నప్పుడు మాత్రమే నిరోధించు ఆడియో, వీడియోలు వై-ఫైలో ఉన్నప్పుడు మాత్రమే ఆడతాయి ఆడియోను మాత్రమే నిరోధించు + + ఆడియోను మాత్రమే నిరోధించు ఆడియో, వీడియోలను నిరోధించు + + ఆడియో, వీడియోలను నిరోధించు చేతనం @@ -1181,6 +1190,8 @@ కఠినం (సిఫార్సు చేయబడింది) కఠినం + + పనిముట్లపట్టీ ఎక్కడ ఉండాలో ఎంచుకోండి అంతరంగికంగా విహరించండి మీ అలంకారాన్ని ఎంచుకోండి + + చీకటి రీతితో కొంచెం బ్యాటరీని, మీ కంటిచూపుని ఆదాచేసుకోండి. ఆటోమెటిక్ @@ -1505,8 +1518,17 @@ క్రెడిట్ కార్డులు + + కార్డులను భద్రపరుచు, స్వయంచాలకంగా పూరించు + + డేటా గుప్తీకరించబడుతుంది + + + కార్డులను పరికరాల మధ్య సింక్రనించు క్రెడిట్ కార్డును చేర్చు + + భద్రపరచిన కార్డుల నిర్వహణ కార్డును చేర్చు diff --git a/app/src/main/res/values-tt/strings.xml b/app/src/main/res/values-tt/strings.xml index 790303dce..2d35a0054 100644 --- a/app/src/main/res/values-tt/strings.xml +++ b/app/src/main/res/values-tt/strings.xml @@ -288,6 +288,8 @@ Кыстыргычларны, тарихны һәм башкаларны Firefox Хисабыгыз белән синхронлау Firefox хисап язмасы + + Синхронлауны дәвам итү өчен яңадан тоташыгыз Тел @@ -371,6 +373,10 @@ Җиһаз исеме буш була алмый. Синхронлау... + + Синхронлау барып чыкмады. Соңгы синхронлау: %s + + Синхронлау барып чыкмады. Соңгы синхронлау: һичкайчан Соңгы синхронлау: %s @@ -443,6 +449,10 @@ Җиһаз темасына иярү + + + Яңарту өчен тартыгыз + Сессияләр @@ -474,6 +484,8 @@ Эзләү Көйләүләр + + Тарих элементы менюсы Ябу @@ -494,6 +506,8 @@ Таблар + + Таб күренеше Исемлек @@ -559,6 +573,8 @@ Яңа таб Баш биткә кайту + + Таб режимын алыштыру Кыстыргыч @@ -593,6 +609,8 @@ Саклау Уртаклашу + + Агымдагы сессия рәсеме Җыентыкка саклау @@ -638,6 +656,9 @@ %1$d сайланды + + %1$d элементны бетерү Бүген @@ -697,6 +718,8 @@ Папка сайлау Папка бетерүне раслыйсызмы? + + %s сайланган элементларны бетерәчәк. %1$s бетерелде @@ -884,8 +907,14 @@ Синхронлауга керү Барлык җиһазларга җибәрү + + Синхронлауга яңадан тоташу + + Офлайн Башка җиһазны тоташтыру + + Табны җибәрү өчен, кимендә тагын бер башка җиһаздан Firefox-ка керегез. Аңладым @@ -995,6 +1024,10 @@ Чыгу + + Бу сезнең барлык гизү мәгълүматларыгызны да бетерәчәк. + + %s сайланган гизү мәгълүматларын бетерәчәк. Баш тарту @@ -1005,6 +1038,9 @@ Гизү мәгълүматларын бетерү… + + + Firefox Preview хәзер Firefox Nightly дип атала Android Beta өчен Firefox алу @@ -1058,6 +1094,9 @@ Ябу + + Гизүне башлау + Теманы сайлау @@ -1078,6 +1117,12 @@ КАБАТЛАУ Кодны сканерлау + + Сканерлауга әзер + + Камерагыз ярдәмендә керегез + + Моның урынына эл. почта кулланыгыз Өзү @@ -1099,6 +1144,8 @@ Кукилар + + Каралмаган сайтлардан булган кукилар Барлык табларда @@ -1128,6 +1175,8 @@ Техник ярдәм + + Өзеклеклер Хосусыйлык аңлатмасы @@ -1394,4 +1443,7 @@ Бетерү + + Күбрәк белү өчен басыгыз + From 00744fa9e59044e6e4f7e6f042212557a6fd88df Mon Sep 17 00:00:00 2001 From: mcarare Date: Mon, 19 Apr 2021 15:59:11 +0300 Subject: [PATCH 018/256] For #18267: Updates preferences visibility depending on creditCardsStore --- .../creditcards/CreditCardsSettingFragment.kt | 79 +++++++++++++++++++ .../main/res/xml/credit_cards_preferences.xml | 2 + .../CreditCardsSettingFragmentTest.kt | 69 ++++++++++++++++ 3 files changed, 150 insertions(+) create mode 100644 app/src/test/java/org/mozilla/fenix/settings/creditcards/CreditCardsSettingFragmentTest.kt diff --git a/app/src/main/java/org/mozilla/fenix/settings/creditcards/CreditCardsSettingFragment.kt b/app/src/main/java/org/mozilla/fenix/settings/creditcards/CreditCardsSettingFragment.kt index bcb197137..d8896b0b9 100644 --- a/app/src/main/java/org/mozilla/fenix/settings/creditcards/CreditCardsSettingFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/settings/creditcards/CreditCardsSettingFragment.kt @@ -5,11 +5,22 @@ package org.mozilla.fenix.settings.creditcards import android.os.Bundle +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import androidx.annotation.VisibleForTesting +import androidx.lifecycle.lifecycleScope import androidx.navigation.fragment.findNavController import androidx.preference.Preference import androidx.preference.PreferenceFragmentCompat +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.launch +import mozilla.components.concept.storage.CreditCard +import mozilla.components.lib.state.ext.consumeFrom import mozilla.components.service.fxa.SyncEngine import org.mozilla.fenix.R +import org.mozilla.fenix.components.StoreProvider import org.mozilla.fenix.ext.getPreferenceKey import org.mozilla.fenix.ext.navigateBlockingForAsyncNavGraph import org.mozilla.fenix.ext.requireComponents @@ -23,10 +34,43 @@ import org.mozilla.fenix.settings.requirePreference */ class CreditCardsSettingFragment : PreferenceFragmentCompat() { + private lateinit var creditCardsStore: CreditCardsFragmentStore + private var isCreditCardsListLoaded: Boolean = false + + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + creditCardsStore = StoreProvider.get(this) { + CreditCardsFragmentStore(CreditCardsListState(creditCards = emptyList())) + } + loadCreditCards() + } + override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { setPreferencesFromResource(R.xml.credit_cards_preferences, rootKey) } + override fun onCreateView( + inflater: LayoutInflater, + container: ViewGroup?, + savedInstanceState: Bundle? + ): View? { + loadCreditCards() + return super.onCreateView(inflater, container, savedInstanceState) + } + + @ExperimentalCoroutinesApi + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) + consumeFrom(creditCardsStore) { state -> + updateCardManagementPreferencesVisibility(state.creditCards) + } + } + + override fun onPause() { + super.onPause() + isCreditCardsListLoaded = false + } + override fun onResume() { super.onResume() @@ -74,4 +118,39 @@ class CreditCardsSettingFragment : PreferenceFragmentCompat() { return super.onPreferenceTreeClick(preference) } + + /** + * Updates preferences visibility depending on credit cards being already saved or not. + */ + @VisibleForTesting + internal fun updateCardManagementPreferencesVisibility(creditCardsList: List) { + val hasCreditCards = creditCardsList.isNotEmpty() + + val manageSavedCardsPreference = + requirePreference(R.string.pref_key_credit_cards_manage_saved_cards) + val addCreditCardsPreference = + requirePreference(R.string.pref_key_credit_cards_add_credit_card) + + manageSavedCardsPreference.isVisible = hasCreditCards + addCreditCardsPreference.isVisible = !hasCreditCards + } + + /** + * Fetches all the credit cards from autofillStorage and updates the [CreditCardsListState] + * with the list of credit cards. + */ + private fun loadCreditCards() { + if (isCreditCardsListLoaded) { + return + } + + lifecycleScope.launch(Dispatchers.IO) { + val creditCards = requireComponents.core.autofillStorage.getAllCreditCards() + lifecycleScope.launch(Dispatchers.Main) { + creditCardsStore.dispatch(CreditCardsAction.UpdateCreditCards(creditCards)) + } + } + + isCreditCardsListLoaded = true + } } diff --git a/app/src/main/res/xml/credit_cards_preferences.xml b/app/src/main/res/xml/credit_cards_preferences.xml index 21b58a5c2..64efeb6f3 100644 --- a/app/src/main/res/xml/credit_cards_preferences.xml +++ b/app/src/main/res/xml/credit_cards_preferences.xml @@ -17,9 +17,11 @@ android:icon="@drawable/ic_new" android:key="@string/pref_key_credit_cards_add_credit_card" android:title="@string/preferences_credit_cards_add_credit_card" + app:isPreferenceVisible="false" app:allowDividerAbove="true" /> diff --git a/app/src/test/java/org/mozilla/fenix/settings/creditcards/CreditCardsSettingFragmentTest.kt b/app/src/test/java/org/mozilla/fenix/settings/creditcards/CreditCardsSettingFragmentTest.kt new file mode 100644 index 000000000..e5f87631b --- /dev/null +++ b/app/src/test/java/org/mozilla/fenix/settings/creditcards/CreditCardsSettingFragmentTest.kt @@ -0,0 +1,69 @@ +/* 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/. */ + +package org.mozilla.fenix.settings.creditcards + +import androidx.fragment.app.FragmentActivity +import androidx.preference.Preference +import io.mockk.mockk +import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.test.TestCoroutineDispatcher +import mozilla.components.concept.storage.CreditCard +import org.junit.Assert.assertTrue +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.mozilla.fenix.R +import org.mozilla.fenix.ext.getPreferenceKey +import org.mozilla.fenix.helpers.FenixRobolectricTestRunner +import org.robolectric.Robolectric + +@ExperimentalCoroutinesApi +@RunWith(FenixRobolectricTestRunner::class) +class CreditCardsSettingFragmentTest { + + private val testDispatcher = TestCoroutineDispatcher() + private lateinit var creditCardsSettingFragment: CreditCardsSettingFragment + + @Before + fun setUp() { + creditCardsSettingFragment = CreditCardsSettingFragment() + val activity = Robolectric.buildActivity(FragmentActivity::class.java).create().get() + + activity.supportFragmentManager.beginTransaction() + .add(creditCardsSettingFragment, "CreditCardsSettingFragmentTest") + .commitNow() + testDispatcher.advanceUntilIdle() + } + + @Test + fun `GIVEN the list of credit cards is not empty, WHEN fragment is displayed THEN the manage credit cards pref is visible`() { + val manageSavedCardsPreference = creditCardsSettingFragment.findPreference( + creditCardsSettingFragment.getPreferenceKey(R.string.pref_key_credit_cards_manage_saved_cards) + ) + + val creditCards: List = listOf(mockk(), mockk()) + + val creditCardsState = CreditCardsListState(creditCards = creditCards) + val creditCardsStore = CreditCardsFragmentStore(creditCardsState) + + creditCardsSettingFragment.updateCardManagementPreferencesVisibility(creditCardsStore.state.creditCards) + + assertTrue(manageSavedCardsPreference!!.isVisible) + } + + @Test + fun `GIVEN the list of credit cards is empty, WHEN fragment is displayed THEN the add credit card pref is visible`() { + val addCreditCardsPreference = creditCardsSettingFragment.findPreference( + creditCardsSettingFragment.getPreferenceKey(R.string.pref_key_credit_cards_add_credit_card) + ) + + val creditCardsState = CreditCardsListState(creditCards = emptyList()) + val creditCardsStore = CreditCardsFragmentStore(creditCardsState) + + creditCardsSettingFragment.updateCardManagementPreferencesVisibility(creditCardsStore.state.creditCards) + + assertTrue(addCreditCardsPreference!!.isVisible) + } +} From cf4847dc174e2112bf3053b76899d684e1c6832d Mon Sep 17 00:00:00 2001 From: Sebastian Kaspari Date: Wed, 21 Apr 2021 15:14:50 +0200 Subject: [PATCH 019/256] Remove browser-search references. --- app/build.gradle | 1 - .../java/org/mozilla/fenix/HomeActivity.kt | 5 ++--- .../org/mozilla/fenix/components/UseCases.kt | 2 -- .../components/metrics/GleanMetricsService.kt | 4 ++-- .../components/search/SearchMigration.kt | 12 +++++----- .../fenix/search/awesomebar/AwesomeBarView.kt | 22 ++++++------------- buildSrc/src/main/java/AndroidComponents.kt | 2 +- buildSrc/src/main/java/Dependencies.kt | 1 - 8 files changed, 17 insertions(+), 32 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index de84bf761..c4e577481 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -442,7 +442,6 @@ dependencies { implementation Deps.mozilla_browser_icons implementation Deps.mozilla_browser_menu implementation Deps.mozilla_browser_menu2 - implementation Deps.mozilla_browser_search implementation Deps.mozilla_browser_session implementation Deps.mozilla_browser_session_storage implementation Deps.mozilla_browser_state diff --git a/app/src/main/java/org/mozilla/fenix/HomeActivity.kt b/app/src/main/java/org/mozilla/fenix/HomeActivity.kt index 0c610d2b6..6abc90fad 100644 --- a/app/src/main/java/org/mozilla/fenix/HomeActivity.kt +++ b/app/src/main/java/org/mozilla/fenix/HomeActivity.kt @@ -52,7 +52,6 @@ import mozilla.components.concept.storage.BookmarkNodeType import mozilla.components.feature.contextmenu.DefaultSelectionActionDelegate import mozilla.components.feature.privatemode.notification.PrivateNotificationFeature import mozilla.components.feature.search.BrowserStoreSearchAdapter -import mozilla.components.feature.search.ext.legacy import mozilla.components.service.fxa.sync.SyncReason import mozilla.components.support.base.feature.ActivityResultHandler import mozilla.components.support.base.feature.UserInteractionHandler @@ -855,10 +854,10 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity { SessionState.Source.USER_ENTERED, true, mode.isPrivate, - searchEngine = engine.legacy() + searchEngine = engine ) } else { - components.useCases.searchUseCases.defaultSearch.invoke(searchTermOrURL, engine.legacy()) + components.useCases.searchUseCases.defaultSearch.invoke(searchTermOrURL, engine) } } diff --git a/app/src/main/java/org/mozilla/fenix/components/UseCases.kt b/app/src/main/java/org/mozilla/fenix/components/UseCases.kt index bd9a4fb21..849a3a973 100644 --- a/app/src/main/java/org/mozilla/fenix/components/UseCases.kt +++ b/app/src/main/java/org/mozilla/fenix/components/UseCases.kt @@ -15,7 +15,6 @@ import mozilla.components.feature.downloads.DownloadsUseCases import mozilla.components.feature.pwa.WebAppShortcutManager import mozilla.components.feature.pwa.WebAppUseCases import mozilla.components.feature.search.SearchUseCases -import mozilla.components.feature.search.ext.toDefaultSearchEngineProvider import mozilla.components.feature.session.SessionUseCases import mozilla.components.feature.session.SettingsUseCases import mozilla.components.feature.session.TrackingProtectionUseCases @@ -66,7 +65,6 @@ class UseCases( val searchUseCases by lazyMonitored { SearchUseCases( store, - store.toDefaultSearchEngineProvider(), tabsUseCases ) } diff --git a/app/src/main/java/org/mozilla/fenix/components/metrics/GleanMetricsService.kt b/app/src/main/java/org/mozilla/fenix/components/metrics/GleanMetricsService.kt index 7eb8ee48b..23a36fade 100644 --- a/app/src/main/java/org/mozilla/fenix/components/metrics/GleanMetricsService.kt +++ b/app/src/main/java/org/mozilla/fenix/components/metrics/GleanMetricsService.kt @@ -6,7 +6,7 @@ package org.mozilla.fenix.components.metrics import android.content.Context import mozilla.components.browser.state.store.BrowserStore -import mozilla.components.feature.search.ext.legacy +import mozilla.components.feature.search.ext.buildSearchUrl import mozilla.components.feature.search.ext.waitForSelectedOrDefaultSearchEngine import mozilla.components.service.fxa.manager.SyncEnginesStorage import mozilla.components.service.glean.Glean @@ -971,7 +971,7 @@ class GleanMetricsService( SearchDefaultEngine.apply { code.set(searchEngine.id) name.set(searchEngine.name) - submissionUrl.set(searchEngine.legacy().buildSearchUrl("")) + submissionUrl.set(searchEngine.buildSearchUrl("")) } } diff --git a/app/src/main/java/org/mozilla/fenix/components/search/SearchMigration.kt b/app/src/main/java/org/mozilla/fenix/components/search/SearchMigration.kt index 9d421a82d..acd789d53 100644 --- a/app/src/main/java/org/mozilla/fenix/components/search/SearchMigration.kt +++ b/app/src/main/java/org/mozilla/fenix/components/search/SearchMigration.kt @@ -6,9 +6,8 @@ package org.mozilla.fenix.components.search import android.content.Context import android.content.SharedPreferences -import mozilla.components.browser.search.SearchEngineParser import mozilla.components.browser.state.search.SearchEngine -import mozilla.components.feature.search.ext.migrate +import mozilla.components.feature.search.ext.parseLegacySearchEngine import mozilla.components.feature.search.middleware.SearchMiddleware import org.mozilla.fenix.ext.components import org.xmlpull.v1.XmlPullParserException @@ -50,18 +49,17 @@ internal class SearchMigration( ): List { val ids = preferences.getStringSet(PREF_KEY_CUSTOM_SEARCH_ENGINES, emptySet()) ?: emptySet() - val parser = SearchEngineParser() - return ids.mapNotNull { id -> val xml = preferences.getString(id, null) - parser.loadSafely(id, xml?.byteInputStream()?.buffered()) + loadSafely(id, xml?.byteInputStream()?.buffered()) } } } -private fun SearchEngineParser.loadSafely(id: String, stream: BufferedInputStream?): SearchEngine? { +@Suppress("DEPRECATION") +private fun loadSafely(id: String, stream: BufferedInputStream?): SearchEngine? { return try { - stream?.let { load(id, it).migrate() } + stream?.let { parseLegacySearchEngine(id, it) } } catch (e: IOException) { null } catch (e: XmlPullParserException) { diff --git a/app/src/main/java/org/mozilla/fenix/search/awesomebar/AwesomeBarView.kt b/app/src/main/java/org/mozilla/fenix/search/awesomebar/AwesomeBarView.kt index da4cc0612..3966f1510 100644 --- a/app/src/main/java/org/mozilla/fenix/search/awesomebar/AwesomeBarView.kt +++ b/app/src/main/java/org/mozilla/fenix/search/awesomebar/AwesomeBarView.kt @@ -9,7 +9,6 @@ import androidx.core.graphics.BlendModeColorFilterCompat.createBlendModeColorFil import androidx.core.graphics.BlendModeCompat.SRC_IN import androidx.core.graphics.drawable.toBitmap import mozilla.components.browser.awesomebar.BrowserAwesomeBar -import mozilla.components.browser.search.DefaultSearchEngineProvider import mozilla.components.browser.state.search.SearchEngine import mozilla.components.browser.state.state.searchEngines import mozilla.components.concept.awesomebar.AwesomeBar @@ -21,8 +20,6 @@ import mozilla.components.feature.awesomebar.provider.SearchEngineSuggestionProv import mozilla.components.feature.awesomebar.provider.SearchSuggestionProvider import mozilla.components.feature.awesomebar.provider.SessionSuggestionProvider import mozilla.components.feature.search.SearchUseCases -import mozilla.components.feature.search.ext.legacy -import mozilla.components.feature.search.ext.toDefaultSearchEngineProvider import mozilla.components.feature.session.SessionUseCases import mozilla.components.feature.syncedtabs.DeviceIndicators import mozilla.components.feature.syncedtabs.SyncedTabsStorageSuggestionProvider @@ -34,7 +31,6 @@ import org.mozilla.fenix.browser.browsingmode.BrowsingMode import org.mozilla.fenix.ext.components import org.mozilla.fenix.search.SearchEngineSource import org.mozilla.fenix.search.SearchFragmentState -import mozilla.components.browser.search.SearchEngine as LegacySearchEngine /** * View that contains and configures the BrowserAwesomeBar @@ -70,7 +66,7 @@ class AwesomeBarView( private val searchUseCase = object : SearchUseCases.SearchUseCase { override fun invoke( searchTerms: String, - searchEngine: mozilla.components.browser.search.SearchEngine?, + searchEngine: SearchEngine?, parentSessionId: String? ) { interactor.onSearchTermsTapped(searchTerms) @@ -80,7 +76,7 @@ class AwesomeBarView( private val shortcutSearchUseCase = object : SearchUseCases.SearchUseCase { override fun invoke( searchTerms: String, - searchEngine: mozilla.components.browser.search.SearchEngine?, + searchEngine: SearchEngine?, parentSessionId: String? ) { interactor.onSearchTermsTapped(searchTerms) @@ -151,7 +147,7 @@ class AwesomeBarView( defaultSearchSuggestionProvider = SearchSuggestionProvider( context = activity, - defaultSearchEngineProvider = components.core.store.toDefaultSearchEngineProvider(), + store = components.core.store, searchUseCase = searchUseCase, fetchClient = components.core.client, mode = SearchSuggestionProvider.Mode.MULTIPLE_SUGGESTIONS, @@ -164,7 +160,7 @@ class AwesomeBarView( defaultSearchActionProvider = SearchActionProvider( - defaultSearchEngineProvider = components.core.store.toDefaultSearchEngineProvider(), + store = components.core.store, searchUseCase = searchUseCase, icon = searchBitmap, showDescription = false @@ -326,17 +322,13 @@ class AwesomeBarView( listOf( SearchActionProvider( - defaultSearchEngineProvider = object : DefaultSearchEngineProvider { - override fun getDefaultSearchEngine(): LegacySearchEngine? = - engine.legacy() - override suspend fun retrieveDefaultSearchEngine(): LegacySearchEngine? = - engine.legacy() - }, + searchEngine = engine, + store = components.core.store, searchUseCase = shortcutSearchUseCase, icon = searchBitmap ), SearchSuggestionProvider( - engine.legacy(), + engine, shortcutSearchUseCase, components.core.client, limit = 3, diff --git a/buildSrc/src/main/java/AndroidComponents.kt b/buildSrc/src/main/java/AndroidComponents.kt index c8ea43e48..1c41b6ff3 100644 --- a/buildSrc/src/main/java/AndroidComponents.kt +++ b/buildSrc/src/main/java/AndroidComponents.kt @@ -3,5 +3,5 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ object AndroidComponents { - const val VERSION = "90.0.20210420185510" + const val VERSION = "90.0.20210421164305" } diff --git a/buildSrc/src/main/java/Dependencies.kt b/buildSrc/src/main/java/Dependencies.kt index cd948ff06..447186f64 100644 --- a/buildSrc/src/main/java/Dependencies.kt +++ b/buildSrc/src/main/java/Dependencies.kt @@ -79,7 +79,6 @@ object Deps { const val mozilla_browser_engine_gecko = "org.mozilla.components:browser-engine-gecko:${Versions.mozilla_android_components}" const val mozilla_browser_domains = "org.mozilla.components:browser-domains:${Versions.mozilla_android_components}" const val mozilla_browser_icons = "org.mozilla.components:browser-icons:${Versions.mozilla_android_components}" - const val mozilla_browser_search = "org.mozilla.components:browser-search:${Versions.mozilla_android_components}" const val mozilla_browser_session = "org.mozilla.components:browser-session:${Versions.mozilla_android_components}" const val mozilla_browser_session_storage = "org.mozilla.components:browser-session-storage:${Versions.mozilla_android_components}" const val mozilla_browser_state = "org.mozilla.components:browser-state:${Versions.mozilla_android_components}" From 46784ecbfb4c59bccf978314a02f580e39e92b23 Mon Sep 17 00:00:00 2001 From: mcarare Date: Thu, 22 Apr 2021 16:03:02 +0300 Subject: [PATCH 020/256] For #19180: Fix tab counter not entirely visible on RTL layout. --- app/src/main/res/layout/tabs_tray_tab_counter2.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/layout/tabs_tray_tab_counter2.xml b/app/src/main/res/layout/tabs_tray_tab_counter2.xml index 25036e94f..6c5a6832b 100644 --- a/app/src/main/res/layout/tabs_tray_tab_counter2.xml +++ b/app/src/main/res/layout/tabs_tray_tab_counter2.xml @@ -5,7 +5,7 @@ From 3b3e4c024388df1a8452dcd875440c221102612a Mon Sep 17 00:00:00 2001 From: Gabriel Luong Date: Thu, 22 Apr 2021 10:37:34 -0400 Subject: [PATCH 021/256] No issue - Replace local photon colors with ui-colors (#19167) --- .../res/layout/layout_percentage_seek_bar.xml | 2 +- app/src/main/res/values-night/colors.xml | 2 +- app/src/main/res/values/colors.xml | 20 ++++++------------- 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/app/src/main/res/layout/layout_percentage_seek_bar.xml b/app/src/main/res/layout/layout_percentage_seek_bar.xml index 12db43e26..64a611065 100644 --- a/app/src/main/res/layout/layout_percentage_seek_bar.xml +++ b/app/src/main/res/layout/layout_percentage_seek_bar.xml @@ -66,7 +66,7 @@ #3A3944 #5B5B66 @color/photonViolet50 - @color/dark_grey_90 + @color/photonDarkGrey90 @color/synced_tabs_separator_dark_theme diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 0809ebebf..da6322747 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -3,14 +3,6 @@ - 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/. --> - - #7A312A65 - #529059FF - #7A9059FF - #1F592ACB - #15141A - #E7DFFF - #20123A @color/photonGrey50 @@ -34,7 +26,7 @@ #FF15141A #0015141A @color/photonLightGrey30 - @color/dark_grey_90 + @color/photonDarkGrey90 #7542E5 #0250BB #E31587 @@ -75,11 +67,11 @@ #ffffff #312A65 @color/photonInk20 - @color/ink_20_48a + @color/photonInk20A48 @color/accent_normal_theme @color/photonLightGrey10 @color/photonLightGrey60 - @color/violet_70_12a + @color/photonViolet70A12 @color/tab_tray_item_selected_background_light_theme @@ -148,7 +140,7 @@ @color/photonLightGrey05 @color/photonDarkGrey50 @color/photonDarkGrey05 - @color/violet_50_32a + @color/photonViolet50A32 @color/tab_tray_item_selected_background_dark_theme @@ -207,7 +199,7 @@ @color/photonDarkGrey10 #9059FF @color/photonViolet50 - @color/violet_50_48a + @color/photonViolet50A48 @color/tab_tray_item_selected_background_dark_theme @@ -350,7 +342,7 @@ @color/photonGrey10 - @color/dark_grey_90 + @color/photonDarkGrey90 @color/photonLightGrey05 @color/photonLightGrey05 @color/toggle_off_knob_light_theme From ded686d5337f2f69e0dc3fd2fc8a2151937d5b5f Mon Sep 17 00:00:00 2001 From: mcarare Date: Tue, 20 Apr 2021 13:57:00 +0300 Subject: [PATCH 022/256] For #19125: Move top site pin net to title. --- .../topsites/TopSiteItemViewHolder.kt | 7 ++--- app/src/main/res/drawable/ic_new_pin.xml | 13 +++++++++ app/src/main/res/layout/top_site_item.xml | 27 ++++--------------- app/src/main/res/values-night/colors.xml | 2 +- app/src/main/res/values/colors.xml | 2 +- .../topsites/TopSiteItemViewHolderTest.kt | 25 +++++++++-------- 6 files changed, 36 insertions(+), 40 deletions(-) create mode 100644 app/src/main/res/drawable/ic_new_pin.xml diff --git a/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/viewholders/topsites/TopSiteItemViewHolder.kt b/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/viewholders/topsites/TopSiteItemViewHolder.kt index 5ee55eb98..e337a2b4b 100644 --- a/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/viewholders/topsites/TopSiteItemViewHolder.kt +++ b/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/viewholders/topsites/TopSiteItemViewHolder.kt @@ -64,10 +64,11 @@ class TopSiteItemViewHolder( fun bind(topSite: TopSite) { top_site_title.text = topSite.title - pin_indicator.visibility = if (topSite.type == PINNED || topSite.type == DEFAULT) { - View.VISIBLE + if (topSite.type == PINNED || topSite.type == DEFAULT) { + val pinIndicator = getDrawable(itemView.context, R.drawable.ic_new_pin) + top_site_title.setCompoundDrawablesWithIntrinsicBounds(pinIndicator, null, null, null) } else { - View.GONE + top_site_title.setCompoundDrawablesWithIntrinsicBounds(null, null, null, null) } when (topSite.url) { diff --git a/app/src/main/res/drawable/ic_new_pin.xml b/app/src/main/res/drawable/ic_new_pin.xml new file mode 100644 index 000000000..15940a2a2 --- /dev/null +++ b/app/src/main/res/drawable/ic_new_pin.xml @@ -0,0 +1,13 @@ + + + + + diff --git a/app/src/main/res/layout/top_site_item.xml b/app/src/main/res/layout/top_site_item.xml index f02af96fd..65675bb34 100644 --- a/app/src/main/res/layout/top_site_item.xml +++ b/app/src/main/res/layout/top_site_item.xml @@ -23,37 +23,20 @@ - - - - - + tools:ignore="RtlCompat,SmallSp" /> diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml index 48ef9fdc8..15fbe257e 100644 --- a/app/src/main/res/values-night/colors.xml +++ b/app/src/main/res/values-night/colors.xml @@ -80,7 +80,7 @@ @color/top_site_title_text_dark_theme #3A3944 #5B5B66 - @color/photonViolet50 + @color/foundation_light_theme @color/photonDarkGrey90 diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index da6322747..2e92a20e5 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -277,7 +277,7 @@ @color/top_site_title_text_light_theme @color/photonLightGrey30 @color/photonLightGrey50 - @color/photonInk20 + @color/foundation_dark_theme @color/photonLightGrey30 diff --git a/app/src/test/java/org/mozilla/fenix/home/sessioncontrol/viewholders/topsites/TopSiteItemViewHolderTest.kt b/app/src/test/java/org/mozilla/fenix/home/sessioncontrol/viewholders/topsites/TopSiteItemViewHolderTest.kt index 02b5f5a6c..2b2154fd3 100644 --- a/app/src/test/java/org/mozilla/fenix/home/sessioncontrol/viewholders/topsites/TopSiteItemViewHolderTest.kt +++ b/app/src/test/java/org/mozilla/fenix/home/sessioncontrol/viewholders/topsites/TopSiteItemViewHolderTest.kt @@ -6,15 +6,14 @@ package org.mozilla.fenix.home.sessioncontrol.viewholders.topsites import android.view.LayoutInflater import android.view.View -import android.widget.FrameLayout -import androidx.core.view.isVisible +import android.widget.TextView import io.mockk.mockk import io.mockk.verify import kotlinx.android.synthetic.main.top_site_item.view.* import mozilla.components.feature.top.sites.TopSite import mozilla.components.support.test.robolectric.testContext -import org.junit.Assert.assertFalse -import org.junit.Assert.assertTrue +import org.junit.Assert.assertNotNull +import org.junit.Assert.assertNull import org.junit.Before import org.junit.Test import org.junit.runner.RunWith @@ -59,7 +58,7 @@ class TopSiteItemViewHolderTest { } @Test - fun `pin indicator is visible for default top sites`() { + fun `GIVEN a default top site WHEN bind is called THEN the title has a pin indicator`() { val defaultTopSite = TopSite( id = 1L, title = "Pocket", @@ -69,13 +68,13 @@ class TopSiteItemViewHolderTest { ) TopSiteItemViewHolder(view, interactor).bind(defaultTopSite) - val pinIndicator = view.findViewById(R.id.pin_indicator) + val pinIndicator = view.findViewById(R.id.top_site_title).compoundDrawables[0] - assertTrue(pinIndicator.isVisible) + assertNotNull(pinIndicator) } @Test - fun `pin indicator is visible for pinned top sites`() { + fun `GIVEN a pinned top site WHEN bind is called THEN the title has a pin indicator`() { val pinnedTopSite = TopSite( id = 1L, title = "Mozilla", @@ -85,13 +84,13 @@ class TopSiteItemViewHolderTest { ) TopSiteItemViewHolder(view, interactor).bind(pinnedTopSite) - val pinIndicator = view.findViewById(R.id.pin_indicator) + val pinIndicator = view.findViewById(R.id.top_site_title).compoundDrawables[0] - assertTrue(pinIndicator.isVisible) + assertNotNull(pinIndicator) } @Test - fun `pin indicator is not visible for frecent top sites`() { + fun `GIVEN a frecent top site WHEN bind is called THEN the title does not have a pin indicator`() { val frecentTopSite = TopSite( id = 1L, title = "Mozilla", @@ -101,8 +100,8 @@ class TopSiteItemViewHolderTest { ) TopSiteItemViewHolder(view, interactor).bind(frecentTopSite) - val pinIndicator = view.findViewById(R.id.pin_indicator) + val pinIndicator = view.findViewById(R.id.top_site_title).compoundDrawables[0] - assertFalse(pinIndicator.isVisible) + assertNull(pinIndicator) } } From cd37f398f1edcc9186061e70446968f24e2551ad Mon Sep 17 00:00:00 2001 From: Roger Yang Date: Thu, 22 Apr 2021 12:48:10 -0400 Subject: [PATCH 023/256] Closes #18816: Disable TabsTray FAB on accessibility enabled (#19170) --- .../tabstray/AccessibleNewTabButtonBinding.kt | 104 +++++++++++ .../tabstray/FloatingActionButtonBinding.kt | 31 +++- .../fenix/tabstray/TabsTrayFragment.kt | 17 +- .../res/layout/component_tabstray_fab.xml | 1 + .../AccessibleNewTabButtonBindingTest.kt | 140 +++++++++++++++ .../FloatingActionButtonBindingTest.kt | 170 ++++++++++++++++++ 6 files changed, 454 insertions(+), 9 deletions(-) create mode 100644 app/src/main/java/org/mozilla/fenix/tabstray/AccessibleNewTabButtonBinding.kt create mode 100644 app/src/test/java/org/mozilla/fenix/tabstray/AccessibleNewTabButtonBindingTest.kt create mode 100644 app/src/test/java/org/mozilla/fenix/tabstray/FloatingActionButtonBindingTest.kt diff --git a/app/src/main/java/org/mozilla/fenix/tabstray/AccessibleNewTabButtonBinding.kt b/app/src/main/java/org/mozilla/fenix/tabstray/AccessibleNewTabButtonBinding.kt new file mode 100644 index 000000000..bf33a4fe2 --- /dev/null +++ b/app/src/main/java/org/mozilla/fenix/tabstray/AccessibleNewTabButtonBinding.kt @@ -0,0 +1,104 @@ +/* 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/. */ + +package org.mozilla.fenix.tabstray + +import android.view.View +import android.widget.ImageButton +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.cancel +import kotlinx.coroutines.flow.collect +import kotlinx.coroutines.flow.map +import mozilla.components.lib.state.ext.flowScoped +import mozilla.components.support.base.feature.LifecycleAwareFeature +import mozilla.components.support.ktx.kotlinx.coroutines.flow.ifAnyChanged +import org.mozilla.fenix.R +import org.mozilla.fenix.tabstray.browser.BrowserTrayInteractor +import org.mozilla.fenix.tabstray.syncedtabs.SyncedTabsInteractor +import org.mozilla.fenix.utils.Settings + +/** + * Do not show accessible new tab button when accessibility service is disabled + * + * This binding is coupled with [FloatingActionButtonBinding]. + * When [FloatingActionButtonBinding] is visible this should not be visible + */ +class AccessibleNewTabButtonBinding( + private val store: TabsTrayStore, + private val settings: Settings, + private val newTabButton: ImageButton, + private val browserTrayInteractor: BrowserTrayInteractor, + private val syncedTabsInteractor: SyncedTabsInteractor +) : LifecycleAwareFeature { + + private var scope: CoroutineScope? = null + + @OptIn(ExperimentalCoroutinesApi::class) + override fun start() { + if (!settings.accessibilityServicesEnabled) { + newTabButton.visibility = View.GONE + return + } + + scope = store.flowScoped { flow -> + flow.map { it } + .ifAnyChanged { state -> + arrayOf( + state.selectedPage, + state.syncing + ) + } + .collect { state -> + setAccessibleNewTabButton(state.selectedPage, state.syncing) + } + } + } + + override fun stop() { + scope?.cancel() + } + + private fun setAccessibleNewTabButton(selectedPage: Page, syncing: Boolean) { + when (selectedPage) { + Page.NormalTabs -> { + newTabButton.apply { + visibility = View.VISIBLE + setImageResource(R.drawable.ic_new) + setOnClickListener { + browserTrayInteractor.onFabClicked(false) + } + } + } + Page.PrivateTabs -> { + newTabButton.apply { + visibility = View.VISIBLE + setImageResource(R.drawable.ic_new) + setOnClickListener { + browserTrayInteractor.onFabClicked(true) + } + } + } + Page.SyncedTabs -> { + newTabButton.apply { + visibility = + when (syncing) { + true -> View.GONE + false -> View.VISIBLE + } + + setImageResource(R.drawable.ic_fab_sync) + setOnClickListener { + // Notify the store observers (one of which is the SyncedTabsFeature), that + // a sync was requested. + if (!syncing) { + store.dispatch(TabsTrayAction.SyncNow) + syncedTabsInteractor.onRefresh() + } + } + } + } + } + } +} diff --git a/app/src/main/java/org/mozilla/fenix/tabstray/FloatingActionButtonBinding.kt b/app/src/main/java/org/mozilla/fenix/tabstray/FloatingActionButtonBinding.kt index d212dbe05..b3f82ffbc 100644 --- a/app/src/main/java/org/mozilla/fenix/tabstray/FloatingActionButtonBinding.kt +++ b/app/src/main/java/org/mozilla/fenix/tabstray/FloatingActionButtonBinding.kt @@ -4,7 +4,6 @@ package org.mozilla.fenix.tabstray -import androidx.appcompat.content.res.AppCompatResources import com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.ExperimentalCoroutinesApi @@ -17,9 +16,17 @@ import mozilla.components.support.ktx.kotlinx.coroutines.flow.ifAnyChanged import org.mozilla.fenix.R import org.mozilla.fenix.tabstray.browser.BrowserTrayInteractor import org.mozilla.fenix.tabstray.syncedtabs.SyncedTabsInteractor +import org.mozilla.fenix.utils.Settings +/** + * Do not show fab when accessibility service is enabled + * + * This binding is coupled with [AccessibleNewTabButtonBinding]. + * When [AccessibleNewTabButtonBinding] is visible this should not be visible + */ class FloatingActionButtonBinding( private val store: TabsTrayStore, + private val settings: Settings, private val actionButton: ExtendedFloatingActionButton, private val browserTrayInteractor: BrowserTrayInteractor, private val syncedTabsInteractor: SyncedTabsInteractor @@ -29,7 +36,11 @@ class FloatingActionButtonBinding( @OptIn(ExperimentalCoroutinesApi::class) override fun start() { - setFab(store.state.selectedPage, store.state.syncing) + if (settings.accessibilityServicesEnabled) { + actionButton.hide() + return + } + scope = store.flowScoped { flow -> flow.map { it } .ifAnyChanged { state -> @@ -54,7 +65,7 @@ class FloatingActionButtonBinding( actionButton.apply { shrink() show() - icon = AppCompatResources.getDrawable(context, R.drawable.ic_new) + setIconResource(R.drawable.ic_new) setOnClickListener { browserTrayInteractor.onFabClicked(false) } @@ -62,10 +73,10 @@ class FloatingActionButtonBinding( } Page.PrivateTabs -> { actionButton.apply { - text = context.getText(R.string.tab_drawer_fab_content) + setText(R.string.tab_drawer_fab_content) extend() show() - icon = AppCompatResources.getDrawable(context, R.drawable.ic_new) + setIconResource(R.drawable.ic_new) setOnClickListener { browserTrayInteractor.onFabClicked(true) } @@ -73,11 +84,15 @@ class FloatingActionButtonBinding( } Page.SyncedTabs -> { actionButton.apply { - text = if (syncing) context.getText(R.string.sync_syncing_in_progress) - else context.getText(R.string.tab_drawer_fab_sync) + setText( + when (syncing) { + true -> R.string.sync_syncing_in_progress + false -> R.string.tab_drawer_fab_sync + } + ) extend() show() - icon = AppCompatResources.getDrawable(context, R.drawable.ic_fab_sync) + setIconResource(R.drawable.ic_fab_sync) setOnClickListener { // Notify the store observers (one of which is the SyncedTabsFeature), that // a sync was requested. diff --git a/app/src/main/java/org/mozilla/fenix/tabstray/TabsTrayFragment.kt b/app/src/main/java/org/mozilla/fenix/tabstray/TabsTrayFragment.kt index e7dceb362..f15754ecc 100644 --- a/app/src/main/java/org/mozilla/fenix/tabstray/TabsTrayFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/tabstray/TabsTrayFragment.kt @@ -12,6 +12,7 @@ import android.view.View import android.view.ViewGroup import androidx.appcompat.app.AppCompatDialogFragment import androidx.constraintlayout.widget.ConstraintLayout +import androidx.core.view.isVisible import androidx.fragment.app.activityViewModels import androidx.lifecycle.lifecycleScope import androidx.navigation.fragment.findNavController @@ -68,6 +69,7 @@ class TabsTrayFragment : AppCompatDialogFragment(), TabsTrayInteractor { private val tabLayoutMediator = ViewBoundFeatureWrapper() private val tabCounterBinding = ViewBoundFeatureWrapper() private val floatingActionButtonBinding = ViewBoundFeatureWrapper() + private val newTabButtonBinding = ViewBoundFeatureWrapper() private val selectionBannerBinding = ViewBoundFeatureWrapper() private val selectionHandleBinding = ViewBoundFeatureWrapper() private val tabsTrayCtaBinding = ViewBoundFeatureWrapper() @@ -211,6 +213,7 @@ class TabsTrayFragment : AppCompatDialogFragment(), TabsTrayInteractor { floatingActionButtonBinding.set( feature = FloatingActionButtonBinding( store = tabsTrayStore, + settings = requireComponents.settings, actionButton = new_tab_button, browserTrayInteractor = browserTrayInteractor, syncedTabsInteractor = syncedTabsTrayInteractor @@ -219,6 +222,18 @@ class TabsTrayFragment : AppCompatDialogFragment(), TabsTrayInteractor { view = view ) + newTabButtonBinding.set( + feature = AccessibleNewTabButtonBinding( + store = tabsTrayStore, + settings = requireComponents.settings, + newTabButton = tab_tray_new_tab, + browserTrayInteractor = browserTrayInteractor, + syncedTabsInteractor = syncedTabsTrayInteractor + ), + owner = this, + view = view + ) + selectionBannerBinding.set( feature = SelectionBannerBinding( context = requireContext(), @@ -312,7 +327,7 @@ class TabsTrayFragment : AppCompatDialogFragment(), TabsTrayInteractor { }, operation = { }, elevation = ELEVATION, - anchorView = new_tab_button + anchorView = if (new_tab_button.isVisible) new_tab_button else null ) } diff --git a/app/src/main/res/layout/component_tabstray_fab.xml b/app/src/main/res/layout/component_tabstray_fab.xml index 6a6fbfcf0..ce63c8aa6 100644 --- a/app/src/main/res/layout/component_tabstray_fab.xml +++ b/app/src/main/res/layout/component_tabstray_fab.xml @@ -17,6 +17,7 @@ android:elevation="99dp" android:text="@string/tab_drawer_fab_content" android:textColor="@color/photonWhite" + android:visibility="gone" app:elevation="99dp" app:borderWidth="0dp" app:icon="@drawable/ic_new" diff --git a/app/src/test/java/org/mozilla/fenix/tabstray/AccessibleNewTabButtonBindingTest.kt b/app/src/test/java/org/mozilla/fenix/tabstray/AccessibleNewTabButtonBindingTest.kt new file mode 100644 index 000000000..df91bd25c --- /dev/null +++ b/app/src/test/java/org/mozilla/fenix/tabstray/AccessibleNewTabButtonBindingTest.kt @@ -0,0 +1,140 @@ +/* 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/. */ + +package org.mozilla.fenix.tabstray + +import android.view.View +import android.widget.ImageButton +import androidx.appcompat.content.res.AppCompatResources +import io.mockk.every +import io.mockk.mockk +import io.mockk.mockkStatic +import io.mockk.verify +import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.test.TestCoroutineDispatcher +import mozilla.components.support.test.libstate.ext.waitUntilIdle +import mozilla.components.support.test.rule.MainCoroutineRule +import org.junit.Before +import org.junit.Rule +import org.junit.Test +import org.mozilla.fenix.R +import org.mozilla.fenix.tabstray.browser.BrowserTrayInteractor +import org.mozilla.fenix.tabstray.syncedtabs.SyncedTabsInteractor +import org.mozilla.fenix.utils.Settings + +class AccessibleNewTabButtonBindingTest { + + @OptIn(ExperimentalCoroutinesApi::class) + @get:Rule + val coroutinesTestRule = MainCoroutineRule(TestCoroutineDispatcher()) + + private val settings: Settings = mockk(relaxed = true) + private val newTabButton: ImageButton = mockk(relaxed = true) + private val browserTrayInteractor: BrowserTrayInteractor = mockk(relaxed = true) + private val syncedTabsInteractor: SyncedTabsInteractor = mockk(relaxed = true) + + @Before + fun setup() { + mockkStatic(AppCompatResources::class) + every { AppCompatResources.getDrawable(any(), any()) } returns mockk(relaxed = true) + } + + @Test + fun `WHEN tab selected page is normal tab THEN new tab button is visible`() { + val tabsTrayStore = TabsTrayStore(TabsTrayState(selectedPage = Page.NormalTabs)) + val newTabButtonBinding = AccessibleNewTabButtonBinding( + tabsTrayStore, settings, newTabButton, browserTrayInteractor, syncedTabsInteractor + ) + every { settings.accessibilityServicesEnabled } returns true + + newTabButtonBinding.start() + + verify(exactly = 1) { newTabButton.visibility = View.VISIBLE } + } + + @Test + fun `WHEN tab selected page is private tab THEN new tab button is visible`() { + val tabsTrayStore = TabsTrayStore(TabsTrayState(selectedPage = Page.PrivateTabs)) + val newTabButtonBinding = AccessibleNewTabButtonBinding( + tabsTrayStore, settings, newTabButton, browserTrayInteractor, syncedTabsInteractor + ) + every { settings.accessibilityServicesEnabled } returns true + + newTabButtonBinding.start() + + verify(exactly = 1) { newTabButton.visibility = View.VISIBLE } + } + + @Test + fun `WHEN tab selected page is sync tab THEN new tab button is visible`() { + val tabsTrayStore = TabsTrayStore(TabsTrayState(selectedPage = Page.SyncedTabs)) + val newTabButtonBinding = AccessibleNewTabButtonBinding( + tabsTrayStore, settings, newTabButton, browserTrayInteractor, syncedTabsInteractor + ) + every { settings.accessibilityServicesEnabled } returns true + + newTabButtonBinding.start() + + verify(exactly = 1) { newTabButton.visibility = View.VISIBLE } + } + + @Test + fun `WHEN accessibility is disabled THEN new tab button is not visible`() { + var tabsTrayStore = TabsTrayStore(TabsTrayState(selectedPage = Page.NormalTabs)) + var newTabButtonBinding = AccessibleNewTabButtonBinding( + tabsTrayStore, settings, newTabButton, browserTrayInteractor, syncedTabsInteractor + ) + every { settings.accessibilityServicesEnabled } returns false + + newTabButtonBinding.start() + + verify(exactly = 1) { newTabButton.visibility = View.GONE } + + tabsTrayStore = TabsTrayStore(TabsTrayState(selectedPage = Page.PrivateTabs)) + newTabButtonBinding = AccessibleNewTabButtonBinding( + tabsTrayStore, settings, newTabButton, browserTrayInteractor, syncedTabsInteractor + ) + + newTabButtonBinding.start() + + verify(exactly = 2) { newTabButton.visibility = View.GONE } + + tabsTrayStore = TabsTrayStore(TabsTrayState(selectedPage = Page.SyncedTabs)) + newTabButtonBinding = AccessibleNewTabButtonBinding( + tabsTrayStore, settings, newTabButton, browserTrayInteractor, syncedTabsInteractor + ) + + newTabButtonBinding.start() + + verify(exactly = 3) { newTabButton.visibility = View.GONE } + } + + @Test + fun `WHEN selected page is updated THEN button is updated`() { + val tabsTrayStore = TabsTrayStore(TabsTrayState(selectedPage = Page.NormalTabs)) + val newTabButtonBinding = AccessibleNewTabButtonBinding( + tabsTrayStore, settings, newTabButton, browserTrayInteractor, syncedTabsInteractor + ) + every { settings.accessibilityServicesEnabled } returns true + + newTabButtonBinding.start() + + verify(exactly = 1) { newTabButton.setImageResource(R.drawable.ic_new) } + + tabsTrayStore.dispatch(TabsTrayAction.PageSelected(Page.positionToPage(Page.PrivateTabs.ordinal))) + tabsTrayStore.waitUntilIdle() + + verify(exactly = 2) { newTabButton.setImageResource(R.drawable.ic_new) } + + tabsTrayStore.dispatch(TabsTrayAction.PageSelected(Page.positionToPage(Page.SyncedTabs.ordinal))) + tabsTrayStore.waitUntilIdle() + + verify(exactly = 1) { newTabButton.setImageResource(R.drawable.ic_fab_sync) } + + tabsTrayStore.dispatch(TabsTrayAction.SyncNow) + tabsTrayStore.waitUntilIdle() + + verify(exactly = 1) { newTabButton.visibility = View.GONE } + } +} diff --git a/app/src/test/java/org/mozilla/fenix/tabstray/FloatingActionButtonBindingTest.kt b/app/src/test/java/org/mozilla/fenix/tabstray/FloatingActionButtonBindingTest.kt new file mode 100644 index 000000000..9f6495c82 --- /dev/null +++ b/app/src/test/java/org/mozilla/fenix/tabstray/FloatingActionButtonBindingTest.kt @@ -0,0 +1,170 @@ +/* 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/. */ + +package org.mozilla.fenix.tabstray + +import androidx.appcompat.content.res.AppCompatResources +import com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton +import io.mockk.every +import io.mockk.mockk +import io.mockk.mockkStatic +import io.mockk.verify +import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.test.TestCoroutineDispatcher +import mozilla.components.support.test.libstate.ext.waitUntilIdle +import mozilla.components.support.test.rule.MainCoroutineRule +import org.junit.Before +import org.junit.Rule +import org.junit.Test +import org.mozilla.fenix.R +import org.mozilla.fenix.tabstray.browser.BrowserTrayInteractor +import org.mozilla.fenix.tabstray.syncedtabs.SyncedTabsInteractor +import org.mozilla.fenix.utils.Settings + +class FloatingActionButtonBindingTest { + + @OptIn(ExperimentalCoroutinesApi::class) + @get:Rule + val coroutinesTestRule = MainCoroutineRule(TestCoroutineDispatcher()) + + private val settings: Settings = mockk(relaxed = true) + private val actionButton: ExtendedFloatingActionButton = mockk(relaxed = true) + private val browserTrayInteractor: BrowserTrayInteractor = mockk(relaxed = true) + private val syncedTabsInteractor: SyncedTabsInteractor = mockk(relaxed = true) + + @Before + fun setup() { + mockkStatic(AppCompatResources::class) + every { AppCompatResources.getDrawable(any(), any()) } returns mockk(relaxed = true) + } + + @Test + fun `WHEN tab selected page is normal tab THEN shrink and show is called`() { + val tabsTrayStore = TabsTrayStore(TabsTrayState(selectedPage = Page.NormalTabs)) + val fabBinding = FloatingActionButtonBinding( + tabsTrayStore, settings, actionButton, browserTrayInteractor, syncedTabsInteractor + ) + every { settings.accessibilityServicesEnabled } returns false + + fabBinding.start() + + verify(exactly = 1) { actionButton.shrink() } + verify(exactly = 1) { actionButton.show() } + verify(exactly = 0) { actionButton.extend() } + verify(exactly = 0) { actionButton.hide() } + } + + @Test + fun `WHEN tab selected page is private tab THEN extend and show is called`() { + val tabsTrayStore = TabsTrayStore(TabsTrayState(selectedPage = Page.PrivateTabs)) + val fabBinding = FloatingActionButtonBinding( + tabsTrayStore, settings, actionButton, browserTrayInteractor, syncedTabsInteractor + ) + every { settings.accessibilityServicesEnabled } returns false + + fabBinding.start() + + verify(exactly = 1) { actionButton.extend() } + verify(exactly = 1) { actionButton.show() } + verify(exactly = 0) { actionButton.shrink() } + verify(exactly = 0) { actionButton.hide() } + } + + @Test + fun `WHEN tab selected page is sync tab THEN extend and show is called`() { + val tabsTrayStore = TabsTrayStore(TabsTrayState(selectedPage = Page.SyncedTabs)) + val fabBinding = FloatingActionButtonBinding( + tabsTrayStore, settings, actionButton, browserTrayInteractor, syncedTabsInteractor + ) + every { settings.accessibilityServicesEnabled } returns false + + fabBinding.start() + + verify(exactly = 1) { actionButton.extend() } + verify(exactly = 1) { actionButton.show() } + verify(exactly = 0) { actionButton.shrink() } + verify(exactly = 0) { actionButton.hide() } + } + + @Test + fun `WHEN accessibility is enabled THEN show is not called`() { + var tabsTrayStore = TabsTrayStore(TabsTrayState(selectedPage = Page.NormalTabs)) + var fabBinding = FloatingActionButtonBinding( + tabsTrayStore, settings, actionButton, browserTrayInteractor, syncedTabsInteractor + ) + every { settings.accessibilityServicesEnabled } returns true + + fabBinding.start() + + verify(exactly = 0) { actionButton.show() } + verify(exactly = 1) { actionButton.hide() } + + tabsTrayStore = TabsTrayStore(TabsTrayState(selectedPage = Page.PrivateTabs)) + fabBinding = FloatingActionButtonBinding( + tabsTrayStore, settings, actionButton, browserTrayInteractor, syncedTabsInteractor + ) + + fabBinding.start() + + verify(exactly = 0) { actionButton.show() } + verify(exactly = 2) { actionButton.hide() } + + tabsTrayStore = TabsTrayStore(TabsTrayState(selectedPage = Page.SyncedTabs)) + fabBinding = FloatingActionButtonBinding( + tabsTrayStore, settings, actionButton, browserTrayInteractor, syncedTabsInteractor + ) + + fabBinding.start() + + verify(exactly = 0) { actionButton.show() } + verify(exactly = 3) { actionButton.hide() } + } + + @Test + fun `WHEN selected page is updated THEN button is updated`() { + val tabsTrayStore = TabsTrayStore(TabsTrayState(selectedPage = Page.NormalTabs)) + val fabBinding = FloatingActionButtonBinding( + tabsTrayStore, settings, actionButton, browserTrayInteractor, syncedTabsInteractor + ) + every { settings.accessibilityServicesEnabled } returns false + + fabBinding.start() + + verify(exactly = 1) { actionButton.shrink() } + verify(exactly = 1) { actionButton.show() } + verify(exactly = 0) { actionButton.extend() } + verify(exactly = 0) { actionButton.hide() } + verify(exactly = 1) { actionButton.setIconResource(R.drawable.ic_new) } + + tabsTrayStore.dispatch(TabsTrayAction.PageSelected(Page.positionToPage(Page.PrivateTabs.ordinal))) + tabsTrayStore.waitUntilIdle() + + verify(exactly = 1) { actionButton.shrink() } + verify(exactly = 2) { actionButton.show() } + verify(exactly = 1) { actionButton.extend() } + verify(exactly = 0) { actionButton.hide() } + verify(exactly = 1) { actionButton.setText(R.string.tab_drawer_fab_content) } + verify(exactly = 2) { actionButton.setIconResource(R.drawable.ic_new) } + + tabsTrayStore.dispatch(TabsTrayAction.PageSelected(Page.positionToPage(Page.SyncedTabs.ordinal))) + tabsTrayStore.waitUntilIdle() + + verify(exactly = 1) { actionButton.shrink() } + verify(exactly = 3) { actionButton.show() } + verify(exactly = 2) { actionButton.extend() } + verify(exactly = 0) { actionButton.hide() } + verify(exactly = 1) { actionButton.setText(R.string.tab_drawer_fab_sync) } + verify(exactly = 1) { actionButton.setIconResource(R.drawable.ic_fab_sync) } + + tabsTrayStore.dispatch(TabsTrayAction.SyncNow) + tabsTrayStore.waitUntilIdle() + + verify(exactly = 1) { actionButton.shrink() } + verify(exactly = 4) { actionButton.show() } + verify(exactly = 3) { actionButton.extend() } + verify(exactly = 0) { actionButton.hide() } + verify(exactly = 1) { actionButton.setText(R.string.sync_syncing_in_progress) } + verify(exactly = 2) { actionButton.setIconResource(R.drawable.ic_fab_sync) } + } +} From fc4eada9fdba10c2630a129d1e25cd057770f9e5 Mon Sep 17 00:00:00 2001 From: Gregory Mierzwinski Date: Thu, 22 Apr 2021 13:21:48 -0400 Subject: [PATCH 024/256] Bug 1706913 - Fix node archive name change caused by bug 1611513. (#19190) * Bug 1706913 - Fix node archive name change caused by bug 1611513. * Undo test run. --- taskcluster/ci/toolchain/gecko-derived.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/taskcluster/ci/toolchain/gecko-derived.yml b/taskcluster/ci/toolchain/gecko-derived.yml index 27343ca1c..0c1875780 100644 --- a/taskcluster/ci/toolchain/gecko-derived.yml +++ b/taskcluster/ci/toolchain/gecko-derived.yml @@ -43,7 +43,7 @@ linux64-minidump-stackwalk: linux64-node: attributes: - toolchain-artifact: public/build/node.tar.xz + toolchain-artifact: public/build/node.tar.zst description: "Node.js toolchain" run: index-search: From dc51cd47b55b4de3a4e63ade992d17d1b7bcbbf5 Mon Sep 17 00:00:00 2001 From: Mugurell Date: Mon, 12 Apr 2021 14:32:55 +0300 Subject: [PATCH 025/256] For #18591 - Make the navbar sticky in the new menu --- .../org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt b/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt index 405fbfbf8..985644685 100644 --- a/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt +++ b/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt @@ -161,7 +161,7 @@ open class DefaultToolbarMenu( registerForIsBookmarkedUpdates() if (FeatureFlags.toolbarMenuFeature) { - BrowserMenuItemToolbar(listOf(back, forward, share, refresh)) + BrowserMenuItemToolbar(listOf(back, forward, share, refresh), isSticky = true) } else { val bookmark = BrowserMenuItemToolbar.TwoStateButton( primaryImageResource = R.drawable.ic_bookmark_filled, From 0f9f4393295429442d0b7516605d9ca99ec3f942 Mon Sep 17 00:00:00 2001 From: Mugurell Date: Thu, 22 Apr 2021 17:19:58 +0300 Subject: [PATCH 026/256] For #18591 - Update tests Some tests trying to "Add to top sites" may fail because of the sticky navbar now covering that menu item -> scroll the menu up a little. Some tests that previously were trying to scroll to the bottom of the menu to interact with navbar options now don't have to. Them trying to interact with navbar option with the menu opened as collapsed is a good test for the navbar stickyness. --- .../java/org/mozilla/fenix/ui/SmokeTest.kt | 1 - .../java/org/mozilla/fenix/ui/TopSitesTest.kt | 5 +++++ .../fenix/ui/robots/ThreeDotMenuMainRobot.kt | 20 +++++-------------- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/SmokeTest.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/SmokeTest.kt index 473e9a8fe..a5ddedb66 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/SmokeTest.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/SmokeTest.kt @@ -321,7 +321,6 @@ class SmokeTest { navigationToolbar { }.enterURLAndEnterToBrowser(defaultWebPage.url) { }.openThreeDotMenu { - expandMenu() }.openSaveToCollection { verifyCollectionNameTextField() } diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/TopSitesTest.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/TopSitesTest.kt index 1b692a619..96eac6ace 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/TopSitesTest.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/TopSitesTest.kt @@ -54,6 +54,7 @@ class TopSitesTest { navigationToolbar { }.enterURLAndEnterToBrowser(defaultWebPage.url) { }.openThreeDotMenu { + expandMenu() verifyAddToTopSitesButton() }.addToFirefoxHome { verifySnackBarText("Added to top sites!") @@ -73,6 +74,7 @@ class TopSitesTest { navigationToolbar { }.enterURLAndEnterToBrowser(defaultWebPage.url) { }.openThreeDotMenu { + expandMenu() verifyAddToTopSitesButton() }.addToFirefoxHome { verifySnackBarText("Added to top sites!") @@ -104,6 +106,7 @@ class TopSitesTest { navigationToolbar { }.enterURLAndEnterToBrowser(defaultWebPage.url) { }.openThreeDotMenu { + expandMenu() verifyAddToTopSitesButton() }.addToFirefoxHome { verifySnackBarText("Added to top sites!") @@ -128,6 +131,7 @@ class TopSitesTest { navigationToolbar { }.enterURLAndEnterToBrowser(defaultWebPage.url) { }.openThreeDotMenu { + expandMenu() verifyAddToTopSitesButton() }.addToFirefoxHome { verifySnackBarText("Added to top sites!") @@ -152,6 +156,7 @@ class TopSitesTest { navigationToolbar { }.enterURLAndEnterToBrowser(defaultWebPage.url) { }.openThreeDotMenu { + expandMenu() verifyAddToTopSitesButton() }.addToFirefoxHome { verifySnackBarText("Added to top sites!") diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/ThreeDotMenuMainRobot.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/ThreeDotMenuMainRobot.kt index 28e212658..9db6eef94 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/ThreeDotMenuMainRobot.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/ThreeDotMenuMainRobot.kt @@ -203,11 +203,6 @@ class ThreeDotMenuMainRobot { } fun sharePage(interact: LibrarySubMenusMultipleSelectionToolbarRobot.() -> Unit): LibrarySubMenusMultipleSelectionToolbarRobot.Transition { - var maxSwipes = 3 - while (!shareButton().exists() && maxSwipes != 0) { - threeDotMenuRecyclerView().perform(swipeUp()) - maxSwipes-- - } shareButton().click() LibrarySubMenusMultipleSelectionToolbarRobot().interact() return LibrarySubMenusMultipleSelectionToolbarRobot.Transition() @@ -222,11 +217,6 @@ class ThreeDotMenuMainRobot { } fun goForward(interact: BrowserRobot.() -> Unit): BrowserRobot.Transition { - var maxSwipes = 3 - while (!forwardButton().exists() && maxSwipes != 0) { - threeDotMenuRecyclerView().perform(swipeUp()) - maxSwipes-- - } forwardButton().click() BrowserRobot().interact() @@ -260,11 +250,6 @@ class ThreeDotMenuMainRobot { } fun refreshPage(interact: BrowserRobot.() -> Unit): BrowserRobot.Transition { - var maxSwipes = 3 - while (!refreshButton().exists() && maxSwipes != 0) { - threeDotMenuRecyclerView().perform(swipeUp()) - maxSwipes-- - } assertRefreshButton() refreshButton().click() @@ -379,6 +364,11 @@ class ThreeDotMenuMainRobot { } fun openSaveToCollection(interact: ThreeDotMenuMainRobot.() -> Unit): ThreeDotMenuMainRobot.Transition { + // Ensure the menu is expanded and fully scrolled to the bottom. + for (i in 0..3) { + threeDotMenuRecyclerView().perform(swipeUp()) + } + mDevice.waitNotNull(Until.findObject(By.text("Save to collection")), waitingTime) saveCollectionButton().click() ThreeDotMenuMainRobot().interact() From e95251356912a02f4b135a21b2ccf1baba8cc409 Mon Sep 17 00:00:00 2001 From: Mihai Adrian Carare <48995920+mcarare@users.noreply.github.com> Date: Fri, 23 Apr 2021 01:22:20 +0300 Subject: [PATCH 027/256] For #19065 - Add extension functions to be used with credit cards. (#19187) --- .../fenix/settings/creditcards/String.kt | 51 +++++++++ .../fenix/settings/creditcards/StringTest.kt | 102 ++++++++++++++++++ 2 files changed, 153 insertions(+) create mode 100644 app/src/main/java/org/mozilla/fenix/settings/creditcards/String.kt create mode 100644 app/src/test/java/org/mozilla/fenix/settings/creditcards/StringTest.kt diff --git a/app/src/main/java/org/mozilla/fenix/settings/creditcards/String.kt b/app/src/main/java/org/mozilla/fenix/settings/creditcards/String.kt new file mode 100644 index 000000000..00bc38e4f --- /dev/null +++ b/app/src/main/java/org/mozilla/fenix/settings/creditcards/String.kt @@ -0,0 +1,51 @@ +/* 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/. */ + +package org.mozilla.fenix.settings.creditcards + +import androidx.annotation.VisibleForTesting + +private const val MAX_CREDIT_CARD_NUMBER_LENGTH = 19 +private const val MIN_CREDIT_CARD_NUMBER_LENGTH = 12 + +/** + * Strips characters other than digits from a string. + * Used to strip a credit card number user input of spaces and separators. + */ +fun String.toCreditCardNumber(): String { + return this.filter { it.isDigit() } +} + +/** + * Uses string size and Luhn Algorithm validation to validate a credit card number. + */ +fun String.validateCreditCardNumber(): Boolean { + val creditCardNumber = this.toCreditCardNumber() + + if (creditCardNumber != this) return false + + // credit card numbers have at least 12 digits and at most 19 digits + if (creditCardNumber.length < MIN_CREDIT_CARD_NUMBER_LENGTH || + creditCardNumber.length > MAX_CREDIT_CARD_NUMBER_LENGTH + ) return false + + return luhnAlgorithmValidation(creditCardNumber) +} + +/** + * Implementation of Luhn Algorithm validation (https://en.wikipedia.org/wiki/Luhn_algorithm) + */ +@Suppress("MagicNumber") +@VisibleForTesting +internal fun luhnAlgorithmValidation(creditCardNumber: String): Boolean { + var checksum = 0 + val reversedCardNumber = creditCardNumber.reversed() + + for (index in reversedCardNumber.indices) { + val digit = Character.getNumericValue(reversedCardNumber[index]) + checksum += if (index % 2 == 0) digit else (digit * 2).let { (it / 10) + (it % 10) } + } + + return (checksum % 10) == 0 +} diff --git a/app/src/test/java/org/mozilla/fenix/settings/creditcards/StringTest.kt b/app/src/test/java/org/mozilla/fenix/settings/creditcards/StringTest.kt new file mode 100644 index 000000000..608041e60 --- /dev/null +++ b/app/src/test/java/org/mozilla/fenix/settings/creditcards/StringTest.kt @@ -0,0 +1,102 @@ +/* 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/. */ + +package org.mozilla.fenix.settings.creditcards + +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertTrue +import org.junit.Test +import org.junit.runner.RunWith +import org.mozilla.fenix.helpers.FenixRobolectricTestRunner + +@RunWith(FenixRobolectricTestRunner::class) +class StringTest { + + @Test + fun `toCreditCardNumber returns a string with only digits `() { + assertEquals("123456789", "1 234 5678 9".toCreditCardNumber()) + assertEquals("123456789", "1.23.4+5678/9".toCreditCardNumber()) + assertEquals("123456789", ",12r34t5678&9".toCreditCardNumber()) + assertEquals("123456789", " 1 234 5678 9 ".toCreditCardNumber()) + assertEquals("123456789", " abc 1 234 abc 5678 9".toCreditCardNumber()) + assertEquals("123456789", "1-234-5678-9".toCreditCardNumber()) + } + + @Test + fun `validateCreditCardNumber returns true for valid credit card numbers `() { + val americanExpressCard = "371449635398431" + val dinnersClubCard = "30569309025904" + val discoverCard = "6011111111111117" + val jcbCard = "3530111333300000" + val masterCardCard = "5555555555554444" + val visaCard = "4111111111111111" + val voyagerCard = "869941728035895" + + assertTrue(americanExpressCard.validateCreditCardNumber()) + assertTrue(dinnersClubCard.validateCreditCardNumber()) + assertTrue(discoverCard.validateCreditCardNumber()) + assertTrue(jcbCard.validateCreditCardNumber()) + assertTrue(masterCardCard.validateCreditCardNumber()) + assertTrue(visaCard.validateCreditCardNumber()) + assertTrue(voyagerCard.validateCreditCardNumber()) + } + + @Test + fun `validateCreditCardNumber returns false got invalid credit card numbers `() { + val shortCardNumber = "12345678901" + val longCardNumber = "12345678901234567890" + + val americanExpressCardInvalid = "371449635398432" + val dinnersClubCardInvalid = "30569309025905" + val discoverCardInvalid = "6011111111111118" + val jcbCardInvalid = "3530111333300001" + val masterCardCardInvalid = "5555555555554445" + val visaCardInvalid = "4111111111111112" + val voyagerCardInvalid = "869941728035896" + + assertFalse(shortCardNumber.validateCreditCardNumber()) + assertFalse(longCardNumber.validateCreditCardNumber()) + + assertFalse(americanExpressCardInvalid.validateCreditCardNumber()) + assertFalse(dinnersClubCardInvalid.validateCreditCardNumber()) + assertFalse(discoverCardInvalid.validateCreditCardNumber()) + assertFalse(jcbCardInvalid.validateCreditCardNumber()) + assertFalse(masterCardCardInvalid.validateCreditCardNumber()) + assertFalse(visaCardInvalid.validateCreditCardNumber()) + assertFalse(voyagerCardInvalid.validateCreditCardNumber()) + } + + @Test + fun `luhnAlgorithmValidation returns false for invalid identification numbers `() { + // "4242424242424242" is a valid identification number + assertFalse(luhnAlgorithmValidation("4242424242424240")) + assertFalse(luhnAlgorithmValidation("4242424242424241")) + assertFalse(luhnAlgorithmValidation("4242424242424243")) + assertFalse(luhnAlgorithmValidation("4242424242424244")) + assertFalse(luhnAlgorithmValidation("4242424242424245")) + assertFalse(luhnAlgorithmValidation("4242424242424246")) + assertFalse(luhnAlgorithmValidation("4242424242424247")) + assertFalse(luhnAlgorithmValidation("4242424242424248")) + assertFalse(luhnAlgorithmValidation("4242424242424249")) + assertFalse(luhnAlgorithmValidation("1")) + assertFalse(luhnAlgorithmValidation("12")) + assertFalse(luhnAlgorithmValidation("123")) + } + + @Test + fun `luhnAlgorithmValidation returns true for valid identification numbers `() { + assertTrue(luhnAlgorithmValidation("0")) + assertTrue(luhnAlgorithmValidation("00")) + assertTrue(luhnAlgorithmValidation("18")) + assertTrue(luhnAlgorithmValidation("0000000000000000")) + assertTrue(luhnAlgorithmValidation("4242424242424242")) + assertTrue(luhnAlgorithmValidation("42424242424242426")) + assertTrue(luhnAlgorithmValidation("424242424242424267")) + assertTrue(luhnAlgorithmValidation("4242424242424242675")) + assertTrue(luhnAlgorithmValidation("000000018")) + assertTrue(luhnAlgorithmValidation("99999999999999999999")) + assertTrue(luhnAlgorithmValidation("1234567812345670")) + } +} From d1951cc67256ed2fa2a2f8c36e826e63d3cbd816 Mon Sep 17 00:00:00 2001 From: Mozilla L10n Automation Bot Date: Fri, 23 Apr 2021 00:07:59 +0000 Subject: [PATCH 028/256] Import l10n. --- app/src/main/res/values-sl/strings.xml | 33 ++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/app/src/main/res/values-sl/strings.xml b/app/src/main/res/values-sl/strings.xml index 24edc1f2f..a9cbea5e6 100644 --- a/app/src/main/res/values-sl/strings.xml +++ b/app/src/main/res/values-sl/strings.xml @@ -632,6 +632,8 @@ Deli vse zavihke Nedavno zaprti zavihki + + Nastavitve računa Nastavitve zavihkov @@ -1194,6 +1196,8 @@ Tukaj poiščite odgovore Sinhronizirajte Firefox med napravami + + Prinesite zaznamke, zgodovino in gesla v Firefox na tej napravi. @@ -1210,12 +1214,24 @@ Sync je vklopljen Prijava ni uspela + + Vedno vključena zasebnost + + Firefox samodejno prepreči, da bi vas podjetja na skrivaj spremljala po spletu. Običajno (privzeto) + + Uravnotežena zasebnost in učinkovitost delovanja. Strani bodo delovale običajno. Strogo (priporočljivo) Strogo + + Zavrača več sledilcev in pospeši nalaganje strani, vendar deli strani lahko nehajo delovati. + + Izberite postavitev orodne vrstice + + Postavite si orodno vrstico na doseg roke. Naj bo na dnu ali pa jo premaknite na vrh. Brskajte zasebno Izberite si temo + + Prihranite nekaj baterije in sprostite oči s temnim načinom. Samodejno @@ -1296,10 +1314,14 @@ Več o tem Običajno (privzeto) + + Uravnotežena zasebnost in učinkovitost delovanja. Strani bodo delovale običajno. Kaj je zavrnjeno s standardno zaščito pred sledenjem Strogo + + Zavrača več sledilcev in pospeši nalaganje strani, vendar deli strani lahko nehajo delovati. Kaj je zavrnjeno s strogo zaščito pred sledenjem @@ -1543,6 +1565,8 @@ Kreditne kartice + + Shrani in samodejno izpolni kartice Podatki so šifrirani @@ -1554,12 +1578,18 @@ Upravljanje shranjenih kartic Dodaj kartico + + Uredi kartico Številka kartice Datum poteka Ime na kartici + + Vzdevek kartice + + Izbriši kartico Izbriši kartico @@ -1734,6 +1764,9 @@ Prekliči + + Nastavite, naj se povezave s spletnih strani, e-pošte in sporočil samodejno odpirajo v Firefoxu. + Odstrani From 7a4e0cd0160ae63c9498687d0051f1a602ece212 Mon Sep 17 00:00:00 2001 From: Mozilla L10n Automation Bot Date: Sat, 24 Apr 2021 00:04:34 +0000 Subject: [PATCH 029/256] Import l10n. --- app/src/main/res/values-es-rAR/strings.xml | 12 ++++++------ app/src/main/res/values-hy-rAM/strings.xml | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/app/src/main/res/values-es-rAR/strings.xml b/app/src/main/res/values-es-rAR/strings.xml index 83c27e256..9729b1e65 100644 --- a/app/src/main/res/values-es-rAR/strings.xml +++ b/app/src/main/res/values-es-rAR/strings.xml @@ -18,10 +18,10 @@ Tus pestañas abiertas se mostrarán aquí. - Sus pestañas privadas se van a mostrar aquí. + Tus pestañas privadas se mostrarán aquí. - 1 abrir pestaña. Tocá para cambiar de pestaña. + 1 pestaña abierta. Tocá para cambiar de pestaña. %1$s pestañas abiertas. Tocá para cambiar de pestaña. @@ -42,9 +42,9 @@ Se eliminó la selección %1$s - Salió del modo de selección múltiple + Saliste del modo de selección múltiple - Ingresó al modo de selección múltiple, seleccione pestañas para guardar en una colección + Ingresaste al modo de selección múltiple, seleccioná pestañas para guardar en una colección Seleccionadas @@ -164,7 +164,7 @@ Abrir en %1$s - PATROCINADO POR %1$s + DESARROLLADO POR %1$s @@ -628,7 +628,7 @@ Sincronizar - Abrir pestañas + Pestañas abiertas Guardar en colección diff --git a/app/src/main/res/values-hy-rAM/strings.xml b/app/src/main/res/values-hy-rAM/strings.xml index 5aabec684..a8a719dcc 100644 --- a/app/src/main/res/values-hy-rAM/strings.xml +++ b/app/src/main/res/values-hy-rAM/strings.xml @@ -603,12 +603,16 @@ Գաղտնի աշխատաշրջան Գաղտնի ներդիրներ + + Համաժամեցված ներդիրներ Ավելացնել ներդիր Հավելել մասնավոր ներդիր Մասնավոր + + Համաժամեցում Բացել ներդիրները @@ -619,6 +623,8 @@ Համօգտագործել ներդիրները Վերջերս փակված ներդիրներ + + Հաշվի կարգավորումներ Ներդիրի կարգավորումներ @@ -975,6 +981,8 @@ Բոլոր գործողությունները Վերջերս փակված + + Մուտք գործեք՝ համաժամեցնելու համար Մուտք գործել Համաժամեցում @@ -1550,8 +1558,12 @@ Համաժամեցնել քարտերը սարքերի միջև Ավելացնել բանկային քարտ + + Կառավարել պահված քարտերը Ավելացնել քարտ + + Խմբագրել քարտը Քարտի համարը @@ -1560,6 +1572,8 @@ Քարտի վրա ձեր անունը Քարտի անունը + + Ջնջել քարտը Ջնջել քարտը @@ -1569,6 +1583,9 @@ Չեղարկել + + Պահպանված քարտեր + Ավելացնել որոնիչ @@ -1728,6 +1745,9 @@ Չեղարկել + + Կայեք հղումներ կայքերից, էլ. նամակներից և հաղորդագրություններից, որոնք ինքնաբար կերպով կբացվեն Firefox-ում: + Հեռացնել From 088d5cc80178d043ec25bbbe5b386c02f223e053 Mon Sep 17 00:00:00 2001 From: Mozilla L10n Automation Bot Date: Sun, 25 Apr 2021 00:04:32 +0000 Subject: [PATCH 030/256] Import l10n. --- app/src/main/res/values-tt/strings.xml | 95 +++++++++++++++++++++++++- 1 file changed, 94 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-tt/strings.xml b/app/src/main/res/values-tt/strings.xml index 2d35a0054..8762652bb 100644 --- a/app/src/main/res/values-tt/strings.xml +++ b/app/src/main/res/values-tt/strings.xml @@ -389,6 +389,8 @@ Башка җиһаздагы таблар + + Башка Firefox җиһазларыннан алынган таблар өчен искәртүләр. Таб кабул ителде @@ -406,12 +408,19 @@ Күбрәк белү + + Тулысынча сүндерелгән, аны кабызу өчен көйләүләргә керегез. + Телеметрия + + Куллану турында һәм техник мәгълүматлар Маркетинг мәгълүматлары Тикшеренүләр + + Тәҗрибәләр Mozilla урнашу хезмәте @@ -428,6 +437,9 @@ Хисап язмасын бетерү + + + Firefox.com/pair адресында күрсәтелгән QR кодны сканерлагыз]]> Камераны ачу @@ -1117,6 +1129,8 @@ КАБАТЛАУ Кодны сканерлау + + https://firefox.com/pair адресына үтегез]]> Сканерлауга әзер @@ -1128,6 +1142,9 @@ Баш тарту + + Стандарт папкаларны үзгәртә алмыйм + Саклау көйләүләре @@ -1141,11 +1158,15 @@ Катгый Үзгә + + Кайсы төр трекерларны һәм скриптларны блокларга икәнен сайлагыз. Кукилар Каралмаган сайтлардан булган кукилар + + Күзәтүче эчтәлек Барлык табларда @@ -1155,11 +1176,23 @@ Үзгә табларда гына Криптомайнерләр + + Бармак эзләрен җыючылар (идентификаторлар) Тыелган Рөхсәт ителгән + + Социаль челтәр күзәтүчеләре Криптомайнерләр + + Бармак эзләрен җыючылар (идентификаторлар) + + Күзәтүче эчтәлек + + Бу сайт өчен саклау КАБЫНГАН + + Бу сайт өчен саклау СҮНГӘН Кире кайту @@ -1186,6 +1219,11 @@ Без кулланган китапханәләр + + Хата төзәтү менюсы: кабызу өчен %1$d чиртү калды + Хата төзәтү менюсы кабынган + 1 таб @@ -1244,6 +1282,8 @@ Сакланмаган логиннар һәм серсүзләр монда күрсәтеләчәк. Бу сайтлар өчен логиннар һәм серсүзләр сакланмаячак. + + Барлык чыгармаларны бетерү Логиннардан эзләү @@ -1293,16 +1333,25 @@ Сакланган логиннарыгызны карау өчен йозакны ачыгыз Cоңрак + + Хәзер урнаштыру Җиһазыгызның йозагын ачыгыз + + Барлык вебсайтларны да масштаблау Исем (А-Я) Соңгы кулланылган + + Логиннар менюсын тәртипкә китерү + Кредит карталары + + Карталарны саклау һәм автотөгәлләү Мәгълүматлар шифрланган @@ -1313,12 +1362,18 @@ Сакланган карталар белән идарә итү Картаны өстәү + + Картаны үзгәртү Карта номеры Вакыты чыгу датасы Картадагы исем + + Карта исеме + + Картаны бетерү Картаны бетерү @@ -1350,18 +1405,26 @@ Исем Эзләнәчәк сүз я сүзтезмә + + Сорауны “%s” юлы белән алыштырыгыз. Мисал өчен:\nhttps://www.google.com/search?q=%s Күбрәк белү + + Үзгә эзләү системасының нечкәлекләре Күбрәк белү сылтамасы Эзләү системасының исемен кертегез + + “%s” исемле эзләү системасы инде бар. Эзләнәсе сүзтезмәне кертегез Эзләнәсе сүзтезмәнең Мисал форматына туры килүен тикшерегез + + “%s” адресына тоташу хатасы %s ясалды @@ -1369,6 +1432,8 @@ %s бетерелде + + Өр яңа %s-ка рәхим итегез %s яңартыла… @@ -1378,6 +1443,13 @@ Серсүзләр + + Рөхсәт итү өчен: + + 1. Android көйләүләренә керегез + + Рөхсәтләр’гә басыгыз]]> + Хәвефсез бәйләнеш @@ -1388,6 +1460,8 @@ Бу сайт өчен бирелгән барлык рөхсәтләрне дә чистартуны раслыйсызмы? Әлеге сайт өчен бирелгән бу рөхсәтне кире алуны раслыйсызмы? + + Сайт өчен чыгармалар юк Төп мәкаләләр @@ -1407,6 +1481,12 @@ Бетерү Логин көйләүләре + + Логинның веб-адресы өчен үзгәртелә торган текст кыры. + + Логинның кулланучы исеме өчен үзгәртелә торган текст кыры. + + Логинның серсүзе өчен үзгәртелә торган текст кыры. Логин үзгәрешләрен саклау. @@ -1421,9 +1501,20 @@ Хәзер сөйләгез + + Мондый исемле кулланучы бар инде + Башка бер җиһазны тоташтыру. + + Зинһар, сайтка яңадан керегез. + + Зинһар, таблар синхронлауны кабызыгыз. + + Башка җиһазларыгыздагы Firefox-ларда ачык таблар юк. + + Башка җиһазларыгызда ачылган таблар исемлеген карау. Синхронлауга керү @@ -1431,7 +1522,9 @@ Яхшы, аңладым - + + Иң күп каралган сайтларны күрсәтү + Исем Төп сайт исеме From eec64110ae9ac7bb19c5f84d35f21e5752b74796 Mon Sep 17 00:00:00 2001 From: Mozilla L10n Automation Bot Date: Mon, 26 Apr 2021 00:00:55 +0000 Subject: [PATCH 031/256] Import l10n. --- app/src/main/res/values-es-rMX/strings.xml | 49 ++++------------------ app/src/main/res/values-ja/strings.xml | 20 ++++++++- 2 files changed, 27 insertions(+), 42 deletions(-) diff --git a/app/src/main/res/values-es-rMX/strings.xml b/app/src/main/res/values-es-rMX/strings.xml index 8e7d02b7e..e11a2a383 100644 --- a/app/src/main/res/values-es-rMX/strings.xml +++ b/app/src/main/res/values-es-rMX/strings.xml @@ -19,10 +19,6 @@ Tus pestañas privadas aparecerán aquí. - - Baidu - - JD 1 pestaña abierta. Tocar para cambiar de pestaña. @@ -127,6 +123,8 @@ Editar marcador Complementos + + Extensiones No hay complementos aquí @@ -875,15 +873,15 @@ Activada Desactivada - + Permitir audio y video Bloquear audio y video solo con datos móviles El audio y el video se reproducirán con Wi-Fi - + Bloquear solo audio - + Bloquear audio y video Activado @@ -1081,6 +1079,8 @@ Libera espacio de almacenamiento Permisos del sitio + + Descargas Eliminar datos de navegación @@ -1140,9 +1140,6 @@ ¡Te damos la bienvenida a %s! ¿Ya tienes una cuenta? - - Descubre %s Ver las novedades Obtén respuestas aquí - - Empieza a sincronizar marcadores, contraseñas y más con tu cuenta de Firefox. - - Saber más @@ -1162,36 +1155,19 @@ Sí, iniciar sesión Iniciando sesión… - - Iniciar sesión en Firefox Mantenerme desconectado Sync está activado Error al iniciar sesión - - Privacidad automática - - La configuración de privacidad y seguridad bloquea los rastreadores, el malware y las compañías que te siguen. Estándar (predeterminado) - - Bloquea menos rastreadores. Las páginas se cargarán normalmente. Estricta (recomendada) Estricto - - Bloquear más rastreadores, publicidad y ventanas emergentes. Las páginas cargan más rápido, pero pueden tener problemas de funcionalidad. - - Toma una posición - - Prueba la navegación con una sola mano con la barra de herramientas inferior o muévela a la parte superior. Navegar de forma privada Tu privacidad - Hemos diseñado %s para darte control sobre lo que compartes - en línea y lo que compartes con nosotros. + The first parameter is the name of the app (e.g. Firefox Preview) Substitute %s for long browser name. --> + Hemos diseñado %s para darte el control sobre lo que compartes en línea y lo que compartes con nosotros. Leer nuestro aviso de privacidad @@ -1219,8 +1194,6 @@ Elige tu tema - - Ahorra un poco de batería y descansa la vista activando el modo oscuro. Automático @@ -1274,14 +1247,10 @@ Saber más Estándar (predeterminado) - - Bloquea menos rastreadores. Las páginas se cargarán normalmente. Qué es lo que está bloqueado por la protección estándar contra el rastreo Estricto - - Bloquear más rastreadores, publicidad y ventanas emergentes. Las páginas cargan más rápido, pero pueden tener problemas de funcionalidad. Qué es lo que está bloqueado por la protección estricta contra el rastreo diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index fa2a9f24a..ee55d7840 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -613,12 +613,16 @@ プライベートセッション プライベートタブ + + 同期したタブ タブを追加 プライベートタブを追加 プライベート + + 同期 開いているタブ @@ -629,6 +633,8 @@ すべてのタブを共有 最近閉じたタブ + + アカウント設定 タブ設定 @@ -991,8 +997,6 @@ すべての操作 最近使用 - - %1$s としてログイン ログインして同期 @@ -1573,9 +1577,13 @@ 端末間でカード情報を同期する クレジットカードを追加 + + 保存したカードを管理 カードの追加 + + カードの編集 カード番号 @@ -1584,6 +1592,8 @@ カード名義 カードのニックネーム + + カードを削除 カードを削除 @@ -1593,6 +1603,9 @@ キャンセル + + 保存したカード + 検索エンジンの追加 @@ -1753,6 +1766,9 @@ キャンセル + + ウェブサイトやメール、メッセージのリンクを自動的に Firefox で開きます。 + 削除 From 6a1b5875b0964838037472843d9b1da15bc23b29 Mon Sep 17 00:00:00 2001 From: Sebastian Kaspari Date: Wed, 21 Apr 2021 15:45:13 +0200 Subject: [PATCH 032/256] Use new SearchSuggestionProvider flag. --- .../fenix/search/awesomebar/AwesomeBarView.kt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/mozilla/fenix/search/awesomebar/AwesomeBarView.kt b/app/src/main/java/org/mozilla/fenix/search/awesomebar/AwesomeBarView.kt index 3966f1510..0f0a0b5d6 100644 --- a/app/src/main/java/org/mozilla/fenix/search/awesomebar/AwesomeBarView.kt +++ b/app/src/main/java/org/mozilla/fenix/search/awesomebar/AwesomeBarView.kt @@ -155,7 +155,11 @@ class AwesomeBarView( icon = searchBitmap, showDescription = false, engine = engineForSpeculativeConnects, - filterExactMatch = true + filterExactMatch = true, + private = when (activity.browsingModeManager.mode) { + BrowsingMode.Normal -> false + BrowsingMode.Private -> true + } ) defaultSearchActionProvider = @@ -335,7 +339,11 @@ class AwesomeBarView( mode = SearchSuggestionProvider.Mode.MULTIPLE_SUGGESTIONS, icon = searchBitmap, engine = engineForSpeculativeConnects, - filterExactMatch = true + filterExactMatch = true, + private = when (activity.browsingModeManager.mode) { + BrowsingMode.Normal -> false + BrowsingMode.Private -> true + } ) ) } From 239b5c4b6d6f297dd1c84ed690261fd2602f4eb5 Mon Sep 17 00:00:00 2001 From: Sebastian Kaspari Date: Thu, 22 Apr 2021 18:55:00 +0200 Subject: [PATCH 033/256] Update Mozilla Android Components to 90.0.20210422163756 --- buildSrc/src/main/java/AndroidComponents.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/java/AndroidComponents.kt b/buildSrc/src/main/java/AndroidComponents.kt index 1c41b6ff3..9fa55bc76 100644 --- a/buildSrc/src/main/java/AndroidComponents.kt +++ b/buildSrc/src/main/java/AndroidComponents.kt @@ -3,5 +3,5 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ object AndroidComponents { - const val VERSION = "90.0.20210421164305" + const val VERSION = "90.0.20210422163756" } From 4e16c46b27f8f3462fe43219ce59865674eb3fa8 Mon Sep 17 00:00:00 2001 From: Grisha Kruglov Date: Thu, 15 Apr 2021 11:25:46 -0700 Subject: [PATCH 034/256] Fix breaking changes introduced by credit card encryption APIs --- .../fenix/components/BackgroundServices.kt | 4 +- .../java/org/mozilla/fenix/components/Core.kt | 6 ++- .../creditcards/CreditCardEditorFragment.kt | 33 ++++++++++---- .../creditcards/CreditCardEditorState.kt | 3 +- .../controller/CreditCardEditorController.kt | 5 ++- .../interactor/CreditCardEditorInteractor.kt | 7 +-- .../creditcards/view/CreditCardEditorView.kt | 34 +++++++++----- .../view/CreditCardItemViewHolder.kt | 4 +- .../creditcards/CreditCardEditorStateTest.kt | 6 ++- .../creditcards/CreditCardEditorViewTest.kt | 15 ++++--- .../CreditCardItemViewHolderTest.kt | 6 ++- .../creditcards/CreditCardsAdapterTest.kt | 10 +++-- .../DefaultCreditCardEditorControllerTest.kt | 45 ++++++------------- .../DefaultCreditCardEditorInteractorTest.kt | 13 ++++-- ...aultCreditCardsManagementControllerTest.kt | 4 +- 15 files changed, 117 insertions(+), 78 deletions(-) diff --git a/app/src/main/java/org/mozilla/fenix/components/BackgroundServices.kt b/app/src/main/java/org/mozilla/fenix/components/BackgroundServices.kt index 086d89771..b28b3b4dc 100644 --- a/app/src/main/java/org/mozilla/fenix/components/BackgroundServices.kt +++ b/app/src/main/java/org/mozilla/fenix/components/BackgroundServices.kt @@ -95,8 +95,8 @@ class BackgroundServices( private val syncConfig = SyncConfig(supportedEngines, PeriodicSyncConfig(periodMinutes = 240)) // four hours init { - /* Make the "history", "bookmark", "passwords", and "tabs" stores accessible to workers - spawned by the sync manager. */ + // Make the "history", "bookmark", "passwords", "tabs" stores + // accessible to workers spawned by the sync manager. GlobalSyncableStoreProvider.configureStore(SyncEngine.History to historyStorage) GlobalSyncableStoreProvider.configureStore(SyncEngine.Bookmarks to bookmarkStorage) GlobalSyncableStoreProvider.configureStore(SyncEngine.Passwords to passwordsStorage) diff --git a/app/src/main/java/org/mozilla/fenix/components/Core.kt b/app/src/main/java/org/mozilla/fenix/components/Core.kt index fb7a74509..c0e206a47 100644 --- a/app/src/main/java/org/mozilla/fenix/components/Core.kt +++ b/app/src/main/java/org/mozilla/fenix/components/Core.kt @@ -291,7 +291,7 @@ class Core( val lazyHistoryStorage = lazyMonitored { PlacesHistoryStorage(context, crashReporter) } val lazyBookmarksStorage = lazyMonitored { PlacesBookmarksStorage(context) } val lazyPasswordsStorage = lazyMonitored { SyncableLoginsStorage(context, passwordsEncryptionKey) } - val lazyAutofillStorage = lazyMonitored { AutofillCreditCardsAddressesStorage(context) } + private val lazyAutofillStorage = lazyMonitored { AutofillCreditCardsAddressesStorage(context, lazySecurePrefs) } /** * The storage component to sync and persist tabs in a Firefox Sync account. @@ -390,6 +390,7 @@ class Core( * Shared Preferences that encrypt/decrypt using Android KeyStore and lib-dataprotect for 23+ * only on Nightly/Debug for now, otherwise simply stored. * See https://github.com/mozilla-mobile/fenix/issues/8324 + * Also, this needs revision. See https://github.com/mozilla-mobile/fenix/issues/19155 */ private fun getSecureAbove22Preferences() = SecureAbove22Preferences( @@ -398,6 +399,9 @@ class Core( forceInsecure = !Config.channel.isNightlyOrDebug ) + // Temporary. See https://github.com/mozilla-mobile/fenix/issues/19155 + private val lazySecurePrefs = lazyMonitored { getSecureAbove22Preferences() } + private val passwordsEncryptionKey by lazyMonitored { getSecureAbove22Preferences().getString(PASSWORDS_KEY) ?: generateEncryptionKey(KEY_STRENGTH).also { diff --git a/app/src/main/java/org/mozilla/fenix/settings/creditcards/CreditCardEditorFragment.kt b/app/src/main/java/org/mozilla/fenix/settings/creditcards/CreditCardEditorFragment.kt index 91b9ac8ce..6d6bc52e0 100644 --- a/app/src/main/java/org/mozilla/fenix/settings/creditcards/CreditCardEditorFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/settings/creditcards/CreditCardEditorFragment.kt @@ -14,6 +14,8 @@ import androidx.lifecycle.lifecycleScope import androidx.navigation.fragment.findNavController import androidx.navigation.fragment.navArgs import kotlinx.android.synthetic.main.fragment_credit_card_editor.* +import mozilla.components.concept.storage.CreditCardNumber +import mozilla.components.concept.storage.NewCreditCardFields import mozilla.components.concept.storage.UpdatableCreditCardFields import mozilla.components.support.ktx.android.view.hideKeyboard import org.mozilla.fenix.R @@ -69,6 +71,7 @@ class CreditCardEditorFragment : Fragment(R.layout.fragment_credit_card_editor) menu.findItem(R.id.delete_credit_card_button).isVisible = isEditing } + @Suppress("MagicNumber") override fun onOptionsItemSelected(item: MenuItem): Boolean = when (item.itemId) { R.id.delete_credit_card_button -> { args.creditCard?.let { interactor.onDeleteCardButtonClicked(it.guid) } @@ -78,18 +81,30 @@ class CreditCardEditorFragment : Fragment(R.layout.fragment_credit_card_editor) view?.hideKeyboard() val creditCard = args.creditCard - val creditCardFields = UpdatableCreditCardFields( - billingName = name_on_card_input.text.toString(), - cardNumber = card_number_input.text.toString(), - expiryMonth = (expiry_month_drop_down.selectedItemPosition + 1).toLong(), - expiryYear = expiry_year_drop_down.selectedItem.toString().toLong(), - cardType = CARD_TYPE_PLACEHOLDER - ) + + // TODO need to know if we're updating a number, or just round-tripping it + val cardNumber = card_number_input.text.toString() if (creditCard != null) { - interactor.onUpdateCreditCard(creditCard.guid, creditCardFields) + val fields = UpdatableCreditCardFields( + billingName = name_on_card_input.text.toString(), + cardNumber = CreditCardNumber.Plaintext(cardNumber), + cardNumberLast4 = cardNumber.substring(cardNumber.length - 5, cardNumber.length - 1), + expiryMonth = (expiry_month_drop_down.selectedItemPosition + 1).toLong(), + expiryYear = expiry_year_drop_down.selectedItem.toString().toLong(), + cardType = CARD_TYPE_PLACEHOLDER + ) + interactor.onUpdateCreditCard(creditCard.guid, fields) } else { - interactor.onSaveCreditCard(creditCardFields) + val fields = NewCreditCardFields( + billingName = name_on_card_input.text.toString(), + plaintextCardNumber = CreditCardNumber.Plaintext(cardNumber), + cardNumberLast4 = cardNumber.substring(cardNumber.length - 5, cardNumber.length - 1), + expiryMonth = (expiry_month_drop_down.selectedItemPosition + 1).toLong(), + expiryYear = expiry_year_drop_down.selectedItem.toString().toLong(), + cardType = CARD_TYPE_PLACEHOLDER + ) + interactor.onSaveCreditCard(fields) } true diff --git a/app/src/main/java/org/mozilla/fenix/settings/creditcards/CreditCardEditorState.kt b/app/src/main/java/org/mozilla/fenix/settings/creditcards/CreditCardEditorState.kt index ed9c62747..09dd9ab35 100644 --- a/app/src/main/java/org/mozilla/fenix/settings/creditcards/CreditCardEditorState.kt +++ b/app/src/main/java/org/mozilla/fenix/settings/creditcards/CreditCardEditorState.kt @@ -37,7 +37,8 @@ fun CreditCard.toCreditCardEditorState(): CreditCardEditorState { return CreditCardEditorState( guid = guid, billingName = billingName, - cardNumber = cardNumber, + // TODO - need to represented a full CreditCardNumber object here, along with last4 + cardNumber = encryptedCardNumber.number, expiryMonth = expiryMonth.toInt(), expiryYears = Pair(startYear, endYear), isEditing = true diff --git a/app/src/main/java/org/mozilla/fenix/settings/creditcards/controller/CreditCardEditorController.kt b/app/src/main/java/org/mozilla/fenix/settings/creditcards/controller/CreditCardEditorController.kt index bfa6ca66b..18fae576e 100644 --- a/app/src/main/java/org/mozilla/fenix/settings/creditcards/controller/CreditCardEditorController.kt +++ b/app/src/main/java/org/mozilla/fenix/settings/creditcards/controller/CreditCardEditorController.kt @@ -9,6 +9,7 @@ import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch +import mozilla.components.concept.storage.NewCreditCardFields import mozilla.components.concept.storage.UpdatableCreditCardFields import mozilla.components.service.sync.autofill.AutofillCreditCardsAddressesStorage import org.mozilla.fenix.settings.creditcards.CreditCardEditorFragment @@ -33,7 +34,7 @@ interface CreditCardEditorController { /** * @see [CreditCardEditorInteractor.onSaveCreditCard] */ - fun handleSaveCreditCard(creditCardFields: UpdatableCreditCardFields) + fun handleSaveCreditCard(creditCardFields: NewCreditCardFields) /** * @see [CreditCardEditorInteractor.onUpdateCreditCard] @@ -71,7 +72,7 @@ class DefaultCreditCardEditorController( } } - override fun handleSaveCreditCard(creditCardFields: UpdatableCreditCardFields) { + override fun handleSaveCreditCard(creditCardFields: NewCreditCardFields) { lifecycleScope.launch(ioDispatcher) { storage.addCreditCard(creditCardFields) diff --git a/app/src/main/java/org/mozilla/fenix/settings/creditcards/interactor/CreditCardEditorInteractor.kt b/app/src/main/java/org/mozilla/fenix/settings/creditcards/interactor/CreditCardEditorInteractor.kt index 2633c57fe..9a4a3b1bc 100644 --- a/app/src/main/java/org/mozilla/fenix/settings/creditcards/interactor/CreditCardEditorInteractor.kt +++ b/app/src/main/java/org/mozilla/fenix/settings/creditcards/interactor/CreditCardEditorInteractor.kt @@ -4,6 +4,7 @@ package org.mozilla.fenix.settings.creditcards.interactor +import mozilla.components.concept.storage.NewCreditCardFields import mozilla.components.concept.storage.UpdatableCreditCardFields import org.mozilla.fenix.settings.creditcards.controller.CreditCardEditorController @@ -30,9 +31,9 @@ interface CreditCardEditorInteractor { * Saves the provided credit card field into the credit card storage. Called when a user * taps on the save menu item or "Save" button. * - * @param creditCardFields A [UpdatableCreditCardFields] record to add. + * @param creditCardFields A [NewCreditCardFields] record to add. */ - fun onSaveCreditCard(creditCardFields: UpdatableCreditCardFields) + fun onSaveCreditCard(creditCardFields: NewCreditCardFields) /** * Updates the provided credit card with the new credit card fields. Called when a user @@ -62,7 +63,7 @@ class DefaultCreditCardEditorInteractor( controller.handleDeleteCreditCard(guid) } - override fun onSaveCreditCard(creditCardFields: UpdatableCreditCardFields) { + override fun onSaveCreditCard(creditCardFields: NewCreditCardFields) { controller.handleSaveCreditCard(creditCardFields) } diff --git a/app/src/main/java/org/mozilla/fenix/settings/creditcards/view/CreditCardEditorView.kt b/app/src/main/java/org/mozilla/fenix/settings/creditcards/view/CreditCardEditorView.kt index adf19410c..363e50bc9 100644 --- a/app/src/main/java/org/mozilla/fenix/settings/creditcards/view/CreditCardEditorView.kt +++ b/app/src/main/java/org/mozilla/fenix/settings/creditcards/view/CreditCardEditorView.kt @@ -9,6 +9,8 @@ import android.view.View import android.widget.ArrayAdapter import kotlinx.android.extensions.LayoutContainer import kotlinx.android.synthetic.main.fragment_credit_card_editor.* +import mozilla.components.concept.storage.CreditCardNumber +import mozilla.components.concept.storage.NewCreditCardFields import mozilla.components.concept.storage.UpdatableCreditCardFields import mozilla.components.support.ktx.android.view.hideKeyboard import org.mozilla.fenix.ext.toEditable @@ -30,6 +32,7 @@ class CreditCardEditorView( /** * Binds the given [CreditCardEditorState] in the [CreditCardEditorFragment]. */ + @Suppress("MagicNumber") fun bind(state: CreditCardEditorState) { if (state.isEditing) { delete_button.apply { @@ -48,18 +51,29 @@ class CreditCardEditorView( save_button.setOnClickListener { containerView.hideKeyboard() - val creditCardFields = UpdatableCreditCardFields( - billingName = name_on_card_input.text.toString(), - cardNumber = card_number_input.text.toString(), - expiryMonth = (expiry_month_drop_down.selectedItemPosition + 1).toLong(), - expiryYear = expiry_year_drop_down.selectedItem.toString().toLong(), - cardType = CARD_TYPE_PLACEHOLDER - ) - + // TODO same as in the corresponding fragment, plaintext number if it's being updated or + // round-tripped otherwise. Also, why is there so much duplication? + val cardNumber = card_number_input.text.toString() if (state.isEditing) { - interactor.onUpdateCreditCard(state.guid, creditCardFields) + val fields = UpdatableCreditCardFields( + billingName = name_on_card_input.text.toString(), + cardNumber = CreditCardNumber.Encrypted(cardNumber), + cardNumberLast4 = cardNumber.substring(cardNumber.length - 4), + expiryMonth = (expiry_month_drop_down.selectedItemPosition + 1).toLong(), + expiryYear = expiry_year_drop_down.selectedItem.toString().toLong(), + cardType = CARD_TYPE_PLACEHOLDER + ) + interactor.onUpdateCreditCard(state.guid, fields) } else { - interactor.onSaveCreditCard(creditCardFields) + val fields = NewCreditCardFields( + billingName = name_on_card_input.text.toString(), + plaintextCardNumber = CreditCardNumber.Plaintext(cardNumber), + cardNumberLast4 = cardNumber.substring(cardNumber.length - 4), + expiryMonth = (expiry_month_drop_down.selectedItemPosition + 1).toLong(), + expiryYear = expiry_year_drop_down.selectedItem.toString().toLong(), + cardType = CARD_TYPE_PLACEHOLDER + ) + interactor.onSaveCreditCard(fields) } } diff --git a/app/src/main/java/org/mozilla/fenix/settings/creditcards/view/CreditCardItemViewHolder.kt b/app/src/main/java/org/mozilla/fenix/settings/creditcards/view/CreditCardItemViewHolder.kt index b5d18ebe0..7f91398a8 100644 --- a/app/src/main/java/org/mozilla/fenix/settings/creditcards/view/CreditCardItemViewHolder.kt +++ b/app/src/main/java/org/mozilla/fenix/settings/creditcards/view/CreditCardItemViewHolder.kt @@ -23,7 +23,9 @@ class CreditCardItemViewHolder( ) : ViewHolder(view) { fun bind(creditCard: CreditCard) { - credit_card_number.text = creditCard.cardNumber + // TODO this should be last4 instead... + // and option to explicitly decrypt if necessary to show full number + credit_card_number.text = creditCard.encryptedCardNumber.number bindCreditCardExpiryDate(creditCard) diff --git a/app/src/test/java/org/mozilla/fenix/settings/creditcards/CreditCardEditorStateTest.kt b/app/src/test/java/org/mozilla/fenix/settings/creditcards/CreditCardEditorStateTest.kt index 7e5e4b68b..bf583b15f 100644 --- a/app/src/test/java/org/mozilla/fenix/settings/creditcards/CreditCardEditorStateTest.kt +++ b/app/src/test/java/org/mozilla/fenix/settings/creditcards/CreditCardEditorStateTest.kt @@ -5,6 +5,7 @@ package org.mozilla.fenix.settings.creditcards import mozilla.components.concept.storage.CreditCard +import mozilla.components.concept.storage.CreditCardNumber import org.junit.Assert.assertEquals import org.junit.Assert.assertFalse import org.junit.Assert.assertTrue @@ -17,7 +18,8 @@ class CreditCardEditorStateTest { private val creditCard = CreditCard( guid = "id", billingName = "Banana Apple", - cardNumber = "4111111111111110", + encryptedCardNumber = CreditCardNumber.Encrypted("4111111111111110"), + cardNumberLast4 = "1110", expiryMonth = 5, expiryYear = 2030, cardType = "amex", @@ -36,7 +38,7 @@ class CreditCardEditorStateTest { with(state) { assertEquals(creditCard.guid, guid) assertEquals(creditCard.billingName, billingName) - assertEquals(creditCard.cardNumber, cardNumber) + assertEquals(creditCard.encryptedCardNumber.number, cardNumber) assertEquals(creditCard.expiryMonth.toInt(), expiryMonth) assertEquals(Pair(startYear, endYear), expiryYears) assertTrue(isEditing) diff --git a/app/src/test/java/org/mozilla/fenix/settings/creditcards/CreditCardEditorViewTest.kt b/app/src/test/java/org/mozilla/fenix/settings/creditcards/CreditCardEditorViewTest.kt index 9e97a96f7..5d65554eb 100644 --- a/app/src/test/java/org/mozilla/fenix/settings/creditcards/CreditCardEditorViewTest.kt +++ b/app/src/test/java/org/mozilla/fenix/settings/creditcards/CreditCardEditorViewTest.kt @@ -10,6 +10,8 @@ import io.mockk.mockk import io.mockk.verify import kotlinx.android.synthetic.main.fragment_credit_card_editor.view.* import mozilla.components.concept.storage.CreditCard +import mozilla.components.concept.storage.CreditCardNumber +import mozilla.components.concept.storage.NewCreditCardFields import mozilla.components.concept.storage.UpdatableCreditCardFields import mozilla.components.support.test.robolectric.testContext import org.junit.Assert.assertEquals @@ -35,7 +37,8 @@ class CreditCardEditorViewTest { private val creditCard = CreditCard( guid = "id", billingName = "Banana Apple", - cardNumber = "4111111111111110", + encryptedCardNumber = CreditCardNumber.Encrypted("4111111111111110"), + cardNumberLast4 = "1110", expiryMonth = 5, expiryYear = 2030, cardType = "amex", @@ -83,7 +86,7 @@ class CreditCardEditorViewTest { fun `GIVEN a credit card THEN credit card form inputs are displaying the provided credit card information`() { creditCardEditorView.bind(creditCard.toCreditCardEditorState()) - assertEquals(creditCard.cardNumber, view.card_number_input.text.toString()) + assertEquals(creditCard.encryptedCardNumber.number, view.card_number_input.text.toString()) assertEquals(creditCard.billingName, view.name_on_card_input.text.toString()) with(view.expiry_month_drop_down) { @@ -139,9 +142,10 @@ class CreditCardEditorViewTest { verify { interactor.onSaveCreditCard( - UpdatableCreditCardFields( + NewCreditCardFields( billingName = billingName, - cardNumber = cardNumber, + plaintextCardNumber = CreditCardNumber.Plaintext(cardNumber), + cardNumberLast4 = "1110", expiryMonth = expiryMonth.toLong(), expiryYear = expiryYear.toLong(), cardType = CARD_TYPE_PLACEHOLDER @@ -161,7 +165,8 @@ class CreditCardEditorViewTest { guid = creditCard.guid, creditCardFields = UpdatableCreditCardFields( billingName = creditCard.billingName, - cardNumber = creditCard.cardNumber, + cardNumber = creditCard.encryptedCardNumber, + cardNumberLast4 = creditCard.cardNumberLast4, expiryMonth = creditCard.expiryMonth, expiryYear = creditCard.expiryYear, cardType = CARD_TYPE_PLACEHOLDER diff --git a/app/src/test/java/org/mozilla/fenix/settings/creditcards/CreditCardItemViewHolderTest.kt b/app/src/test/java/org/mozilla/fenix/settings/creditcards/CreditCardItemViewHolderTest.kt index 81c6077ab..0940e5659 100644 --- a/app/src/test/java/org/mozilla/fenix/settings/creditcards/CreditCardItemViewHolderTest.kt +++ b/app/src/test/java/org/mozilla/fenix/settings/creditcards/CreditCardItemViewHolderTest.kt @@ -10,6 +10,7 @@ import io.mockk.mockk import io.mockk.verify import kotlinx.android.synthetic.main.credit_card_list_item.view.* import mozilla.components.concept.storage.CreditCard +import mozilla.components.concept.storage.CreditCardNumber import mozilla.components.support.test.robolectric.testContext import org.junit.Assert.assertEquals import org.junit.Before @@ -28,7 +29,8 @@ class CreditCardItemViewHolderTest { private val creditCard = CreditCard( guid = "id", billingName = "Banana Apple", - cardNumber = "4111111111111110", + encryptedCardNumber = CreditCardNumber.Encrypted("4111111111111110"), + cardNumberLast4 = "1110", expiryMonth = 1, expiryYear = 2030, cardType = "amex", @@ -48,7 +50,7 @@ class CreditCardItemViewHolderTest { fun `GIVEN a new credit card item on bind THEN set the card number and expiry date text`() { CreditCardItemViewHolder(view, interactor).bind(creditCard) - assertEquals(creditCard.cardNumber, view.credit_card_number.text) + assertEquals(creditCard.encryptedCardNumber.number, view.credit_card_number.text) assertEquals("0${creditCard.expiryMonth}/${creditCard.expiryYear}", view.expiry_date.text) } diff --git a/app/src/test/java/org/mozilla/fenix/settings/creditcards/CreditCardsAdapterTest.kt b/app/src/test/java/org/mozilla/fenix/settings/creditcards/CreditCardsAdapterTest.kt index 001701e97..f68bca7df 100644 --- a/app/src/test/java/org/mozilla/fenix/settings/creditcards/CreditCardsAdapterTest.kt +++ b/app/src/test/java/org/mozilla/fenix/settings/creditcards/CreditCardsAdapterTest.kt @@ -5,6 +5,7 @@ package org.mozilla.fenix.settings.creditcards import mozilla.components.concept.storage.CreditCard +import mozilla.components.concept.storage.CreditCardNumber import org.junit.Assert.assertFalse import org.junit.Assert.assertTrue import org.junit.Test @@ -17,7 +18,8 @@ class CreditCardsAdapterTest { val creditCard1 = CreditCard( guid = "id", billingName = "Banana Apple", - cardNumber = "4111111111111110", + encryptedCardNumber = CreditCardNumber.Encrypted("4111111111111110"), + cardNumberLast4 = "1110", expiryMonth = 1, expiryYear = 2030, cardType = "amex", @@ -29,7 +31,8 @@ class CreditCardsAdapterTest { val creditCard2 = CreditCard( guid = "id", billingName = "Banana Apple", - cardNumber = "4111111111111110", + encryptedCardNumber = CreditCardNumber.Encrypted("4111111111111110"), + cardNumberLast4 = "1110", expiryMonth = 1, expiryYear = 2030, cardType = "amex", @@ -49,7 +52,8 @@ class CreditCardsAdapterTest { val creditCard3 = CreditCard( guid = "id3", billingName = "Banana Apple", - cardNumber = "4111111111111110", + encryptedCardNumber = CreditCardNumber.Encrypted("4111111111111110"), + cardNumberLast4 = "1110", expiryMonth = 1, expiryYear = 2030, cardType = "amex", diff --git a/app/src/test/java/org/mozilla/fenix/settings/creditcards/DefaultCreditCardEditorControllerTest.kt b/app/src/test/java/org/mozilla/fenix/settings/creditcards/DefaultCreditCardEditorControllerTest.kt index 3b32f1609..d0844d93a 100644 --- a/app/src/test/java/org/mozilla/fenix/settings/creditcards/DefaultCreditCardEditorControllerTest.kt +++ b/app/src/test/java/org/mozilla/fenix/settings/creditcards/DefaultCreditCardEditorControllerTest.kt @@ -13,7 +13,8 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.TestCoroutineDispatcher import kotlinx.coroutines.test.TestCoroutineScope import kotlinx.coroutines.test.runBlockingTest -import mozilla.components.concept.storage.CreditCard +import mozilla.components.concept.storage.CreditCardNumber +import mozilla.components.concept.storage.NewCreditCardFields import mozilla.components.concept.storage.UpdatableCreditCardFields import mozilla.components.service.sync.autofill.AutofillCreditCardsAddressesStorage import mozilla.components.support.test.rule.MainCoroutineRule @@ -66,32 +67,22 @@ class DefaultCreditCardEditorControllerTest { @Test fun handleDeleteCreditCard() = testCoroutineScope.runBlockingTest { - val creditCard = CreditCard( - guid = "id", - billingName = "Banana Apple", - cardNumber = "4111111111111110", - expiryMonth = 1, - expiryYear = 2030, - cardType = "amex", - timeCreated = 1L, - timeLastUsed = 1L, - timeLastModified = 1L, - timesUsed = 1L - ) + val creditCardId = "id" - controller.handleDeleteCreditCard(creditCard.guid) + controller.handleDeleteCreditCard(creditCardId) coVerify { - storage.deleteCreditCard(creditCard.guid) + storage.deleteCreditCard(creditCardId) navController.popBackStack() } } @Test fun handleSaveCreditCard() = testCoroutineScope.runBlockingTest { - val creditCardFields = UpdatableCreditCardFields( + val creditCardFields = NewCreditCardFields( billingName = "Banana Apple", - cardNumber = "4111111111111112", + plaintextCardNumber = CreditCardNumber.Plaintext("4111111111111112"), + cardNumberLast4 = "1112", expiryMonth = 1, expiryYear = 2030, cardType = "discover" @@ -107,30 +98,20 @@ class DefaultCreditCardEditorControllerTest { @Test fun handleUpdateCreditCard() = testCoroutineScope.runBlockingTest { - val creditCard = CreditCard( - guid = "id", - billingName = "Banana Apple", - cardNumber = "4111111111111110", - expiryMonth = 1, - expiryYear = 2030, - cardType = "amex", - timeCreated = 1L, - timeLastUsed = 1L, - timeLastModified = 1L, - timesUsed = 1L - ) + val creditCardId = "id" val creditCardFields = UpdatableCreditCardFields( billingName = "Banana Apple", - cardNumber = "4111111111111112", + cardNumber = CreditCardNumber.Plaintext("4111111111111112"), + cardNumberLast4 = "1112", expiryMonth = 1, expiryYear = 2034, cardType = "discover" ) - controller.handleUpdateCreditCard(creditCard.guid, creditCardFields) + controller.handleUpdateCreditCard(creditCardId, creditCardFields) coVerify { - storage.updateCreditCard(creditCard.guid, creditCardFields) + storage.updateCreditCard(creditCardId, creditCardFields) navController.popBackStack() } } diff --git a/app/src/test/java/org/mozilla/fenix/settings/creditcards/DefaultCreditCardEditorInteractorTest.kt b/app/src/test/java/org/mozilla/fenix/settings/creditcards/DefaultCreditCardEditorInteractorTest.kt index e987988ce..890dbbad0 100644 --- a/app/src/test/java/org/mozilla/fenix/settings/creditcards/DefaultCreditCardEditorInteractorTest.kt +++ b/app/src/test/java/org/mozilla/fenix/settings/creditcards/DefaultCreditCardEditorInteractorTest.kt @@ -7,6 +7,8 @@ package org.mozilla.fenix.settings.creditcards import io.mockk.mockk import io.mockk.verify import mozilla.components.concept.storage.CreditCard +import mozilla.components.concept.storage.CreditCardNumber +import mozilla.components.concept.storage.NewCreditCardFields import mozilla.components.concept.storage.UpdatableCreditCardFields import org.junit.Before import org.junit.Test @@ -35,7 +37,8 @@ class DefaultCreditCardEditorInteractorTest { val creditCard = CreditCard( guid = "id", billingName = "Banana Apple", - cardNumber = "4111111111111110", + encryptedCardNumber = CreditCardNumber.Encrypted("4111111111111110"), + cardNumberLast4 = "1110", expiryMonth = 1, expiryYear = 2030, cardType = "amex", @@ -50,9 +53,10 @@ class DefaultCreditCardEditorInteractorTest { @Test fun onSaveButtonClicked() { - val creditCardFields = UpdatableCreditCardFields( + val creditCardFields = NewCreditCardFields( billingName = "Banana Apple", - cardNumber = "4111111111111112", + plaintextCardNumber = CreditCardNumber.Plaintext("4111111111111112"), + cardNumberLast4 = "1112", expiryMonth = 1, expiryYear = 2030, cardType = "discover" @@ -66,7 +70,8 @@ class DefaultCreditCardEditorInteractorTest { val guid = "id" val creditCardFields = UpdatableCreditCardFields( billingName = "Banana Apple", - cardNumber = "4111111111111112", + cardNumber = CreditCardNumber.Encrypted("4111111111111112"), + cardNumberLast4 = "1112", expiryMonth = 1, expiryYear = 2034, cardType = "discover" diff --git a/app/src/test/java/org/mozilla/fenix/settings/creditcards/DefaultCreditCardsManagementControllerTest.kt b/app/src/test/java/org/mozilla/fenix/settings/creditcards/DefaultCreditCardsManagementControllerTest.kt index e261741d1..6ca354e4e 100644 --- a/app/src/test/java/org/mozilla/fenix/settings/creditcards/DefaultCreditCardsManagementControllerTest.kt +++ b/app/src/test/java/org/mozilla/fenix/settings/creditcards/DefaultCreditCardsManagementControllerTest.kt @@ -9,6 +9,7 @@ import io.mockk.mockk import io.mockk.spyk import io.mockk.verify import mozilla.components.concept.storage.CreditCard +import mozilla.components.concept.storage.CreditCardNumber import org.junit.Before import org.junit.Rule import org.junit.Test @@ -38,8 +39,9 @@ class DefaultCreditCardsManagementControllerTest { val creditCard = CreditCard( guid = "id", billingName = "Banana Apple", - cardNumber = "4111111111111110", expiryMonth = 1, + encryptedCardNumber = CreditCardNumber.Encrypted("4111111111111110"), + cardNumberLast4 = "1110", expiryYear = 2030, cardType = "amex", timeCreated = 1L, From 883cb7c73069b02570ac4a179fc6ed468be4e788 Mon Sep 17 00:00:00 2001 From: MickeyMoz Date: Mon, 26 Apr 2021 09:23:30 +0000 Subject: [PATCH 035/256] Update Android Components version to 90.0.20210424190049. --- buildSrc/src/main/java/AndroidComponents.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/java/AndroidComponents.kt b/buildSrc/src/main/java/AndroidComponents.kt index 9fa55bc76..6ec9f6f78 100644 --- a/buildSrc/src/main/java/AndroidComponents.kt +++ b/buildSrc/src/main/java/AndroidComponents.kt @@ -3,5 +3,5 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ object AndroidComponents { - const val VERSION = "90.0.20210422163756" + const val VERSION = "90.0.20210424190049" } From 7d690219ea44cd1fd71ec8970f08da40ac316f52 Mon Sep 17 00:00:00 2001 From: Sebastian Kaspari Date: Thu, 22 Apr 2021 11:38:03 +0200 Subject: [PATCH 036/256] Issue #19040: Remove Leanplum (Nightly) --- .gitignore | 1 - README.md | 1 - app/build.gradle | 22 - .../java/org/mozilla/fenix/HomeActivity.kt | 2 - .../org/mozilla/fenix/components/Analytics.kt | 4 - .../fenix/components/BackgroundServices.kt | 5 - .../metrics/LeanplumMetricsService.kt | 247 ------------ .../components/metrics/MetricController.kt | 3 - .../home/intent/DeepLinkIntentProcessor.kt | 176 -------- .../mozilla/fenix/push/FirebasePushService.kt | 56 +-- .../push/LeanplumNotificationCustomizer.kt | 31 -- .../settings/SecretDebugSettingsFragment.kt | 21 - .../java/org/mozilla/fenix/utils/Settings.kt | 5 - app/src/main/res/values/preference_keys.xml | 3 - app/src/main/res/values/static_strings.xml | 2 - .../xml/secret_info_settings_preferences.xml | 12 - .../components/BackgroundServicesTest.kt | 10 - .../intent/DeepLinkIntentProcessorTest.kt | 302 -------------- .../LeanplumNotificationCustomizerTest.kt | 34 -- build.gradle | 12 - buildSrc/src/main/java/Dependencies.kt | 4 - docs/mma.md | 376 ------------------ docs/telemetry.md | 5 +- .../fenix_taskgraph/transforms/build.py | 2 - .../toolchain/android-gradle-dependencies.sh | 2 +- .../android-gradle-dependencies/after.sh | 1 - .../android-gradle-dependencies/nexus.xml | 31 -- 27 files changed, 4 insertions(+), 1366 deletions(-) delete mode 100644 app/src/main/java/org/mozilla/fenix/components/metrics/LeanplumMetricsService.kt delete mode 100644 app/src/main/java/org/mozilla/fenix/home/intent/DeepLinkIntentProcessor.kt delete mode 100644 app/src/main/java/org/mozilla/fenix/push/LeanplumNotificationCustomizer.kt delete mode 100644 app/src/test/java/org/mozilla/fenix/home/intent/DeepLinkIntentProcessorTest.kt delete mode 100644 app/src/test/java/org/mozilla/fenix/push/LeanplumNotificationCustomizerTest.kt delete mode 100644 docs/mma.md diff --git a/.gitignore b/.gitignore index 67abe8cc2..cd0e1c137 100644 --- a/.gitignore +++ b/.gitignore @@ -80,7 +80,6 @@ gen-external-apklibs .DS_Store # Secrets files, e.g. tokens -.leanplum_token .adjust_token .sentry_token .mls_token diff --git a/README.md b/README.md index 9d87ae0c5..f032c106c 100644 --- a/README.md +++ b/README.md @@ -120,7 +120,6 @@ Before you can install any release builds, **You will need to sign production bu Some features are disabled by default when Fenix is built locally. This can be problematic at times for checking performance since you might want to know how your code behaves with those features. The known features that are disabled by default are: - Sentry -- Leanplum - Adjust - Mozilla Location Services (also known as MLS) - Firebase Push Services diff --git a/app/build.gradle b/app/build.gradle index c4e577481..1275b8e7a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -309,25 +309,6 @@ android.applicationVariants.all { variant -> println("--") } -// ------------------------------------------------------------------------------------------------- -// Leanplum: Read token from local file if it exists -// ------------------------------------------------------------------------------------------------- - - print("Leanplum token: ") - - try { - def parts = new File("${rootDir}/.leanplum_token").text.trim().split(":") - def id = parts[0] - def key = parts[1] - buildConfigField 'String', 'LEANPLUM_ID', '"' + id + '"' - buildConfigField 'String', 'LEANPLUM_TOKEN', '"' + key + '"' - println "(Added from .leanplum_token file)" - } catch (FileNotFoundException ignored) { - buildConfigField 'String', 'LEANPLUM_ID', 'null' - buildConfigField 'String', 'LEANPLUM_TOKEN', 'null' - println("X_X") - } - // ------------------------------------------------------------------------------------------------- // MLS: Read token from local file if it exists // ------------------------------------------------------------------------------------------------- @@ -424,9 +405,6 @@ dependencies { implementation Deps.sentry - implementation Deps.leanplum_core - implementation Deps.leanplum_fcm - implementation Deps.mozilla_concept_base implementation Deps.mozilla_concept_engine implementation Deps.mozilla_concept_menu diff --git a/app/src/main/java/org/mozilla/fenix/HomeActivity.kt b/app/src/main/java/org/mozilla/fenix/HomeActivity.kt index 6abc90fad..b47c12654 100644 --- a/app/src/main/java/org/mozilla/fenix/HomeActivity.kt +++ b/app/src/main/java/org/mozilla/fenix/HomeActivity.kt @@ -85,7 +85,6 @@ import org.mozilla.fenix.ext.nav import org.mozilla.fenix.ext.settings import org.mozilla.fenix.home.HomeFragmentDirections import org.mozilla.fenix.home.intent.CrashReporterIntentProcessor -import org.mozilla.fenix.home.intent.DeepLinkIntentProcessor import org.mozilla.fenix.home.intent.OpenBrowserIntentProcessor import org.mozilla.fenix.home.intent.OpenSpecificTabIntentProcessor import org.mozilla.fenix.home.intent.SpeechProcessingIntentProcessor @@ -158,7 +157,6 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity { listOf( SpeechProcessingIntentProcessor(this, components.core.store, components.analytics.metrics), StartSearchIntentProcessor(components.analytics.metrics), - DeepLinkIntentProcessor(this, components.analytics.leanplumMetricsService), OpenBrowserIntentProcessor(this, ::getIntentSessionId), OpenSpecificTabIntentProcessor(this) ) diff --git a/app/src/main/java/org/mozilla/fenix/components/Analytics.kt b/app/src/main/java/org/mozilla/fenix/components/Analytics.kt index 0ebcced02..31beb0fa3 100644 --- a/app/src/main/java/org/mozilla/fenix/components/Analytics.kt +++ b/app/src/main/java/org/mozilla/fenix/components/Analytics.kt @@ -23,7 +23,6 @@ import org.mozilla.fenix.R import org.mozilla.fenix.ReleaseChannel import org.mozilla.fenix.components.metrics.AdjustMetricsService import org.mozilla.fenix.components.metrics.GleanMetricsService -import org.mozilla.fenix.components.metrics.LeanplumMetricsService import org.mozilla.fenix.components.metrics.MetricController import org.mozilla.fenix.experiments.createNimbus import org.mozilla.fenix.ext.components @@ -90,13 +89,10 @@ class Analytics( ) } - val leanplumMetricsService by lazyMonitored { LeanplumMetricsService(context as Application) } - val metrics: MetricController by lazyMonitored { MetricController.create( listOf( GleanMetricsService(context, lazy { context.components.core.store }), - leanplumMetricsService, AdjustMetricsService(context as Application) ), isDataTelemetryEnabled = { context.settings().isTelemetryEnabled }, diff --git a/app/src/main/java/org/mozilla/fenix/components/BackgroundServices.kt b/app/src/main/java/org/mozilla/fenix/components/BackgroundServices.kt index b28b3b4dc..fabf86d62 100644 --- a/app/src/main/java/org/mozilla/fenix/components/BackgroundServices.kt +++ b/app/src/main/java/org/mozilla/fenix/components/BackgroundServices.kt @@ -216,14 +216,9 @@ internal class TelemetryAccountObserver( }?.let { metricController.track(it) } - - // Used by Leanplum as a context variable. - settings.fxaSignedIn = true } override fun onLoggedOut() { metricController.track(Event.SyncAuthSignOut) - // Used by Leanplum as a context variable. - settings.fxaSignedIn = false } } diff --git a/app/src/main/java/org/mozilla/fenix/components/metrics/LeanplumMetricsService.kt b/app/src/main/java/org/mozilla/fenix/components/metrics/LeanplumMetricsService.kt deleted file mode 100644 index 79526cd92..000000000 --- a/app/src/main/java/org/mozilla/fenix/components/metrics/LeanplumMetricsService.kt +++ /dev/null @@ -1,247 +0,0 @@ -/* 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/. */ - -package org.mozilla.fenix.components.metrics - -import android.app.Application -import android.net.Uri -import android.util.Log -import com.leanplum.Leanplum -import com.leanplum.LeanplumActivityHelper -import com.leanplum.annotations.Parser -import com.leanplum.internal.LeanplumInternal -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.Dispatchers.Main -import kotlinx.coroutines.Job -import kotlinx.coroutines.launch -import kotlinx.coroutines.withContext -import mozilla.components.support.locale.LocaleManager -import org.mozilla.fenix.BuildConfig -import org.mozilla.fenix.components.metrics.MozillaProductDetector.MozillaProducts -import org.mozilla.fenix.ext.settings -import org.mozilla.fenix.home.intent.DeepLinkIntentProcessor -import java.util.Locale -import java.util.MissingResourceException -import java.util.UUID.randomUUID - -private val Event.name: String? - get() = when (this) { - is Event.AddBookmark -> "E_Add_Bookmark" - is Event.RemoveBookmark -> "E_Remove_Bookmark" - is Event.OpenedBookmark -> "E_Opened_Bookmark" - is Event.OpenedApp -> "E_Opened_App" - is Event.OpenedAppFirstRun -> "E_Opened_App_FirstRun" - is Event.InteractWithSearchURLArea -> "E_Interact_With_Search_URL_Area" - is Event.CollectionSaved -> "E_Collection_Created" - is Event.CollectionTabRestored -> "E_Collection_Tab_Opened" - is Event.SyncAuthSignUp -> "E_FxA_New_Signup" - is Event.SyncAuthSignIn, Event.SyncAuthPaired, Event.SyncAuthOtherExternal -> "E_Sign_In_FxA" - is Event.SyncAuthFromSharedCopy, Event.SyncAuthFromSharedReuse -> "E_Sign_In_FxA_Fennec_to_Fenix" - is Event.SyncAuthSignOut -> "E_Sign_Out_FxA" - is Event.ClearedPrivateData -> "E_Cleared_Private_Data" - is Event.DismissedOnboarding -> "E_Dismissed_Onboarding" - is Event.FennecToFenixMigrated -> "E_Fennec_To_Fenix_Migrated" - is Event.AddonInstalled -> "E_Addon_Installed" - is Event.SearchWidgetInstalled -> "E_Search_Widget_Added" - is Event.ChangedToDefaultBrowser -> "E_Changed_Default_To_Fenix" - is Event.TrackingProtectionSettingChanged -> "E_Changed_ETP" - - // Do not track other events in Leanplum - else -> null - } - -class LeanplumMetricsService( - private val application: Application -) : MetricsService, DeepLinkIntentProcessor.DeepLinkVerifier { - val scope = CoroutineScope(Dispatchers.IO) - var leanplumJob: Job? = null - - data class Token(val id: String, val token: String) { - enum class Type { Development, Production, Invalid } - - val type by lazy { - when { - token.take(ProdPrefix.length) == ProdPrefix -> Type.Production - token.take(DevPrefix.length) == DevPrefix -> Type.Development - else -> Type.Invalid - } - } - - companion object { - private const val ProdPrefix = "prod" - private const val DevPrefix = "dev" - } - } - - override val type = MetricServiceType.Marketing - private val token = Token(LeanplumId, LeanplumToken) - - @Suppress("ComplexMethod") - override fun start() { - - if (!application.settings().isMarketingTelemetryEnabled) return - - Leanplum.setIsTestModeEnabled(false) - Leanplum.setApplicationContext(application) - Leanplum.setDeviceId(randomUUID().toString()) - Parser.parseVariables(application) - - leanplumJob = scope.launch { - - val applicationSetLocale = LocaleManager.getCurrentLocale(application) - val currentLocale = applicationSetLocale ?: Locale.getDefault() - val languageCode = - currentLocale.iso3LanguageOrNull - ?: currentLocale.language.let { - if (it.isNotBlank()) { - it - } else { - currentLocale.toString() - } - } - - if (!isLeanplumEnabled(languageCode)) { - Log.i(LOGTAG, "Leanplum is not available for this locale: $languageCode") - return@launch - } - - when (token.type) { - Token.Type.Production -> Leanplum.setAppIdForProductionMode(token.id, token.token) - Token.Type.Development -> Leanplum.setAppIdForDevelopmentMode(token.id, token.token) - Token.Type.Invalid -> { - Log.i(LOGTAG, "Invalid or missing Leanplum token") - return@launch - } - } - - LeanplumActivityHelper.enableLifecycleCallbacks(application) - - val installedApps = MozillaProductDetector.getInstalledMozillaProducts(application) - - val trackingProtection = application.settings().run { - when { - !shouldUseTrackingProtection -> "none" - useStandardTrackingProtection -> "standard" - useStrictTrackingProtection -> "strict" - else -> "custom" - } - } - - Leanplum.start( - application, hashMapOf( - "default_browser" to MozillaProductDetector.getMozillaBrowserDefault(application) - .orEmpty(), - "fennec_installed" to installedApps.contains(MozillaProducts.FIREFOX.productName), - "focus_installed" to installedApps.contains(MozillaProducts.FOCUS.productName), - "klar_installed" to installedApps.contains(MozillaProducts.KLAR.productName), - "fxa_signed_in" to application.settings().fxaSignedIn, - "fxa_has_synced_items" to application.settings().fxaHasSyncedItems, - "search_widget_installed" to application.settings().searchWidgetInstalled, - "tracking_protection_enabled" to application.settings().shouldUseTrackingProtection, - "tracking_protection_setting" to trackingProtection, - "fenix" to true - ) - ) - - withContext(Main) { - LeanplumInternal.setCalledStart(true) - LeanplumInternal.setHasStarted(true) - LeanplumInternal.setStartedInBackground(true) - Log.i(LOGTAG, "Started Leanplum with deviceId ${Leanplum.getDeviceId()}" + - " and userId ${Leanplum.getUserId()}") - } - } - } - - /** - * Verifies a deep link and returns `true` for deep links that should be handled and `false` if - * a deep link should be rejected. - * - * @See DeepLinkIntentProcessor.verifier - */ - override fun verifyDeepLink(deepLink: Uri): Boolean { - // We compare the local Leanplum device ID against the "uid" query parameter and only - // accept deep links where both values match. - val uid = deepLink.getQueryParameter("uid") - return uid == Leanplum.getDeviceId() - } - - override fun stop() { - if (application.settings().isMarketingTelemetryEnabled) return - // As written in LeanPlum SDK documentation, "This prevents Leanplum from communicating with the server." - // as this "isTestMode" flag is checked before LeanPlum SDK does anything. - // Also has the benefit effect of blocking the display of already downloaded messages. - // The reverse of this - setIsTestModeEnabled(false) must be called before trying to init - // LP in the same session. - Leanplum.setIsTestModeEnabled(true) - - // This is just to allow restarting LP and it's functionality in the same app session - // as LP stores it's state internally and check against it - LeanplumInternal.setCalledStart(false) - LeanplumInternal.setHasStarted(false) - leanplumJob?.cancel() - } - - override fun track(event: Event) { - val leanplumExtras = event.extras - ?.map { (key, value) -> key.toString() to value } - ?.toMap() - - event.name?.also { - Leanplum.track(it, leanplumExtras) - } - } - - override fun shouldTrack(event: Event): Boolean { - return application.settings().isTelemetryEnabled && - token.type != Token.Type.Invalid && !event.name.isNullOrEmpty() - } - - private fun isLeanplumEnabled(locale: String): Boolean { - return LEANPLUM_ENABLED_LOCALES.contains(locale) - } - - private val Locale.iso3LanguageOrNull: String? - get() = - try { - this.isO3Language - } catch (_: MissingResourceException) { - null - } - - companion object { - private const val LOGTAG = "LeanplumMetricsService" - - private val LeanplumId: String - // Debug builds have a null (nullable) LEANPLUM_ID - get() = BuildConfig.LEANPLUM_ID.orEmpty() - private val LeanplumToken: String - // Debug builds have a null (nullable) LEANPLUM_TOKEN - get() = BuildConfig.LEANPLUM_TOKEN.orEmpty() - - // Leanplum needs to be enabled for the following locales. - // Irrespective of the actual device location. - private val LEANPLUM_ENABLED_LOCALES = setOf( - "eng", // English - "zho", // Chinese - "deu", // German - "fra", // French - "ita", // Italian - "ind", // Indonesian - "por", // Portuguese - "spa", // Spanish; Castilian - "pol", // Polish - "rus", // Russian - "hin", // Hindi - "per", // Persian - "fas", // Persian - "ara", // Arabic - "jpn" // Japanese - ) - - private const val PREFERENCE_NAME = "LEANPLUM_PREFERENCES" - private const val DEVICE_ID_KEY = "LP_DEVICE_ID" - } -} diff --git a/app/src/main/java/org/mozilla/fenix/components/metrics/MetricController.kt b/app/src/main/java/org/mozilla/fenix/components/metrics/MetricController.kt index b27463267..f10182b46 100644 --- a/app/src/main/java/org/mozilla/fenix/components/metrics/MetricController.kt +++ b/app/src/main/java/org/mozilla/fenix/components/metrics/MetricController.kt @@ -5,7 +5,6 @@ package org.mozilla.fenix.components.metrics import androidx.annotation.VisibleForTesting -import com.leanplum.Leanplum import mozilla.components.browser.awesomebar.facts.BrowserAwesomeBarFacts import mozilla.components.browser.menu.facts.BrowserMenuFacts import mozilla.components.browser.toolbar.facts.ToolbarFacts @@ -218,7 +217,6 @@ internal class ReleaseMetricController( if (installedAddons is List<*>) { settings.installedAddonsCount = installedAddons.size settings.installedAddonsList = installedAddons.joinToString(",") - Leanplum.setUserAttributes(mapOf("installed_addons" to installedAddons.size)) } } @@ -226,7 +224,6 @@ internal class ReleaseMetricController( if (enabledAddons is List<*>) { settings.enabledAddonsCount = enabledAddons.size settings.enabledAddonsList = enabledAddons.joinToString() - Leanplum.setUserAttributes(mapOf("enabled_addons" to enabledAddons.size)) } } diff --git a/app/src/main/java/org/mozilla/fenix/home/intent/DeepLinkIntentProcessor.kt b/app/src/main/java/org/mozilla/fenix/home/intent/DeepLinkIntentProcessor.kt deleted file mode 100644 index ed2c38cf2..000000000 --- a/app/src/main/java/org/mozilla/fenix/home/intent/DeepLinkIntentProcessor.kt +++ /dev/null @@ -1,176 +0,0 @@ -/* 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/. */ - -package org.mozilla.fenix.home.intent - -import android.content.Context -import android.content.Intent -import android.net.Uri -import android.os.Build -import android.os.Build.VERSION.SDK_INT -import android.provider.Settings -import androidx.core.os.bundleOf -import androidx.navigation.NavController -import mozilla.components.concept.engine.EngineSession -import mozilla.components.support.base.log.logger.Logger -import org.mozilla.fenix.BrowserDirection -import org.mozilla.fenix.BuildConfig -import org.mozilla.fenix.GlobalDirections -import org.mozilla.fenix.HomeActivity -import org.mozilla.fenix.browser.browsingmode.BrowsingMode -import org.mozilla.fenix.components.SearchWidgetCreator -import org.mozilla.fenix.ext.alreadyOnDestination -import org.mozilla.fenix.ext.navigateBlockingForAsyncNavGraph -import org.mozilla.fenix.home.intent.DeepLinkIntentProcessor.DeepLinkVerifier -import org.mozilla.fenix.settings.SupportUtils - -/** - * Deep links in the form of `fenix://host` open different parts of the app. - * - * @param verifier [DeepLinkVerifier] that will be used to verify deep links before handling them. - */ -class DeepLinkIntentProcessor( - private val activity: HomeActivity, - private val verifier: DeepLinkVerifier -) : HomeIntentProcessor { - private val logger = Logger("DeepLinkIntentProcessor") - - override fun process(intent: Intent, navController: NavController, out: Intent): Boolean { - val scheme = intent.scheme?.equals(BuildConfig.DEEP_LINK_SCHEME, ignoreCase = true) ?: return false - return if (scheme) { - intent.data?.let { handleDeepLink(it, navController) } - true - } else { - false - } - } - - @Suppress("ComplexMethod") - private fun handleDeepLink(deepLink: Uri, navController: NavController) { - if (!verifier.verifyDeepLink(deepLink)) { - logger.warn("Invalid deep link: $deepLink") - return - } - - handleDeepLinkSideEffects(deepLink) - - val globalDirections = when (deepLink.host) { - "home", "enable_private_browsing" -> GlobalDirections.Home - "urls_bookmarks" -> GlobalDirections.Bookmarks - "urls_history" -> GlobalDirections.History - "settings" -> GlobalDirections.Settings - "turn_on_sync" -> GlobalDirections.Sync - "settings_search_engine" -> GlobalDirections.SearchEngine - "settings_accessibility" -> GlobalDirections.Accessibility - "settings_delete_browsing_data" -> GlobalDirections.DeleteData - "settings_addon_manager" -> GlobalDirections.SettingsAddonManager - "settings_logins" -> GlobalDirections.SettingsLogins - "settings_tracking_protection" -> GlobalDirections.SettingsTrackingProtection - // We'd like to highlight views within the fragment - // https://github.com/mozilla-mobile/fenix/issues/11856 - // The current version of UI has these features in more complex screens. - "settings_privacy" -> GlobalDirections.Settings - "home_collections" -> GlobalDirections.Home - - else -> return - } - - if (!navController.alreadyOnDestination(globalDirections.destinationId)) { - navController.navigateBlockingForAsyncNavGraph(globalDirections.navDirections) - } - } - - /** - * Handle links that require more than just simple navigation. - */ - private fun handleDeepLinkSideEffects(deepLink: Uri) { - when (deepLink.host) { - "enable_private_browsing" -> { - activity.browsingModeManager.mode = BrowsingMode.Private - } - "make_default_browser" -> { - if (SDK_INT >= Build.VERSION_CODES.N) { - val settingsIntent = Intent(Settings.ACTION_MANAGE_DEFAULT_APPS_SETTINGS) - settingsIntent.putExtra(SETTINGS_SELECT_OPTION_KEY, DEFAULT_BROWSER_APP_OPTION) - settingsIntent.putExtra(SETTINGS_SHOW_FRAGMENT_ARGS, - bundleOf(SETTINGS_SELECT_OPTION_KEY to DEFAULT_BROWSER_APP_OPTION)) - activity.startActivity(settingsIntent) - } else { - activity.openToBrowserAndLoad( - searchTermOrURL = SupportUtils.getSumoURLForTopic( - activity, - SupportUtils.SumoTopic.SET_AS_DEFAULT_BROWSER - ), - newTab = true, - from = BrowserDirection.FromGlobal, - flags = EngineSession.LoadUrlFlags.external() - ) - } - } - "open" -> { - val url = deepLink.getQueryParameter("url") - if (url == null || !url.startsWith("https://")) { - logger.info("Not opening deep link: $url") - return - } - - activity.openToBrowserAndLoad( - url, - newTab = true, - from = BrowserDirection.FromGlobal, - flags = EngineSession.LoadUrlFlags.external() - ) - } - "settings_notifications" -> { - val intent = notificationSettings(activity) - activity.startActivity(intent) - } - "install_search_widget" -> { - if (SDK_INT >= Build.VERSION_CODES.O) { - SearchWidgetCreator.createSearchWidget(activity) - } - } - } - } - - private fun notificationSettings(context: Context, channel: String? = null) = - Intent().apply { - when { - SDK_INT >= Build.VERSION_CODES.O -> { - action = channel?.let { - putExtra(Settings.EXTRA_CHANNEL_ID, it) - Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS - } ?: Settings.ACTION_APP_NOTIFICATION_SETTINGS - putExtra(Settings.EXTRA_APP_PACKAGE, context.packageName) - } - SDK_INT >= Build.VERSION_CODES.LOLLIPOP -> { - action = "android.settings.APP_NOTIFICATION_SETTINGS" - putExtra("app_package", context.packageName) - putExtra("app_uid", context.applicationInfo.uid) - } - else -> { - action = Settings.ACTION_APPLICATION_DETAILS_SETTINGS - addCategory(Intent.CATEGORY_DEFAULT) - data = Uri.parse("package:" + context.packageName) - } - } - } - - /** - * Interface for a class that verifies deep links before they get handled. - */ - interface DeepLinkVerifier { - /** - * Verifies the given deep link and returns `true` for verified deep links or `false` for - * rejected deep links. - */ - fun verifyDeepLink(deepLink: Uri): Boolean - } - - companion object { - private const val SETTINGS_SELECT_OPTION_KEY = ":settings:fragment_args_key" - private const val SETTINGS_SHOW_FRAGMENT_ARGS = ":settings:show_fragment_args" - private const val DEFAULT_BROWSER_APP_OPTION = "default_browser" - } -} diff --git a/app/src/main/java/org/mozilla/fenix/push/FirebasePushService.kt b/app/src/main/java/org/mozilla/fenix/push/FirebasePushService.kt index 7e03039f4..43c349491 100644 --- a/app/src/main/java/org/mozilla/fenix/push/FirebasePushService.kt +++ b/app/src/main/java/org/mozilla/fenix/push/FirebasePushService.kt @@ -5,64 +5,12 @@ package org.mozilla.fenix.push import android.annotation.SuppressLint -import com.google.firebase.messaging.RemoteMessage -import com.google.firebase.messaging.FirebaseMessagingService -import com.leanplum.LeanplumPushFirebaseMessagingService -import com.leanplum.LeanplumPushService -import mozilla.components.concept.push.PushService -import mozilla.components.lib.push.firebase.AbstractFirebasePushService import mozilla.components.feature.push.AutoPushFeature - -/** - * A wrapper class that only exists to delegate to [FirebaseMessagingService] instances. - * - * Implementation notes: - * - * This was a doozy... - * - * With Firebase Cloud Messaging, we've been given some tight constraints in order to get this to - * work: - * - We want to have multiple FCM message receivers for AutoPush and LeanPlum (for now), however - * there can only be one registered [FirebaseMessagingService] in the AndroidManifest. - * - The [LeanplumPushFirebaseMessagingService] does not function as expected unless it's the - * inherited service that receives the messages. - * - The [AutoPushService] is not strongly tied to being the inherited service, but the - * [AutoPushFeature] requires a reference to the push instance as a [PushService]. - * - * We tried creating an empty [FirebaseMessagingService] that can hold a list of the services - * for delegating, but the [LeanplumPushFirebaseMessagingService] tries to get a reference to the - * Application Context, however,since the FCM service runs in a background process that gives a - * nullptr. Within LeanPlum, this is something that is probably provided internally. - * - * We tried to pass in an instance of the [AbstractFirebasePushService] to [FirebasePushService] - * through the constructor and delegate the implementation of a [PushService] to that, but alas, - * the service requires you to have an empty default constructor in order for the OS to do the - * initialization. For this reason, we created a singleton instance of the AutoPush instance since - * that lets us easily delegate the implementation to that, as well as make invocations when FCM - * receives new messages. - */ -class FirebasePushService : LeanplumPushFirebaseMessagingService(), - PushService by AutoPushService { - - override fun onCreate() { - LeanplumPushService.setCustomizer(LeanplumNotificationCustomizer()) - super.onCreate() - } - - override fun onNewToken(newToken: String) { - AutoPushService.onNewToken(newToken) - super.onNewToken(newToken) - } - - override fun onMessageReceived(remoteMessage: RemoteMessage) { - AutoPushService.onMessageReceived(remoteMessage) - super.onMessageReceived(remoteMessage) - } -} +import mozilla.components.lib.push.firebase.AbstractFirebasePushService /** * A singleton instance of the FirebasePushService needed for communicating between FCM and the * [AutoPushFeature]. */ @SuppressLint("MissingFirebaseInstanceTokenRefresh") // Implemented internally. -object AutoPushService : AbstractFirebasePushService() +class FirebasePushService : AbstractFirebasePushService() diff --git a/app/src/main/java/org/mozilla/fenix/push/LeanplumNotificationCustomizer.kt b/app/src/main/java/org/mozilla/fenix/push/LeanplumNotificationCustomizer.kt deleted file mode 100644 index 476595151..000000000 --- a/app/src/main/java/org/mozilla/fenix/push/LeanplumNotificationCustomizer.kt +++ /dev/null @@ -1,31 +0,0 @@ -/* 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/. */ - -package org.mozilla.fenix.push - -import android.app.Notification -import android.os.Bundle -import androidx.core.app.NotificationCompat -import com.leanplum.LeanplumPushNotificationCustomizer -import org.mozilla.fenix.R - -/** - * Notification customizer for incoming Leanplum push messages. - */ -class LeanplumNotificationCustomizer : LeanplumPushNotificationCustomizer { - override fun customize( - builder: NotificationCompat.Builder, - notificationPayload: Bundle? - ) { - builder.setSmallIcon(R.drawable.ic_status_logo) - } - - // Do not implement if unless we want to support 2 lines of text in the BigPicture style. - // See: https://docs.leanplum.com/docs/customize-your-push-notifications-sample-android - override fun customize( - builder: Notification.Builder?, - notificationPayload: Bundle?, - notificationStyle: Notification.Style? - ) = Unit // no-op -} diff --git a/app/src/main/java/org/mozilla/fenix/settings/SecretDebugSettingsFragment.kt b/app/src/main/java/org/mozilla/fenix/settings/SecretDebugSettingsFragment.kt index bedc939e6..9ac930728 100644 --- a/app/src/main/java/org/mozilla/fenix/settings/SecretDebugSettingsFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/settings/SecretDebugSettingsFragment.kt @@ -7,7 +7,6 @@ package org.mozilla.fenix.settings import android.os.Bundle import androidx.preference.Preference import androidx.preference.PreferenceFragmentCompat -import com.leanplum.Leanplum import org.mozilla.fenix.R import org.mozilla.fenix.ext.requireComponents import org.mozilla.fenix.ext.showToolbar @@ -24,26 +23,6 @@ class SecretDebugSettingsFragment : PreferenceFragmentCompat() { val store = requireComponents.core.store - requirePreference(R.string.pref_key_leanplum_user_id).apply { - summary = Leanplum.getUserId().let { - if (it.isNullOrEmpty()) { - "No User Id" - } else { - it - } - } - } - - requirePreference(R.string.pref_key_leanplum_device_id).apply { - summary = Leanplum.getDeviceId().let { - if (it.isNullOrEmpty()) { - "No Device Id" - } else { - it - } - } - } - requirePreference(R.string.pref_key_search_region_home).apply { summary = store.state.search.region?.home ?: "Unknown" } diff --git a/app/src/main/java/org/mozilla/fenix/utils/Settings.kt b/app/src/main/java/org/mozilla/fenix/utils/Settings.kt index 7cda7699c..d9b1914b9 100644 --- a/app/src/main/java/org/mozilla/fenix/utils/Settings.kt +++ b/app/src/main/java/org/mozilla/fenix/utils/Settings.kt @@ -851,11 +851,6 @@ class Settings(private val appContext: Context) : PreferencesHolder { default = true ) - var fxaSignedIn by booleanPreference( - appContext.getPreferenceKey(R.string.pref_key_fxa_signed_in), - default = false - ) - var fxaHasSyncedItems by booleanPreference( appContext.getPreferenceKey(R.string.pref_key_fxa_has_synced_items), default = false diff --git a/app/src/main/res/values/preference_keys.xml b/app/src/main/res/values/preference_keys.xml index 9e57ef6a4..395ded789 100644 --- a/app/src/main/res/values/preference_keys.xml +++ b/app/src/main/res/values/preference_keys.xml @@ -88,7 +88,6 @@ pref_key_sync_sign_in pref_key_sync_problem project_id - pref_key_fxa_signed_in pref_key_fxa_has_synced_items pref_key_search_widget_installed pref_key_saved_logins_sorting_strategy @@ -268,8 +267,6 @@ pref_key_secret_debug_info - pref_key_leanplum_user_id - pref_key_leanplum_device_id pref_key_search_region_home pref_key_search_region_current diff --git a/app/src/main/res/values/static_strings.xml b/app/src/main/res/values/static_strings.xml index e8eecf25f..544b31c45 100644 --- a/app/src/main/res/values/static_strings.xml +++ b/app/src/main/res/values/static_strings.xml @@ -73,8 +73,6 @@ Telemetry - Leanplum User Id - Leanplum Device Id Search Home region Current region diff --git a/app/src/main/res/xml/secret_info_settings_preferences.xml b/app/src/main/res/xml/secret_info_settings_preferences.xml index 4a3e0370c..21bed11ea 100644 --- a/app/src/main/res/xml/secret_info_settings_preferences.xml +++ b/app/src/main/res/xml/secret_info_settings_preferences.xml @@ -4,17 +4,6 @@ - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - - - - @@ -28,5 +17,4 @@ android:enabled="false" /> - diff --git a/app/src/test/java/org/mozilla/fenix/components/BackgroundServicesTest.kt b/app/src/test/java/org/mozilla/fenix/components/BackgroundServicesTest.kt index 9104b8a98..eaf915a60 100644 --- a/app/src/test/java/org/mozilla/fenix/components/BackgroundServicesTest.kt +++ b/app/src/test/java/org/mozilla/fenix/components/BackgroundServicesTest.kt @@ -38,7 +38,6 @@ class BackgroundServicesTest { fun setup() { MockKAnnotations.init(this) every { metrics.track(any()) } just Runs - every { settings.fxaSignedIn = any() } just Runs observer = TelemetryAccountObserver(settings, metrics) registry = ObserverRegistry().apply { register(observer) } @@ -50,7 +49,6 @@ class BackgroundServicesTest { registry.notifyObservers { onAuthenticated(account, AuthType.Signin) } verify { metrics.track(Event.SyncAuthSignIn) } - verify { settings.fxaSignedIn = true } confirmVerified(metrics, settings) } @@ -60,7 +58,6 @@ class BackgroundServicesTest { registry.notifyObservers { onAuthenticated(account, AuthType.Signup) } verify { metrics.track(Event.SyncAuthSignUp) } - verify { settings.fxaSignedIn = true } confirmVerified(metrics, settings) } @@ -70,7 +67,6 @@ class BackgroundServicesTest { registry.notifyObservers { onAuthenticated(account, AuthType.Pairing) } verify { metrics.track(Event.SyncAuthPaired) } - verify { settings.fxaSignedIn = true } confirmVerified(metrics, settings) } @@ -80,7 +76,6 @@ class BackgroundServicesTest { registry.notifyObservers { onAuthenticated(account, AuthType.MigratedReuse) } verify { metrics.track(Event.SyncAuthFromSharedReuse) } - verify { settings.fxaSignedIn = true } confirmVerified(metrics, settings) registry.notifyObservers { onAuthenticated(account, AuthType.MigratedCopy) } @@ -93,7 +88,6 @@ class BackgroundServicesTest { registry.notifyObservers { onAuthenticated(account, AuthType.Recovered) } verify { metrics.track(Event.SyncAuthRecovered) } - verify { settings.fxaSignedIn = true } confirmVerified(metrics, settings) } @@ -103,7 +97,6 @@ class BackgroundServicesTest { registry.notifyObservers { onAuthenticated(account, AuthType.OtherExternal(null)) } verify { metrics.track(Event.SyncAuthOtherExternal) } - verify { settings.fxaSignedIn = true } confirmVerified(metrics, settings) } @@ -113,7 +106,6 @@ class BackgroundServicesTest { registry.notifyObservers { onAuthenticated(account, AuthType.OtherExternal("someAction")) } verify { metrics.track(Event.SyncAuthOtherExternal) } - verify { settings.fxaSignedIn = true } confirmVerified(metrics, settings) } @@ -123,7 +115,6 @@ class BackgroundServicesTest { registry.notifyObservers { onAuthenticated(account, AuthType.Existing) } verify { metrics wasNot Called } - verify { settings.fxaSignedIn = true } confirmVerified(metrics, settings) } @@ -131,7 +122,6 @@ class BackgroundServicesTest { fun `telemetry account observer tracks sign out event`() { registry.notifyObservers { onLoggedOut() } verify { metrics.track(Event.SyncAuthSignOut) } - verify { settings.fxaSignedIn = false } confirmVerified(metrics, settings) } } diff --git a/app/src/test/java/org/mozilla/fenix/home/intent/DeepLinkIntentProcessorTest.kt b/app/src/test/java/org/mozilla/fenix/home/intent/DeepLinkIntentProcessorTest.kt deleted file mode 100644 index 88b022db7..000000000 --- a/app/src/test/java/org/mozilla/fenix/home/intent/DeepLinkIntentProcessorTest.kt +++ /dev/null @@ -1,302 +0,0 @@ -/* 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/. */ - -package org.mozilla.fenix.home.intent - -import android.content.Intent -import android.net.Uri -import android.os.Build.VERSION_CODES.M -import android.os.Build.VERSION_CODES.N -import android.os.Build.VERSION_CODES.P -import androidx.core.net.toUri -import androidx.navigation.NavController -import io.mockk.Called -import io.mockk.every -import io.mockk.mockk -import io.mockk.mockkObject -import io.mockk.verify -import mozilla.appservices.places.BookmarkRoot -import mozilla.components.concept.engine.EngineSession -import org.junit.Assert.assertFalse -import org.junit.Assert.assertTrue -import org.junit.Before -import org.junit.Test -import org.junit.runner.RunWith -import org.mozilla.fenix.BrowserDirection -import org.mozilla.fenix.BuildConfig.DEEP_LINK_SCHEME -import org.mozilla.fenix.HomeActivity -import org.mozilla.fenix.NavGraphDirections -import org.mozilla.fenix.browser.browsingmode.BrowsingMode -import org.mozilla.fenix.components.SearchWidgetCreator -import org.mozilla.fenix.helpers.FenixRobolectricTestRunner -import org.mozilla.fenix.settings.SupportUtils -import org.robolectric.annotation.Config - -@RunWith(FenixRobolectricTestRunner::class) -class DeepLinkIntentProcessorTest { - - private lateinit var activity: HomeActivity - private lateinit var navController: NavController - private lateinit var out: Intent - private lateinit var processor: DeepLinkIntentProcessor - - @Before - fun setup() { - activity = mockk(relaxed = true) - navController = mockk(relaxed = true) - out = mockk() - processor = DeepLinkIntentProcessor(activity, object : DeepLinkIntentProcessor.DeepLinkVerifier { - override fun verifyDeepLink(deepLink: Uri): Boolean { - return true - } - }) - } - - @Test - fun `do not process blank intents`() { - assertFalse(processor.process(Intent(), navController, out)) - - verify { activity wasNot Called } - verify { navController wasNot Called } - verify { out wasNot Called } - } - - @Test - fun `return true if scheme is fenix`() { - assertTrue(processor.process(testIntent("test"), navController, out)) - - verify { activity wasNot Called } - verify { navController wasNot Called } - verify { out wasNot Called } - } - - @Test - fun `return true if scheme is a fenix variant`() { - assertTrue(processor.process(testIntent("fenix-beta://test"), navController, out)) - - verify { activity wasNot Called } - verify { navController wasNot Called } - verify { out wasNot Called } - } - - @Test - fun `process home deep link`() { - assertTrue(processor.process(testIntent("home"), navController, out)) - - verify { activity wasNot Called } - verify { navController.navigate(NavGraphDirections.actionGlobalHome()) } - verify { out wasNot Called } - } - - @Test - fun `process urls_bookmarks deep link`() { - assertTrue(processor.process(testIntent("urls_bookmarks"), navController, out)) - - verify { navController.navigate(NavGraphDirections.actionGlobalBookmarkFragment(BookmarkRoot.Root.id)) } - verify { out wasNot Called } - } - - @Test - fun `process urls_history deep link`() { - assertTrue(processor.process(testIntent("urls_history"), navController, out)) - - verify { navController.navigate(NavGraphDirections.actionGlobalHistoryFragment()) } - verify { out wasNot Called } - } - - @Test - fun `process home_collections deep link`() { - assertTrue(processor.process(testIntent("home_collections"), navController, out)) - - verify { navController.navigate(NavGraphDirections.actionGlobalHome()) } - verify { out wasNot Called } - } - - @Test - fun `process settings deep link`() { - assertTrue(processor.process(testIntent("settings"), navController, out)) - - verify { activity wasNot Called } - verify { navController.navigate(NavGraphDirections.actionGlobalSettingsFragment()) } - verify { out wasNot Called } - } - - @Test - fun `process turn_on_sync deep link`() { - assertTrue(processor.process(testIntent("turn_on_sync"), navController, out)) - - verify { activity wasNot Called } - verify { navController.navigate(NavGraphDirections.actionGlobalTurnOnSync()) } - verify { out wasNot Called } - } - - @Test - fun `process settings_search_engine deep link`() { - assertTrue(processor.process(testIntent("settings_search_engine"), navController, out)) - - verify { activity wasNot Called } - verify { navController.navigate(NavGraphDirections.actionGlobalSearchEngineFragment()) } - verify { out wasNot Called } - } - - @Test - fun `process settings_accessibility deep link`() { - assertTrue(processor.process(testIntent("settings_accessibility"), navController, out)) - - verify { activity wasNot Called } - verify { navController.navigate(NavGraphDirections.actionGlobalAccessibilityFragment()) } - verify { out wasNot Called } - } - - @Test - fun `process settings_delete_browsing_data deep link`() { - assertTrue(processor.process(testIntent("settings_delete_browsing_data"), navController, out)) - - verify { activity wasNot Called } - verify { navController.navigate(NavGraphDirections.actionGlobalDeleteBrowsingDataFragment()) } - verify { out wasNot Called } - } - - @Test - fun `process settings_addon_manager deep link`() { - assertTrue(processor.process(testIntent("settings_addon_manager"), navController, out)) - - verify { navController.navigate(NavGraphDirections.actionGlobalAddonsManagementFragment()) } - verify { out wasNot Called } - } - - @Test - fun `process settings_logins deep link`() { - assertTrue(processor.process(testIntent("settings_logins"), navController, out)) - - verify { navController.navigate(NavGraphDirections.actionGlobalSavedLoginsAuthFragment()) } - verify { out wasNot Called } - } - - @Test - fun `process settings_tracking_protection deep link`() { - assertTrue(processor.process(testIntent("settings_tracking_protection"), navController, out)) - - verify { navController.navigate(NavGraphDirections.actionGlobalTrackingProtectionFragment()) } - verify { out wasNot Called } - } - - @Test - fun `process settings_privacy deep link`() { - assertTrue(processor.process(testIntent("settings_privacy"), navController, out)) - - verify { navController.navigate(NavGraphDirections.actionGlobalSettingsFragment()) } - verify { out wasNot Called } - } - - @Test - fun `process enable_private_browsing deep link`() { - assertTrue(processor.process(testIntent("enable_private_browsing"), navController, out)) - - verify { activity.browsingModeManager.mode = BrowsingMode.Private } - verify { navController.navigate(NavGraphDirections.actionGlobalHome()) } - verify { out wasNot Called } - } - - @Test - fun `process open deep link`() { - assertTrue(processor.process(testIntent("open"), navController, out)) - - verify { activity wasNot Called } - verify { navController wasNot Called } - verify { out wasNot Called } - - assertTrue(processor.process(testIntent("open?url=test"), navController, out)) - - verify { activity wasNot Called } - verify { navController wasNot Called } - verify { out wasNot Called } - - assertTrue(processor.process(testIntent("open?url=https%3A%2F%2Fwww.example.org%2F"), navController, out)) - - verify { - activity.openToBrowserAndLoad( - "https://www.example.org/", - newTab = true, - from = BrowserDirection.FromGlobal, - flags = EngineSession.LoadUrlFlags.external() - ) - } - verify { navController wasNot Called } - verify { out wasNot Called } - } - - @Test - fun `process invalid open deep link`() { - val invalidProcessor = DeepLinkIntentProcessor(activity, object : DeepLinkIntentProcessor.DeepLinkVerifier { - override fun verifyDeepLink(deepLink: Uri): Boolean { - return false - } - }) - - assertTrue(invalidProcessor.process(testIntent("open"), navController, out)) - - verify { activity wasNot Called } - verify { navController wasNot Called } - verify { out wasNot Called } - - assertTrue(invalidProcessor.process(testIntent("open?url=open?url=https%3A%2F%2Fwww.example.org%2F"), navController, out)) - - verify { activity wasNot Called } - verify { navController wasNot Called } - verify { out wasNot Called } - } - - @Test - @Config(minSdk = N, maxSdk = P) - fun `process make_default_browser deep link for above API 23`() { - assertTrue(processor.process(testIntent("make_default_browser"), navController, out)) - - verify { activity.startActivity(any()) } - verify { navController wasNot Called } - verify { out wasNot Called } - } - - @Test - @Config(maxSdk = M) - fun `process make_default_browser deep link for API 23 and below`() { - assertTrue(processor.process(testIntent("make_default_browser"), navController, out)) - - verify { - activity.openToBrowserAndLoad( - searchTermOrURL = SupportUtils.getSumoURLForTopic( - activity, - SupportUtils.SumoTopic.SET_AS_DEFAULT_BROWSER - ), - newTab = true, - from = BrowserDirection.FromGlobal, - flags = EngineSession.LoadUrlFlags.external() - ) - } - verify { navController wasNot Called } - verify { out wasNot Called } - } - - @Test - fun `process settings_notifications deep link`() { - assertTrue(processor.process(testIntent("settings_notifications"), navController, out)) - - verify { navController wasNot Called } - verify { out wasNot Called } - verify { activity.startActivity(any()) } - } - - @Test - fun `process install_search_widget deep link`() { - mockkObject(SearchWidgetCreator) - every { SearchWidgetCreator.createSearchWidget(any()) } returns true - assertTrue(processor.process(testIntent("install_search_widget"), navController, out)) - - verify { navController wasNot Called } - verify { out wasNot Called } - verify { activity wasNot Called } - } - - private fun testIntent(uri: String) = Intent("", "$DEEP_LINK_SCHEME://$uri".toUri()) -} diff --git a/app/src/test/java/org/mozilla/fenix/push/LeanplumNotificationCustomizerTest.kt b/app/src/test/java/org/mozilla/fenix/push/LeanplumNotificationCustomizerTest.kt deleted file mode 100644 index 709b07c16..000000000 --- a/app/src/test/java/org/mozilla/fenix/push/LeanplumNotificationCustomizerTest.kt +++ /dev/null @@ -1,34 +0,0 @@ -/* 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/. */ - -package org.mozilla.fenix.push - -import android.app.Notification -import androidx.core.app.NotificationCompat -import io.mockk.Called -import io.mockk.mockk -import io.mockk.verify -import org.junit.Test -import org.mozilla.fenix.R - -class LeanplumNotificationCustomizerTest { - - private val customizer = LeanplumNotificationCustomizer() - - @Test - fun `customize adds icon`() { - val builder = mockk(relaxed = true) - customizer.customize(builder, mockk()) - - verify { builder.setSmallIcon(R.drawable.ic_status_logo) } - } - - @Test - fun `customize for BigPictureStyle does nothing`() { - val builder = mockk() - customizer.customize(builder, mockk(), mockk()) - - verify { builder wasNot Called } - } -} diff --git a/build.gradle b/build.gradle index 4cd205c14..b70268be5 100644 --- a/build.gradle +++ b/build.gradle @@ -161,18 +161,6 @@ allprojects { } } } - - maven { - name "LeanplumRepo" - if (project.hasProperty("leanplumRepo")) { - url project.property("leanplumRepo") - } else { - url "https://repo.leanplum.com" - } - content { - includeGroup("com.leanplum") - } - } } tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach { diff --git a/buildSrc/src/main/java/Dependencies.kt b/buildSrc/src/main/java/Dependencies.kt index 447186f64..1a3c8904f 100644 --- a/buildSrc/src/main/java/Dependencies.kt +++ b/buildSrc/src/main/java/Dependencies.kt @@ -13,7 +13,6 @@ object Versions { const val sentry = "1.7.10" const val leakcanary = "2.4" - const val leanplum = "5.4.0" const val osslicenses_plugin = "0.9.5" const val detekt = "1.9.1" const val jna = "5.6.0" @@ -163,9 +162,6 @@ object Deps { const val sentry = "io.sentry:sentry-android:${Versions.sentry}" const val leakcanary = "com.squareup.leakcanary:leakcanary-android:${Versions.leakcanary}" - const val leanplum_core = "com.leanplum:leanplum-core:${Versions.leanplum}" - const val leanplum_fcm = "com.leanplum:leanplum-fcm:${Versions.leanplum}" - const val androidx_annotation = "androidx.annotation:annotation:${Versions.androidx_annotation}" const val androidx_biometric = "androidx.biometric:biometric:${Versions.androidx_biometric}" const val androidx_fragment = "androidx.fragment:fragment-ktx:${Versions.androidx_fragment}" diff --git a/docs/mma.md b/docs/mma.md deleted file mode 100644 index 92e41d690..000000000 --- a/docs/mma.md +++ /dev/null @@ -1,376 +0,0 @@ - MMA (Mobile Marketing Automation) -================================ - -Mozilla wants to engage with users more. MMA is the project for this purpose. When a user performs a certain UI action (or set of UI actions), she will see a prompt and have a chance to interact with it. For example, if a user uses Firefox 10 times a week, but Firefox is not her default browser, we'll prompt the user the next time when she launches our app, and guide her to set us as default browser. - -Mozilla is using a third party framework called "Leanplum" in order to achieve this. Leanplum is a San Francisco company, founded in 2012. We put their SDK in our codebase via Carthage. - -The SDK is documented at https://www.leanplum.com/docs/android - -There are four major components in Leanplum SDK. -1. Events : Events are fired when users perform certain actions. -2. User Attributes: User Attributes are set on a per-user basis, and inform us about an aspect of the user. -3. Deep Links: Actions that users can perform to interact with the Message. -4. Messages: User Interaction points that we want to engage with users that help them use Firefox better. - -An Event or a series of Events plus some User Attributes may trigger a Message, and when the user acts on the Message, a Deep Link may be processed. - - -Data collection -===================================================== - - -Who will have Leanplum enabled? -====================================================== - -Everyone with Telemetry enabled. - - -Where does data sent to the Leanplum backend go? -============================================== - -The Leanplum SDK is hard-coded to send data to the endpoint https://www.leanplum.com. The endpoint is -defined by ``com.leanplum.internal.Constants.API_HOST_NAME`` at https://github.com/Leanplum/Leanplum-Android-SDK/blob/master/AndroidSDKCore/src/main/java/com/leanplum/internal/Constants.java#L32 - -The user is identified by Leanplum using a random UUID generated by us when Leanplum is initialized for the first time. See: https://github.com/mozilla-mobile/fenix/blob/master/app/src/main/java/org/mozilla/fenix/components/metrics/LeanplumMetricsService.kt -This unique identifier is only used by Leanplum and can't be tracked back to any Firefox users. - - -What data is collected and sent to the Leanplum backend? -====================================================== - -The Leanplum SDK collects and sends the following information at various times while the SDK is in use. - -Sent every time when an event is triggered: -~~~~~~~~~~~~~~~ - "action" -> "track" // track: an event is tracked. - "event" -> "Launch" // Used when an event is triggered. e.g. E_Saved_Bookmark. - "info" -> "" // Used when an event is triggered. Basic context associated with the event. - "value" -> 0.0 // Used when an event is triggered. Value of that event. - "messageId" -> 5111602214338560 // Used when an event is triggered. The ID of the message. -~~~~~~~~~~~~~~~ - -Sent when the app starts: -~~~~~~~~~~~~~~~ - "action" -> "start" // start: Leanplum SDK starts. heartbeat - "userAttributes" -> "{ // A set of key-value pairs used to describe the user. - "Focus Installed" -> true // If Focus for Android is installed. - "Klar Installed" -> true // If Klar for Android is installed. - "Fennec Installed" -> true // If Fennec for Android is installed. - }" - "appId" -> "app_6Ao...." // Leanplum App ID. - "clientKey" -> "dev_srwDUNZR...." // Leanplum client access key. - "systemName" -> "Android" // Fixed String in SDK. - "locale" -> "zh_TW" // System Locale. - "timezone" -> "Asia/Taipei" // System Timezone. - "versionName" -> "55.0a1" // Fennec version. - "systemVersion" -> "10.3.1" // System version. - "deviceModel" -> "Galaxy" // System device model. - "timezoneOffsetSeconds" -> "28800" // User timezone offset with PST. - "deviceName" -> "sdaswani-31710" // System device name. - "region" -> "(detect)" // Not used. We strip location so this is will be the default stub value in Leanplum SDK. - "city" -> "(detect)" // Same as above. - "country" -> "(detect)" // Same as above. - "location" -> "(detect)" // Same as above. - "newsfeedMessages" -> " size = 0" // Not used. New Leanplum Inbox message(Leanplum feature) count. - "includeDefaults" -> "false" // Not used. Always false. - ~~~~~~~~~~~~~~~ - -Sent every time a session is renewed or has a state change: -~~~~~~~~~~~~~~~ - "action" -> "heartbeat" // heartbeat: every 15 minutes when app is in the foreground - // pauseSession: when app goes to background - // resumeSession: when app goes to foreground -~~~~~~~~~~~~~~~ - - -Sent for every Message: -~~~~~~~~~~~~~~~ - "userId" -> "b13b3c239d01aa7c" // Set by Fennec, we use random uuid so users are anonymous to Leanplum. - "deviceId" -> "b13b3c239d01aa7c" // Same as above. - "sdkVersion" -> "2.2.2-SNAPSHOT" // Leanplum SDK version. - "devMode" -> "true" // If the SDK is in developer mode. For official builds, it's false. - "time" -> "1.497595093902E9" // System time in second. - "token" -> "nksZ5pa0R5iegC7wj...." // Token come from Leanplum backend. -~~~~~~~~~~~~~~~ - -Notes on what data is collected -=============================== -User Identifier ---------------- -Since Device ID is a random UUID, Leanplum can't map the device to any know Client ID in Fennec nor Advertising ID. - -User Attributes ---------------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyDescriptionData Review
`default_browser`A string containing the name of the default browser if property of Mozilla or an empty string#3459
`focus_installed`A boolean indicating that Firefox Focus is installed#3459
`klar_installed`A boolean indicating that Firefox Klar is installed#3459
`fennec_installed`A boolean indicating that Fennec is installed#3459
`fxa_signed_in`A boolean indicating that the user is signed in to FxA#4568
`fxa_has_synced_items`A boolean indicating that the user has opted to sync at least one category of items with FxA#4568
`search_widget_installed`A boolean indicating that the user has at least one search widget placed on the home screen#4694
`tracking_protection_enabled`A boolean indicating that the user has enabled tracking protection#11965
`tracking_protection_setting`A string indicating the level at which the user has set tracking protection. Possible values are `none`, `standard`, `strict` and `custom`#11965
`fenix`A boolean indicating that this is a Fenix installation#8208
`installed_addons`A boolean indicating that there are addons installed#13233
`enabled_addons`A boolean indicating that there are addons enabled#13233
- -Events -------- -Most of the Leanplum events can be mapped to a single combination of Telemetry event (Event+Method+Extra). -Some events are not collected in Mozilla Telemetry. This will be addressed separately in each campaign review. -There are three elements that are used for each event. They are: event name, value(default: 0.0), and info(default: ""). -Default value for event value is 0.0. Default value for event info is empty string. - -Here is the list of current Events sent, which can be found here in the code base: https://github.com/mozilla-mobile/fenix/blob/master/app/src/main/java/org/mozilla/fenix/components/metrics/LeanplumMetricsService.kt - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
EventDescriptionData Review
`E_Opened_App_FirstRun`The first launch after install#3459
`E_Opened_App`Whenever the App is launched.#3459
`E_Interact_With_Search_URL_Area`The user interacts with search url area.#3459
`E_Opened_Bookmark`The user opened a bookmark#3632
`E_Add_Bookmark`The user added a bookmark#3632
`E_Remove_Bookmark`The user removed a bookmark#3632
`E_Collection_Created`The user created a new collection#4626
`E_Collection_Tab_Opened`The user opened a tab from a previously created collection#4626
`E_FxA_New_Signup`The user completed the signup process to new FxA account#4626
`E_Sign_In_FxA`The user successfully signed in to FxA#4626
`E_Sign_In_FxA_Fennec_to_Fenix`The user successfully signed in to FxA using previously signed in Fennec account#4626
`E_Sign_Out_FxA`The user successfully signed out of FxA#4626
`E_Cleared_Private_Data`The user cleared one or many types of private data#4626
`E_Dismissed_Onboarding`The user finished onboarding. Could be triggered by pressing "start browsing," opening settings, or invoking a search.#3459
`E_Fennec_To_Fenix_Migrated`The user has just migrated from Fennec to Fenix.#8208
`E_Addon_Installed`The user has installed an addon from the addon management page.#12136
`E_Search_Widget_Added`The user has installed the search widget to their homescreen.#13003
`E_Changed_Default_To_Fenix`The user has changed their default browser to Fenix while Fenix was in the background and then resumed the app.#13003
`E_Changed_ETP`The user has changed their enhanched tracking protection setting.#13003
- -Deep links -------- -Deep links are hooks utilized by marketing to direct users to certain portions of the application through a link. They can also be invoked by other applications or even users -directly to access specific screens quickly. - -Here is the list of current deep links available, which can be found here in the code base: https://github.com/mozilla-mobile/fenix/blob/master/app/src/main/AndroidManifest.xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Deep linkDescription
`fenix://home`Opens to the Fenix home screen
`fenix://urls_bookmarks`Opens to the list of the user's bookmarks at its root
`fenix://urls_history`Opens to the list of pages the user has visited
`fenix://home_collections`Opens to the list of collections the user has saved. It is implemented as `fenix://home`
`fenix://settings`Opens to the top level settings screen
`fenix://turn_on_sync`Opens to the turn on sync screen. **Only valid if the user is not signed in to FxA**
`fenix://settings_search_engine`Opens to the search engine settings screen
`fenix://settings_accessibility`Opens to the accessibility settings screen
`fenix://settings_delete_browsing_data`Opens to the delete browsing data settings screen
`fenix://settings_addon_manager`Opens to the settings page to install and manage addons
`fenix://settings_logins`Opens to the Logins and passwords settings page configure how logins are treated. This is *not* the list of actual logins
`fenix://settings_tracking_protection`Opens to the Enhanced Tracking Protection settings page
`fenix://settings_privacy`Opens to the settings page which contains the privacy settings. Currently, this is the same as `fenix://settings`
`fenix://enable_private_browsing`Opens to the Fenix home screen and enables private browsing
`fenix://open?url={DESIRED_URL}`Creates a new tab, opens to the browser screen and loads the {DESIRED_URL}
`fenix://make_default_browser`Opens to the Android default apps settings screen. If Android API <= 23 opens tab to support page defined in SupportUtils.SumoTopic.SET_AS_DEFAULT_BROWSER
`fenix://settings_notifications`Opens to the Android notification settings screen for Fenix. **Only works on Android API >=24**
`fenix://install_search_widget`Adds the search widget to the users launcher homescreen. **Only works on Android API >=26**
- -Messages ------------ -Messages are in-app prompts to the user from Leanplum. The user interaction of that prompt will be sent to the Leanplum backend (such as "Accept" or "Show") to track overall engagement with the Message. The Message is downloaded from Leanplum when the Leanplum SDK is initialized at App start, assuming the fulfillment criteria for the Message is met. As mentioned before, the fulfillment criteria is a set of required Events and User Attributes. The fulfillment criteria are set in the Leanplum backend. - -We currently don't have any messages planned for Firefox Preview diff --git a/docs/telemetry.md b/docs/telemetry.md index d87bfb185..4b56bfe2b 100644 --- a/docs/telemetry.md +++ b/docs/telemetry.md @@ -1,14 +1,11 @@ # Telemetry -Fenix uses Mozilla's telemetry service (Glean) and LeanPlum to measure feature performance and engagement. +Fenix uses Mozilla's telemetry service (Glean) to measure feature performance and engagement. ## Glean pings and metrics By using the Glean SDK, Fenix can send the pings the SDK owns and defines, as documented [in the Glean SDK docs](https://mozilla.github.io/glean/book/user/pings/index.html). Additional metrics or pings defined by Fenix are documented in the [Glean SDK autogenerated docs](metrics.md). -## Leanplum -See [here](https://github.com/mozilla-mobile/fenix/blob/master/docs/mma.md) for details on Leanplum usage in Firefox for Android. - ## Crash reporting See [here](https://github.com/mozilla-mobile/fenix/blob/master/docs/crash-reporting.md) for details on crash reporting in Firefox for Android. diff --git a/taskcluster/fenix_taskgraph/transforms/build.py b/taskcluster/fenix_taskgraph/transforms/build.py index c4514f236..4a65b4abb 100644 --- a/taskcluster/fenix_taskgraph/transforms/build.py +++ b/taskcluster/fenix_taskgraph/transforms/build.py @@ -44,7 +44,6 @@ def add_shippable_secrets(config, tasks): } for key, target_file in ( ('adjust', '.adjust_token'), ('firebase', 'app/src/{}/res/values/firebase.xml'.format(gradle_build_type)), - ('leanplum', '.leanplum_token'), ('sentry_dsn', '.sentry_token'), ('mls', '.mls_token'), ('nimbus_url', '.nimbus'), @@ -55,7 +54,6 @@ def add_shippable_secrets(config, tasks): "path": target_file, } for fake_value, target_file in ( ("faketoken", ".adjust_token"), - ("fake:token", ".leanplum_token"), # : is used by leanplum ("faketoken", ".mls_token"), ("https://fake@sentry.prod.mozaws.net/368", ".sentry_token"), )]) diff --git a/taskcluster/scripts/toolchain/android-gradle-dependencies.sh b/taskcluster/scripts/toolchain/android-gradle-dependencies.sh index ece18653a..7117fe288 100755 --- a/taskcluster/scripts/toolchain/android-gradle-dependencies.sh +++ b/taskcluster/scripts/toolchain/android-gradle-dependencies.sh @@ -19,7 +19,7 @@ pushd $PROJECT_DIR . taskcluster/scripts/toolchain/android-gradle-dependencies/before.sh NEXUS_PREFIX='http://localhost:8081/nexus/content/repositories' -GRADLE_ARGS="--parallel -PgoogleRepo=$NEXUS_PREFIX/google/ -PjcenterRepo=$NEXUS_PREFIX/jcenter/ -PcentralRepo=$NEXUS_PREFIX/central/ -PleanplumRepo=$NEXUS_PREFIX/leanplum/" +GRADLE_ARGS="--parallel -PgoogleRepo=$NEXUS_PREFIX/google/ -PjcenterRepo=$NEXUS_PREFIX/jcenter/ -PcentralRepo=$NEXUS_PREFIX/central/" # We build everything to be sure to fetch all dependencies ./gradlew $GRADLE_ARGS assemble assembleAndroidTest testClasses ktlint detekt # Some tests may be flaky, although they still download dependencies. So we let the following diff --git a/taskcluster/scripts/toolchain/android-gradle-dependencies/after.sh b/taskcluster/scripts/toolchain/android-gradle-dependencies/after.sh index 430974e5a..eed8d01fb 100644 --- a/taskcluster/scripts/toolchain/android-gradle-dependencies/after.sh +++ b/taskcluster/scripts/toolchain/android-gradle-dependencies/after.sh @@ -23,7 +23,6 @@ mkdir -p android-gradle-dependencies /builds/worker/artifacts cp -R ${NEXUS_WORK}/storage/jcenter android-gradle-dependencies cp -R ${NEXUS_WORK}/storage/google android-gradle-dependencies cp -R ${NEXUS_WORK}/storage/central android-gradle-dependencies -cp -R ${NEXUS_WORK}/storage/leanplum android-gradle-dependencies tar cf - android-gradle-dependencies | xz > /builds/worker/artifacts/android-gradle-dependencies.tar.xz diff --git a/taskcluster/scripts/toolchain/android-gradle-dependencies/nexus.xml b/taskcluster/scripts/toolchain/android-gradle-dependencies/nexus.xml index 1dfc16205..2b40bedf3 100644 --- a/taskcluster/scripts/toolchain/android-gradle-dependencies/nexus.xml +++ b/taskcluster/scripts/toolchain/android-gradle-dependencies/nexus.xml @@ -54,37 +54,6 @@ true - - leanplum - leanplum - org.sonatype.nexus.proxy.repository.Repository - maven2 - IN_SERVICE - true - 1440 - true - true - true - READ_ONLY - true - true - - file - - - https://repo.leanplum.com/ - - - RELEASE - STRICT - true - false - -1 - 1440 - 1440 - true - - gradle-plugins Gradle Plugins From 8070a326b7c9ff626fa854ce9250143d49281412 Mon Sep 17 00:00:00 2001 From: William Lachance Date: Mon, 26 Apr 2021 19:24:23 -0400 Subject: [PATCH 037/256] No issue - Properly quote description for ad metric (#19243) This is pedantic, but strictly something called is considered an HTML tag unless it's in a code block (backticks). See mozilla/glean-dictionary#549 and mozilla/glean-dictionary#497. I'm going to fix this upstream but figured I might as well file a PR here to fix the underlying issue. --- app/metrics.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/metrics.yaml b/app/metrics.yaml index 59f89331d..8eb6325b8 100644 --- a/app/metrics.yaml +++ b/app/metrics.yaml @@ -3949,7 +3949,7 @@ browser.search: type: labeled_counter description: | Records counts of SERP pages with adverts displayed. - The key format is ‘’. + The key format is ``. send_in_pings: - metrics bugs: @@ -3966,7 +3966,7 @@ browser.search: type: labeled_counter description: | Records clicks of adverts on SERP pages. - The key format is ‘’. + The key format is ``. send_in_pings: - metrics bugs: From 816e8bebc015e36af10936e09eb884a8bc709f3f Mon Sep 17 00:00:00 2001 From: Arturo Mejia Date: Mon, 26 Apr 2021 11:42:29 -0400 Subject: [PATCH 038/256] Update Android Components version --- buildSrc/src/main/java/AndroidComponents.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/java/AndroidComponents.kt b/buildSrc/src/main/java/AndroidComponents.kt index 6ec9f6f78..9dc1be11f 100644 --- a/buildSrc/src/main/java/AndroidComponents.kt +++ b/buildSrc/src/main/java/AndroidComponents.kt @@ -3,5 +3,5 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ object AndroidComponents { - const val VERSION = "90.0.20210424190049" + const val VERSION = "90.0.20210426143115" } From c725493bea4b5d2ce2a8185f00949c14e7649772 Mon Sep 17 00:00:00 2001 From: Arturo Mejia Date: Thu, 22 Apr 2021 15:58:24 -0400 Subject: [PATCH 039/256] Fix openFile breaking changes --- .../fenix/downloads/DynamicDownloadDialog.kt | 5 +- .../library/downloads/DownloadFragment.kt | 30 +++++++--- .../downloads/DownloadFragmentStore.kt | 3 + .../mozilla/fenix/ext/DownloadItemKtTest.kt | 10 +++- .../java/org/mozilla/fenix/ext/ListTest.kt | 60 +++++++++++++++++-- .../downloads/DownloadControllerTest.kt | 10 +++- .../downloads/DownloadFragmentStoreTest.kt | 20 ++++++- .../library/downloads/DownloadFragmentTest.kt | 52 ++++++++-------- .../downloads/DownloadInteractorTest.kt | 10 +++- 9 files changed, 153 insertions(+), 47 deletions(-) diff --git a/app/src/main/java/org/mozilla/fenix/downloads/DynamicDownloadDialog.kt b/app/src/main/java/org/mozilla/fenix/downloads/DynamicDownloadDialog.kt index 8f2b4fa39..df3fd5513 100644 --- a/app/src/main/java/org/mozilla/fenix/downloads/DynamicDownloadDialog.kt +++ b/app/src/main/java/org/mozilla/fenix/downloads/DynamicDownloadDialog.kt @@ -106,9 +106,8 @@ class DynamicDownloadDialog( metrics.track(Event.DownloadsItemOpened) val fileWasOpened = AbstractFetchDownloadService.openFile( - context = context, - contentType = downloadState.contentType, - filePath = downloadState.filePath + applicationContext = context.applicationContext, + download = downloadState ) if (!fileWasOpened) { diff --git a/app/src/main/java/org/mozilla/fenix/library/downloads/DownloadFragment.kt b/app/src/main/java/org/mozilla/fenix/library/downloads/DownloadFragment.kt index f9687e8ad..2ce209b92 100644 --- a/app/src/main/java/org/mozilla/fenix/library/downloads/DownloadFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/library/downloads/DownloadFragment.kt @@ -98,12 +98,13 @@ class DownloadFragment : LibraryPageFragment(), UserInteractionHan .sortedByDescending { it.createdTime } // sort from newest to oldest .map { DownloadItem( - it.id, - it.fileName, - it.filePath, - it.contentLength?.toString() ?: "0", - it.contentType, - it.status + id = it.id, + url = it.url, + fileName = it.fileName, + filePath = it.filePath, + size = it.contentLength?.toString() ?: "0", + contentType = it.contentType, + status = it.status ) }.filter { it.status == DownloadState.Status.COMPLETED @@ -249,10 +250,21 @@ class DownloadFragment : LibraryPageFragment(), UserInteractionHan mode?.let { (activity as HomeActivity).browsingModeManager.mode = it } context?.let { + val contentLength = if (item.size.isNotEmpty()) { + item.size.toLong() + } else { + 0L + } AbstractFetchDownloadService.openFile( - context = it, - contentType = item.contentType, - filePath = item.filePath + applicationContext = it.applicationContext, + download = DownloadState( + id = item.id, + url = item.url, + fileName = item.fileName, + contentType = item.contentType, + status = item.status, + contentLength = contentLength + ) ) } diff --git a/app/src/main/java/org/mozilla/fenix/library/downloads/DownloadFragmentStore.kt b/app/src/main/java/org/mozilla/fenix/library/downloads/DownloadFragmentStore.kt index a122262de..106009ec6 100644 --- a/app/src/main/java/org/mozilla/fenix/library/downloads/DownloadFragmentStore.kt +++ b/app/src/main/java/org/mozilla/fenix/library/downloads/DownloadFragmentStore.kt @@ -12,13 +12,16 @@ import mozilla.components.lib.state.Store /** * Class representing a downloads entry * @property id Unique id of the download item + * @property url The full url to the content that should be downloaded * @property fileName File name of the download item * @property filePath Full path of the download item * @property size The size in bytes of the download item * @property contentType The type of file the download is + * @property status The status that represents every state that a download can be in */ data class DownloadItem( val id: String, + val url: String, val fileName: String?, val filePath: String, val size: String, diff --git a/app/src/test/java/org/mozilla/fenix/ext/DownloadItemKtTest.kt b/app/src/test/java/org/mozilla/fenix/ext/DownloadItemKtTest.kt index e5fdf24b4..8190c4c69 100644 --- a/app/src/test/java/org/mozilla/fenix/ext/DownloadItemKtTest.kt +++ b/app/src/test/java/org/mozilla/fenix/ext/DownloadItemKtTest.kt @@ -14,7 +14,15 @@ import org.mozilla.fenix.library.downloads.DownloadItem class DownloadItemKtTest { @Test fun getIcon() { - val downloadItem = DownloadItem("0", "MyAwesomeFile", "", "", "image/png", DownloadState.Status.COMPLETED) + val downloadItem = DownloadItem( + id = "0", + url = "url", + fileName = "MyAwesomeFile", + filePath = "", + size = "", + contentType = "image/png", + status = DownloadState.Status.COMPLETED + ) assertEquals(R.drawable.ic_file_type_image, downloadItem.getIcon()) assertEquals(R.drawable.ic_file_type_audio_note, downloadItem.copy(contentType = "audio/mp3").getIcon()) diff --git a/app/src/test/java/org/mozilla/fenix/ext/ListTest.kt b/app/src/test/java/org/mozilla/fenix/ext/ListTest.kt index e6ff4a337..2b0a7dbbd 100644 --- a/app/src/test/java/org/mozilla/fenix/ext/ListTest.kt +++ b/app/src/test/java/org/mozilla/fenix/ext/ListTest.kt @@ -27,9 +27,33 @@ class ListTest { file1.createNewFile() file3.createNewFile() - val item1 = DownloadItem("71", "filepath.txt", filePath1, "71 Mb", "Image/png", DownloadState.Status.COMPLETED) - val item2 = DownloadItem("71", "filepath2.txt", "filepath2.txt", "71 Mb", "Image/png", DownloadState.Status.COMPLETED) - val item3 = DownloadItem("71", "filepath3.txt", filePath3, "71 Mb", "Image/png", DownloadState.Status.COMPLETED) + val item1 = DownloadItem( + id = "71", + url = "url", + fileName = "filepath.txt", + filePath = filePath1, + size = "71 Mb", + contentType = "Image/png", + status = DownloadState.Status.COMPLETED + ) + val item2 = DownloadItem( + id = "71", + url = "url", + fileName = "filepath2.txt", + filePath = "filepath2.txt", + size = "71 Mb", + contentType = "Image/png", + status = DownloadState.Status.COMPLETED + ) + val item3 = DownloadItem( + id = "71", + url = "url", + fileName = "filepath3.txt", + filePath = filePath3, + size = "71 Mb", + contentType = "Image/png", + status = DownloadState.Status.COMPLETED + ) val testList = mutableListOf(item1, item2, item3) val comparisonList: MutableList = mutableListOf(item1, item3) @@ -58,9 +82,33 @@ class ListTest { file2.createNewFile() file3.createNewFile() - val item1 = DownloadItem("71", "filepath.txt", filePath1, "71 Mb", "text/plain", DownloadState.Status.COMPLETED) - val item2 = DownloadItem("72", "filepath2.txt", filePath2, "71 Mb", "text/plain", DownloadState.Status.COMPLETED) - val item3 = DownloadItem("73", "filepath3.txt", filePath3, "71 Mb", "text/plain", DownloadState.Status.COMPLETED) + val item1 = DownloadItem( + id = "71", + url = "url", + fileName = "filepath.txt", + filePath = filePath1, + size = "71 Mb", + contentType = "text/plain", + status = DownloadState.Status.COMPLETED + ) + val item2 = DownloadItem( + id = "72", + url = "url", + fileName = "filepath2.txt", + filePath = filePath2, + size = "71 Mb", + contentType = "text/plain", + status = DownloadState.Status.COMPLETED + ) + val item3 = DownloadItem( + id = "73", + url = "url", + fileName = "filepath3.txt", + filePath = filePath3, + size = "71 Mb", + contentType = "text/plain", + status = DownloadState.Status.COMPLETED + ) val testList = mutableListOf(item1, item2, item3) val comparisonList: MutableList = mutableListOf(item1, item2, item3) diff --git a/app/src/test/java/org/mozilla/fenix/library/downloads/DownloadControllerTest.kt b/app/src/test/java/org/mozilla/fenix/library/downloads/DownloadControllerTest.kt index 1cdf21a44..55b92c7fb 100644 --- a/app/src/test/java/org/mozilla/fenix/library/downloads/DownloadControllerTest.kt +++ b/app/src/test/java/org/mozilla/fenix/library/downloads/DownloadControllerTest.kt @@ -21,7 +21,15 @@ import org.mozilla.fenix.helpers.FenixRobolectricTestRunner @ExperimentalCoroutinesApi @RunWith(FenixRobolectricTestRunner::class) class DownloadControllerTest { - private val downloadItem = DownloadItem("0", "title", "url", "77", "jpg", DownloadState.Status.COMPLETED) + private val downloadItem = DownloadItem( + id = "0", + url = "url", + fileName = "title", + filePath = "url", + size = "77", + contentType = "jpg", + status = DownloadState.Status.COMPLETED + ) private val scope = TestCoroutineScope() private val store: DownloadFragmentStore = mockk(relaxed = true) private val state: DownloadFragmentState = mockk(relaxed = true) diff --git a/app/src/test/java/org/mozilla/fenix/library/downloads/DownloadFragmentStoreTest.kt b/app/src/test/java/org/mozilla/fenix/library/downloads/DownloadFragmentStoreTest.kt index be7889ac4..6cc0dd443 100644 --- a/app/src/test/java/org/mozilla/fenix/library/downloads/DownloadFragmentStoreTest.kt +++ b/app/src/test/java/org/mozilla/fenix/library/downloads/DownloadFragmentStoreTest.kt @@ -11,8 +11,24 @@ import org.junit.Assert.assertNotSame import org.junit.Test class DownloadFragmentStoreTest { - private val downloadItem = DownloadItem("0", "title", "url", "77", "jpg", DownloadState.Status.COMPLETED) - private val newDownloadItem = DownloadItem("1", "title", "url", "77", "jpg", DownloadState.Status.COMPLETED) + private val downloadItem = DownloadItem( + id = "0", + url = "url", + fileName = "title", + filePath = "url", + size = "77", + contentType = "jpg", + status = DownloadState.Status.COMPLETED + ) + private val newDownloadItem = DownloadItem( + id = "1", + url = "url", + fileName = "title", + filePath = "url", + size = "77", + contentType = "jpg", + status = DownloadState.Status.COMPLETED + ) @Test fun exitEditMode() = runBlocking { diff --git a/app/src/test/java/org/mozilla/fenix/library/downloads/DownloadFragmentTest.kt b/app/src/test/java/org/mozilla/fenix/library/downloads/DownloadFragmentTest.kt index b2b6d889f..726cfa9a4 100644 --- a/app/src/test/java/org/mozilla/fenix/library/downloads/DownloadFragmentTest.kt +++ b/app/src/test/java/org/mozilla/fenix/library/downloads/DownloadFragmentTest.kt @@ -45,28 +45,31 @@ class DownloadFragmentTest { val expectedList = listOf( DownloadItem( - "3", - "3.pdf", - downloadedFile3.path, - "0", - null, - DownloadState.Status.COMPLETED + id = "3", + url = "url", + fileName = "3.pdf", + filePath = downloadedFile3.path, + size = "0", + contentType = null, + status = DownloadState.Status.COMPLETED ), DownloadItem( - "2", - "2.pdf", - downloadedFile2.path, - "0", - null, - DownloadState.Status.COMPLETED + id = "2", + url = "url", + fileName = "2.pdf", + filePath = downloadedFile2.path, + size = "0", + contentType = null, + status = DownloadState.Status.COMPLETED ), DownloadItem( - "1", - "1.pdf", - downloadedFile1.path, - "0", - null, - DownloadState.Status.COMPLETED + id = "1", + url = "url", + fileName = "1.pdf", + filePath = downloadedFile1.path, + size = "0", + contentType = null, + status = DownloadState.Status.COMPLETED ) ) @@ -118,12 +121,13 @@ class DownloadFragmentTest { val expectedList = listOf( DownloadItem( - "1", - "1.pdf", - downloadedFile0.path, - "0", - null, - DownloadState.Status.COMPLETED + id = "1", + url = "url", + fileName = "1.pdf", + filePath = downloadedFile0.path, + size = "0", + contentType = null, + status = DownloadState.Status.COMPLETED ) ) diff --git a/app/src/test/java/org/mozilla/fenix/library/downloads/DownloadInteractorTest.kt b/app/src/test/java/org/mozilla/fenix/library/downloads/DownloadInteractorTest.kt index b7ace6a3e..dc3386deb 100644 --- a/app/src/test/java/org/mozilla/fenix/library/downloads/DownloadInteractorTest.kt +++ b/app/src/test/java/org/mozilla/fenix/library/downloads/DownloadInteractorTest.kt @@ -12,7 +12,15 @@ import org.junit.Assert.assertTrue import org.junit.Test class DownloadInteractorTest { - private val downloadItem = DownloadItem("0", "title", "url", "5.6 mb", "png", DownloadState.Status.COMPLETED) + private val downloadItem = DownloadItem( + id = "0", + url = "url", + fileName = "title", + filePath = "filePath", + size = "5.6 mb", + contentType = "png", + status = DownloadState.Status.COMPLETED + ) val controller: DownloadController = mockk(relaxed = true) val interactor = DownloadInteractor(controller) From 4ee8f159dae813d93ddbcb854b2e64315e42cd24 Mon Sep 17 00:00:00 2001 From: Mozilla L10n Automation Bot Date: Tue, 27 Apr 2021 00:04:19 +0000 Subject: [PATCH 040/256] Import l10n. --- app/src/main/res/values-ast/strings.xml | 18 +++++++++++++ app/src/main/res/values-br/strings.xml | 34 +++++++++++++++++++++++++ app/src/main/res/values-ko/strings.xml | 2 +- 3 files changed, 53 insertions(+), 1 deletion(-) diff --git a/app/src/main/res/values-ast/strings.xml b/app/src/main/res/values-ast/strings.xml index c57e7a35e..dde8d7e9b 100644 --- a/app/src/main/res/values-ast/strings.xml +++ b/app/src/main/res/values-ast/strings.xml @@ -1160,6 +1160,8 @@ ¿Tienes entrugues tocante al rediseñu de %s?¿Quies saber qué camudó? Consigui les rempuestes equí + + Lleva los marcadores, l\'historial y les contraseñes de Firefox nesti preséu. @@ -1175,12 +1177,22 @@ Hebo un fallu al aniciar sesión + + Privacidá permanente + + Firefox fai automáticamente que les compañes dexen de siguite dafurto pela web. Estándar (por defeutu) + + Equilibriu ente privacidá y rindimientu. Les páxines van cargar con normalidá. Estricta (aconséyase) Estricta + + Bloquia más rastrexadores polo que les páxines van cargar más rápido mas dalgunes puen estropiase. + + Sitiu de la barra de ferramientes Restolar en privao Escoyeta d\'un estilu + + Aforra daqué de batería y amenorga\'l cansanciu de güeyos col mou escuru. Siguir l\'estilu del sistema @@ -1265,10 +1279,14 @@ en llinia y con nós. Deprender más Estándar (por defeutu) + + Equilibriu ente privacidá y rindimientu. Les páxines van cargar con normalidá. Qué se bloquia coles proteición estándar escontra\'l rastrexu Estricta + + Bloquia más rastrexadores polo que les páxines van cargar más rápido mas dalgunes puen estropiase. Lo que la proteición estricta escontra\'l rastrexu bloquia diff --git a/app/src/main/res/values-br/strings.xml b/app/src/main/res/values-br/strings.xml index 92867f22e..ca2fc2135 100644 --- a/app/src/main/res/values-br/strings.xml +++ b/app/src/main/res/values-br/strings.xml @@ -173,6 +173,8 @@ Digeriñ en arload Neuz + + Personelaat ar mod lenn Ouzhpennañ @@ -597,12 +599,16 @@ Estez prevez Ivinelloù prevez + + Ivinelloù goubredet Ouzhpennañ un ivinell Ouzhpennañ un ivinell prevez Prevez + + Goubredañ Ivinelloù digor @@ -968,6 +974,8 @@ An holl oberennoù Arveret da ziwezhañ + + Kennaskañ evit goubredañ Kennaskañ ouzh Sync @@ -1170,6 +1178,10 @@ Goulennoù hoc’h eus a-zivout ar %s nevez? Fellout a ra deoc’h gouzout pezh a zo bet cheñchet? Amañ emañ ar respontoù + + Goubredañ Firefox etre an trevnadoù + + Degasit sinedoù, ur roll-istor ha gerioù-tremen evit Firefox war an trevnad-mañ. @@ -1178,18 +1190,32 @@ Ya, kennaskit ac’hanon O kennaskañ… + + En em rollañ Chom kennasket Enaouet eo Sync C’hwitadenn war ar c’hennaskañ + + Prevezded gweredekaet bepred + + Firefox a harz en un doare emgefreek ouzh an embregerezhioù d’ho heuliañ dre guzh war ar web. Skoueriek (dre ziouer) + + Kempouezet evit prevezded hag efedusted. Ar pajennoù a garg en un doare ordinal. Strizh (erbedet) Strizh + + Stankañ muioc’h a heulierien hag ar pajennoù da gargañ buanoc’h, met arc’hweladurioù zo a c’hallo mont a-dreuz. + + Dibabit e pelec’h lakaat ho parrenn ostilhoù + + Lakait ar varrenn ostilhoù en ul lec’h aes da dizhout. Dalc’hit hi en traoñ pe diblasit anezhi e-krec’h. Merdeiñ prevez Dibabit an neuz + + Espernit batiri hag ho sell gant ar mod teñval. Emgefreek @@ -1269,10 +1297,14 @@ Gouzout hiroc’h Skoueriek (dre ziouer) + + Kempouezet evit prevezded hag efedusted. Ar pajennoù a garg en un doare ordinal. Ar pezh a zo stanket gant ar gwarez heuliañ skoueriek Strizh + + Stankañ muioc’h a heulierien hag ar pajennoù da gargañ buanoc’h, met arc’hweladurioù zo a c’hallo mont a-dreuz. Ar pezh a zo stanket gant ar gwarez heuliañ strizh @@ -1513,6 +1545,8 @@ Enrollañ ha leuniañ ar c’hartennoù en un doare emgefreek Rineget eo ar roadennoù + + Goubredañ ar c’hartennoù kred etre ho trevnadoù Ouzhpennañ ur gartenn gred diff --git a/app/src/main/res/values-ko/strings.xml b/app/src/main/res/values-ko/strings.xml index 8f969e6db..a8ebc3942 100644 --- a/app/src/main/res/values-ko/strings.xml +++ b/app/src/main/res/values-ko/strings.xml @@ -1418,7 +1418,7 @@ 이 사이트에서 보호 꺼짐 - 이 웹 사이트에 대해 향상된 추적 방지 기능이 꺼져 있습니다 + 이 웹 사이트에 향상된 추적 방지 기능이 꺼짐 뒤로 From d495d84208eca854267adaf51149fc851887d922 Mon Sep 17 00:00:00 2001 From: Mugurell Date: Mon, 26 Apr 2021 15:35:29 +0300 Subject: [PATCH 041/256] For #11819 - Show the mic in widget only if setting is enabled If "Show voice search" is disabled under Settings, the mic icon should not be shown in the search widget. --- .../settings/search/SearchEngineFragment.kt | 13 ++- .../gecko/search/SearchWidgetProvider.kt | 22 +++- .../search/SearchEngineFragmentTest.kt | 102 ++++++++++++++++++ .../fenix/widget/SearchWidgetProviderTest.kt | 71 ++++++++++++ 4 files changed, 206 insertions(+), 2 deletions(-) create mode 100644 app/src/test/java/org/mozilla/fenix/settings/search/SearchEngineFragmentTest.kt diff --git a/app/src/main/java/org/mozilla/fenix/settings/search/SearchEngineFragment.kt b/app/src/main/java/org/mozilla/fenix/settings/search/SearchEngineFragment.kt index 41d648b57..b519d9c5d 100644 --- a/app/src/main/java/org/mozilla/fenix/settings/search/SearchEngineFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/settings/search/SearchEngineFragment.kt @@ -5,6 +5,7 @@ package org.mozilla.fenix.settings.search import android.os.Bundle +import androidx.core.content.edit import androidx.navigation.fragment.findNavController import androidx.preference.CheckBoxPreference import androidx.preference.Preference @@ -18,6 +19,7 @@ import org.mozilla.fenix.ext.settings import org.mozilla.fenix.ext.showToolbar import org.mozilla.fenix.settings.SharedPreferenceUpdater import org.mozilla.fenix.settings.requirePreference +import org.mozilla.gecko.search.SearchWidgetProvider class SearchEngineFragment : PreferenceFragmentCompat() { @@ -83,7 +85,16 @@ class SearchEngineFragment : PreferenceFragmentCompat() { showSyncedTabsSuggestions.onPreferenceChangeListener = SharedPreferenceUpdater() showClipboardSuggestions.onPreferenceChangeListener = SharedPreferenceUpdater() searchSuggestionsInPrivatePreference.onPreferenceChangeListener = SharedPreferenceUpdater() - showVoiceSearchPreference.onPreferenceChangeListener = SharedPreferenceUpdater() + showVoiceSearchPreference.onPreferenceChangeListener = object : Preference.OnPreferenceChangeListener { + override fun onPreferenceChange(preference: Preference, newValue: Any?): Boolean { + val newBooleanValue = newValue as? Boolean ?: return false + requireContext().settings().preferences.edit { + putBoolean(preference.key, newBooleanValue) + } + SearchWidgetProvider.updateAllWidgets(requireContext()) + return true + } + } autocompleteURLsPreference.onPreferenceChangeListener = SharedPreferenceUpdater() searchSuggestionsPreference.setOnPreferenceClickListener { diff --git a/app/src/main/java/org/mozilla/gecko/search/SearchWidgetProvider.kt b/app/src/main/java/org/mozilla/gecko/search/SearchWidgetProvider.kt index 57a62160d..87d39ae32 100644 --- a/app/src/main/java/org/mozilla/gecko/search/SearchWidgetProvider.kt +++ b/app/src/main/java/org/mozilla/gecko/search/SearchWidgetProvider.kt @@ -8,6 +8,7 @@ import android.app.PendingIntent import android.appwidget.AppWidgetManager import android.appwidget.AppWidgetManager.OPTION_APPWIDGET_MIN_WIDTH import android.appwidget.AppWidgetProvider +import android.content.ComponentName import android.content.Context import android.content.Intent import android.os.Build @@ -98,7 +99,12 @@ class SearchWidgetProvider : AppWidgetProvider() { /** * Builds pending intent that starts a new voice search. */ - private fun createVoiceSearchIntent(context: Context): PendingIntent? { + @VisibleForTesting + internal fun createVoiceSearchIntent(context: Context): PendingIntent? { + if (!context.settings().shouldShowVoiceSearch) { + return null + } + val voiceIntent = Intent(context, VoiceSearchActivity::class.java).apply { flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK putExtra(SPEECH_PROCESSING, true) @@ -172,6 +178,20 @@ class SearchWidgetProvider : AppWidgetProvider() { private const val REQUEST_CODE_NEW_TAB = 0 private const val REQUEST_CODE_VOICE = 1 + fun updateAllWidgets(context: Context) { + val widgetManager = AppWidgetManager.getInstance(context) + val widgetIds = widgetManager.getAppWidgetIds(ComponentName(context, SearchWidgetProvider::class.java)) + + if (widgetIds.isNotEmpty()) { + context.sendBroadcast( + Intent(context, SearchWidgetProvider::class.java).apply { + action = AppWidgetManager.ACTION_APPWIDGET_UPDATE + putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, widgetIds) + } + ) + } + } + @VisibleForTesting internal fun getLayoutSize(@Dimension(unit = DP) dp: Int) = when { dp >= DP_LARGE -> SearchWidgetProviderSize.LARGE diff --git a/app/src/test/java/org/mozilla/fenix/settings/search/SearchEngineFragmentTest.kt b/app/src/test/java/org/mozilla/fenix/settings/search/SearchEngineFragmentTest.kt new file mode 100644 index 000000000..5710d2fab --- /dev/null +++ b/app/src/test/java/org/mozilla/fenix/settings/search/SearchEngineFragmentTest.kt @@ -0,0 +1,102 @@ +/* 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/. */ + +package org.mozilla.fenix.settings.search + +import android.content.SharedPreferences +import androidx.preference.CheckBoxPreference +import androidx.preference.SwitchPreference +import io.mockk.every +import io.mockk.mockk +import io.mockk.mockkObject +import io.mockk.spyk +import io.mockk.unmockkObject +import io.mockk.verify +import mozilla.components.support.test.robolectric.testContext +import org.junit.Test +import org.junit.runner.RunWith +import org.mozilla.fenix.HomeActivity +import org.mozilla.fenix.R +import org.mozilla.fenix.ext.settings +import org.mozilla.fenix.helpers.FenixRobolectricTestRunner +import org.mozilla.gecko.search.SearchWidgetProvider + +@RunWith(FenixRobolectricTestRunner::class) +class SearchEngineFragmentTest { + @Test + fun `GIVEN pref_key_show_voice_search setting WHEN it is modified THEN the value is persisted and widgets updated`() { + try { + mockkObject(SearchWidgetProvider.Companion) + + val preferences: SharedPreferences = mockk() + val preferencesEditor: SharedPreferences.Editor = mockk(relaxed = true) + every { testContext.settings().preferences } returns preferences + every { preferences.edit() } returns preferencesEditor + val fragment = spyk(SearchEngineFragment()) { + every { context } returns testContext + every { isAdded } returns true + every { activity } returns mockk(relaxed = true) + } + val voiceSearchPreferenceKey = testContext.getString(R.string.pref_key_show_voice_search) + val voiceSearchPreference = spyk(SwitchPreference(testContext)) { + every { key } returns voiceSearchPreferenceKey + } + // The type needed for "fragment.findPreference" / "fragment.requirePreference" is erased at compile time. + // Hence we need individual mocks, specific for each preference's type. + every { + fragment.findPreference(testContext.getString(R.string.pref_key_show_search_suggestions)) + } returns mockk(relaxed = true) { + every { context } returns testContext + } + every { + fragment.findPreference(testContext.getString(R.string.pref_key_enable_autocomplete_urls)) + } returns mockk(relaxed = true) { + every { context } returns testContext + } + every { + fragment.findPreference(testContext.getString(R.string.pref_key_show_search_suggestions_in_private)) + } returns mockk(relaxed = true) { + every { context } returns testContext + } + every { + fragment.findPreference(testContext.getString(R.string.pref_key_show_search_engine_shortcuts)) + } returns mockk(relaxed = true) { + every { context } returns testContext + } + every { + fragment.findPreference(testContext.getString(R.string.pref_key_search_browsing_history)) + } returns mockk(relaxed = true) { + every { context } returns testContext + } + every { + fragment.findPreference(testContext.getString(R.string.pref_key_search_bookmarks)) + } returns mockk(relaxed = true) { + every { context } returns testContext + } + every { + fragment.findPreference(testContext.getString(R.string.pref_key_search_synced_tabs)) + } returns mockk(relaxed = true) { + every { context } returns testContext + } + every { + fragment.findPreference(testContext.getString(R.string.pref_key_show_clipboard_suggestions)) + } returns mockk(relaxed = true) { + every { context } returns testContext + } + // This preference is the sole purpose of this test + every { + fragment.findPreference(voiceSearchPreferenceKey) + } returns voiceSearchPreference + + // Trigger the preferences setup. + fragment.onResume() + voiceSearchPreference.callChangeListener(true) + + verify { preferencesEditor.putBoolean(voiceSearchPreferenceKey, true) } + verify { SearchWidgetProvider.updateAllWidgets(testContext) } + } finally { + unmockkObject(SearchWidgetProvider.Companion) + } + } +} diff --git a/app/src/test/java/org/mozilla/fenix/widget/SearchWidgetProviderTest.kt b/app/src/test/java/org/mozilla/fenix/widget/SearchWidgetProviderTest.kt index 34ff21d76..6244dc55c 100644 --- a/app/src/test/java/org/mozilla/fenix/widget/SearchWidgetProviderTest.kt +++ b/app/src/test/java/org/mozilla/fenix/widget/SearchWidgetProviderTest.kt @@ -4,16 +4,29 @@ package org.mozilla.fenix.widget +import android.appwidget.AppWidgetManager +import android.content.ComponentName import android.content.Context +import android.content.Intent +import io.mockk.Runs import io.mockk.every +import io.mockk.just import io.mockk.mockk +import io.mockk.mockkStatic +import io.mockk.slot +import io.mockk.unmockkStatic +import io.mockk.verify import org.junit.Assert.assertEquals import org.junit.Assert.assertNull import org.junit.Test +import org.junit.runner.RunWith import org.mozilla.fenix.R +import org.mozilla.fenix.ext.settings +import org.mozilla.fenix.helpers.FenixRobolectricTestRunner import org.mozilla.gecko.search.SearchWidgetProvider import org.mozilla.gecko.search.SearchWidgetProviderSize +@RunWith(FenixRobolectricTestRunner::class) class SearchWidgetProviderTest { @Test @@ -115,4 +128,62 @@ class SearchWidgetProviderTest { assertNull(SearchWidgetProvider.getText(SearchWidgetProviderSize.EXTRA_SMALL_V1, context)) assertNull(SearchWidgetProvider.getText(SearchWidgetProviderSize.EXTRA_SMALL_V2, context)) } + + @Test + fun `GIVEN voice search is disabled WHEN createVoiceSearchIntent is called THEN it returns null`() { + val widgetProvider = SearchWidgetProvider() + val context: Context = mockk { + every { settings().shouldShowVoiceSearch } returns false + } + + val result = widgetProvider.createVoiceSearchIntent(context) + + assertNull(result) + } + + @Test + fun `GIVEN widgets set on screen shown WHEN updateAllWidgets is called THEN it sends a broadcast to update all widgets`() { + try { + mockkStatic(AppWidgetManager::class) + val widgetManager: AppWidgetManager = mockk() + every { AppWidgetManager.getInstance(any()) } returns widgetManager + val componentNameCaptor = slot() + val widgetsToUpdate = intArrayOf(1, 2) + every { widgetManager.getAppWidgetIds(capture(componentNameCaptor)) } returns widgetsToUpdate + val context: Context = mockk(relaxed = true) + val intentCaptor = slot() + every { context.sendBroadcast(capture(intentCaptor)) } just Runs + + SearchWidgetProvider.updateAllWidgets(context) + + verify { context.sendBroadcast(any()) } + assertEquals(SearchWidgetProvider::class.java.name, componentNameCaptor.captured.className) + assertEquals(SearchWidgetProvider::class.java.name, intentCaptor.captured.component!!.className) + assertEquals(AppWidgetManager.ACTION_APPWIDGET_UPDATE, intentCaptor.captured.action) + assertEquals(widgetsToUpdate, intentCaptor.captured.extras!!.get(AppWidgetManager.EXTRA_APPWIDGET_IDS)) + } finally { + unmockkStatic(AppWidgetManager::class) + } + } + + @Test + fun `GIVEN no widgets set shown WHEN updateAllWidgets is called THEN it does not try to update widgets`() { + try { + mockkStatic(AppWidgetManager::class) + val widgetManager: AppWidgetManager = mockk() + every { AppWidgetManager.getInstance(any()) } returns widgetManager + val componentNameCaptor = slot() + val widgetsToUpdate = intArrayOf() + every { widgetManager.getAppWidgetIds(capture(componentNameCaptor)) } returns widgetsToUpdate + val context: Context = mockk(relaxed = true) + val intentCaptor = slot() + every { context.sendBroadcast(capture(intentCaptor)) } just Runs + + SearchWidgetProvider.updateAllWidgets(context) + + verify(exactly = 0) { context.sendBroadcast(any()) } + } finally { + unmockkStatic(AppWidgetManager::class) + } + } } From 8c0f86bd96f7eae4d5cfb7af09eaa770aff06837 Mon Sep 17 00:00:00 2001 From: mcarare Date: Fri, 23 Apr 2021 18:33:52 +0300 Subject: [PATCH 042/256] For #19213: Adjust synced tabs to properly show in RTL. --- .../main/java/org/mozilla/fenix/sync/SyncedTabsViewHolder.kt | 2 +- app/src/main/res/layout/view_synced_tabs_group.xml | 1 + .../java/org/mozilla/fenix/sync/SyncedTabsViewHolderTest.kt | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/mozilla/fenix/sync/SyncedTabsViewHolder.kt b/app/src/main/java/org/mozilla/fenix/sync/SyncedTabsViewHolder.kt index 375cec1e6..3b45a1e66 100644 --- a/app/src/main/java/org/mozilla/fenix/sync/SyncedTabsViewHolder.kt +++ b/app/src/main/java/org/mozilla/fenix/sync/SyncedTabsViewHolder.kt @@ -87,7 +87,7 @@ sealed class SyncedTabsViewHolder(itemView: View) : RecyclerView.ViewHolder(item } itemView.synced_tabs_group_name.text = device.device.displayName - itemView.synced_tabs_group_name.setCompoundDrawablesWithIntrinsicBounds( + itemView.synced_tabs_group_name.setCompoundDrawablesRelativeWithIntrinsicBounds( deviceLogoDrawable, 0, 0, diff --git a/app/src/main/res/layout/view_synced_tabs_group.xml b/app/src/main/res/layout/view_synced_tabs_group.xml index fe0083253..91abefcc5 100644 --- a/app/src/main/res/layout/view_synced_tabs_group.xml +++ b/app/src/main/res/layout/view_synced_tabs_group.xml @@ -22,6 +22,7 @@ android:textAppearance="@style/Header14TextStyle" android:textColor="@color/primary_text_normal_theme" android:textSize="12sp" + android:textDirection="locale" app:drawableStartCompat="@drawable/mozac_ic_device_desktop" app:drawableTint="@color/primary_text_normal_theme" app:layout_constraintEnd_toEndOf="parent" diff --git a/app/src/test/java/org/mozilla/fenix/sync/SyncedTabsViewHolderTest.kt b/app/src/test/java/org/mozilla/fenix/sync/SyncedTabsViewHolderTest.kt index 3f8b06fd2..a69ba5d4f 100644 --- a/app/src/test/java/org/mozilla/fenix/sync/SyncedTabsViewHolderTest.kt +++ b/app/src/test/java/org/mozilla/fenix/sync/SyncedTabsViewHolderTest.kt @@ -101,7 +101,7 @@ class SyncedTabsViewHolderTest { verify { deviceViewGroupName.text = "Charcoal" } verify { - deviceViewGroupName.setCompoundDrawablesWithIntrinsicBounds( + deviceViewGroupName.setCompoundDrawablesRelativeWithIntrinsicBounds( R.drawable.mozac_ic_device_desktop, 0, 0, 0 ) } @@ -117,7 +117,7 @@ class SyncedTabsViewHolderTest { verify { deviceViewGroupName.text = "Emerald" } verify { - deviceViewGroupName.setCompoundDrawablesWithIntrinsicBounds( + deviceViewGroupName.setCompoundDrawablesRelativeWithIntrinsicBounds( R.drawable.mozac_ic_device_mobile, 0, 0, 0 ) } From 21cf0b31a456f9d9af1d8b7329ed750bcfaed54f Mon Sep 17 00:00:00 2001 From: Arturo Mejia Date: Thu, 15 Apr 2021 00:23:38 -0400 Subject: [PATCH 043/256] For issue #18132 update to proton icons first batch --- .../components/toolbar/DefaultToolbarMenu.kt | 3 +- app/src/main/res/drawable-v24/shield_dark.xml | 36 ++++++++++-------- .../main/res/drawable-v24/shield_light.xml | 34 +++++++++-------- .../res/drawable/ic_addons_extensions.xml | 2 +- app/src/main/res/drawable/ic_alert.xml | 12 ++++-- .../main/res/drawable/ic_arrowhead_right.xml | 6 +-- .../main/res/drawable/ic_bookmark_list.xml | 7 +++- .../main/res/drawable/ic_bookmark_outline.xml | 2 +- .../main/res/drawable/ic_bookmarks_menu.xml | 7 +++- app/src/main/res/drawable/ic_clear.xml | 6 +-- app/src/main/res/drawable/ic_close.xml | 2 +- app/src/main/res/drawable/ic_delete.xml | 7 +++- app/src/main/res/drawable/ic_desktop.xml | 2 +- app/src/main/res/drawable/ic_download.xml | 5 ++- app/src/main/res/drawable/ic_fab_sync.xml | 25 ++++++------ app/src/main/res/drawable/ic_info.xml | 7 +++- app/src/main/res/drawable/ic_link_enabled.xml | 8 +++- app/src/main/res/drawable/ic_new.xml | 2 +- .../ic_onboarding_tracking_protection.xml | 34 ++++++++++------- .../main/res/drawable/ic_private_browsing.xml | 2 +- app/src/main/res/drawable/ic_qr.xml | 2 +- app/src/main/res/drawable/ic_readermode.xml | 5 ++- .../res/drawable/ic_readermode_selected.xml | 15 +++++++- app/src/main/res/drawable/ic_search.xml | 2 +- app/src/main/res/drawable/ic_settings.xml | 7 +++- app/src/main/res/drawable/ic_synced_tabs.xml | 4 +- app/src/main/res/drawable/ic_tabs.xml | 2 +- .../res/drawable/ic_tracking_protection.xml | 8 ---- .../ic_tracking_protection_anim_disable.xml | 11 ------ .../ic_tracking_protection_anim_enable.xml | 11 ------ .../ic_tracking_protection_disabled.xml | 23 +++-------- .../ic_tracking_protection_enabled.xml | 28 ++++---------- app/src/main/res/drawable/ic_whats_new.xml | 2 +- .../drawable/mozac_ic_extensions_black.xml | 6 +-- .../res/drawable/private_browsing_button.xml | 2 +- app/src/main/res/drawable/shield_dark.xml | 7 ++-- app/src/main/res/drawable/shield_light.xml | 5 +-- .../layout/component_collection_creation.xml | 2 +- ...nt_collection_creation_name_collection.xml | 2 +- .../res/layout/download_dialog_layout.xml | 2 +- .../quicksettings_tracking_protection.xml | 38 ------------------- app/src/main/res/layout/share_close.xml | 2 +- .../main/res/layout/tab_tray_grid_item.xml | 2 +- app/src/main/res/layout/tab_tray_item.xml | 2 +- app/src/main/res/values/strings.xml | 3 -- 45 files changed, 181 insertions(+), 221 deletions(-) delete mode 100644 app/src/main/res/drawable/ic_tracking_protection_anim_disable.xml delete mode 100644 app/src/main/res/drawable/ic_tracking_protection_anim_enable.xml delete mode 100644 app/src/main/res/layout/quicksettings_tracking_protection.xml diff --git a/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt b/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt index 985644685..e69222611 100644 --- a/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt +++ b/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt @@ -91,7 +91,8 @@ open class DefaultToolbarMenu( endOfMenuAlwaysVisible = shouldUseBottomToolbar, store = store, style = WebExtensionBrowserMenuBuilder.Style( - webExtIconTintColorResource = primaryTextColor() + webExtIconTintColorResource = primaryTextColor(), + addonsManagerMenuItemDrawableRes = R.drawable.ic_addons_extensions ), onAddonsManagerTapped = { onItemTapped.invoke(ToolbarMenu.Item.AddonsManager) diff --git a/app/src/main/res/drawable-v24/shield_dark.xml b/app/src/main/res/drawable-v24/shield_dark.xml index a40e505f4..0e322f569 100644 --- a/app/src/main/res/drawable-v24/shield_dark.xml +++ b/app/src/main/res/drawable-v24/shield_dark.xml @@ -13,23 +13,27 @@ android:viewportHeight="24"> + + android:pathData="M12.0002,22C11.5342,22 11.0662,21.885 10.6462,21.668C8.4962,20.547 6.5242,18.735 5.0942,16.566C4.3852,15.493 3.8882,14.198 3.6162,12.716L2.9092,8.872C2.6692,7.563 3.2942,6.259 4.4632,5.625L10.5652,2.363C11.4632,1.88 12.5362,1.88 13.4322,2.359L19.5342,5.682C20.7082,6.313 21.3352,7.621 21.0912,8.936L20.3862,12.728C20.1152,14.201 19.6172,15.49 18.9112,16.56C17.4822,18.729 15.5102,20.542 13.3562,21.666C12.9372,21.885 12.4682,22 12.0002,22ZM11.5152,3.556L4.8452,7.13L4.3382,8.368L5.0922,12.445C5.3272,13.727 5.7502,14.836 6.3472,15.74C7.6392,17.7 9.4122,19.332 11.3392,20.337H12.6632C14.5932,19.329 16.3672,17.694 17.6582,15.735C18.2532,14.833 18.6752,13.729 18.9102,12.455L19.6632,8.368L19.0532,7.129L12.4942,3.557H11.5152V3.556Z"> + android:endX="3" + android:endY="22" + android:startX="21" + android:startY="2" + android:type="linear"> + + + @@ -41,8 +45,8 @@ android:duration="330" android:interpolator="@android:interpolator/fast_out_slow_in" android:propertyName="pathData" - android:valueFrom="M 20 6 C 20 5 19.2 4.1 18.2 4 L 12 3 L 5.8 4 C 4.8 4 4 5 4 6 L 4.1 11 C 4.4 14.2 5.1 16 6.6 18 C 7.929 19.627 9.821 20.698 11.9 21 L 12.1 21 C 14.2 20.7 16.1 19.6 17.4 18 C 19 16 19.6 14.2 19.9 11 L 20 6 Z M 17.9 10.8 C 17.9 12.963 17.198 15.069 15.9 16.8 C 14.9 17.9 13.5 18.8 12 19.1 C 10.452 18.8 9.066 17.946 8.1 16.7 C 6.816 15 6.114 12.93 6.1 10.8 C 6.041 9.167 6.041 7.533 6.1 5.9 L 12 5 L 17.9 6 L 18 6.2 L 17.9 10.9 Z M 8 7.6 L 8 10.6 C 8.3 13.3 8.8 14.3 9.7 15.6 C 10.3 16.2 11.1 16.8 12 17 L 12 7 L 8 7.6 Z" - android:valueTo="M 20 6 C 20 5 19.2 4.1 18.2 4 L 12 3 L 5.8 4 C 4.8 4 4 5 4 6 L 4.1 11 C 4.4 14.2 5.1 16 6.6 18 C 7.929 19.627 9.821 20.698 11.9 21 L 12.1 21 C 14.2 20.7 16.1 19.6 17.4 18 C 19 16 19.6 14.2 19.9 11 L 20 6 Z M 17.9 10.8 C 17.9 12.963 17.198 15.069 15.9 16.8 C 14.9 17.9 13.5 18.8 12 19.1 C 10.452 18.8 9.066 17.946 8.1 16.7 C 6.816 15 6.114 12.93 6.1 10.8 C 6.041 9.167 6.041 7.533 6.1 5.9 L 12 5 L 17.9 6 L 18 6.2 L 17.9 10.9 Z M 8 7.6 L 8 10.6 C 8.3 13.3 8.8 14.3 9.7 15.6 C 10.3 16.2 11.1 16.8 12 17 L 12 7 L 8 7.6 Z" + android:valueFrom="M12.0002,22C11.5342,22 11.0662,21.885 10.6462,21.668C8.4962,20.547 6.5242,18.735 5.0942,16.566C4.3852,15.493 3.8882,14.198 3.6162,12.716L2.9092,8.872C2.6692,7.563 3.2942,6.259 4.4632,5.625L10.5652,2.363C11.4632,1.88 12.5362,1.88 13.4322,2.359L19.5342,5.682C20.7082,6.313 21.3352,7.621 21.0912,8.936L20.3862,12.728C20.1152,14.201 19.6172,15.49 18.9112,16.56C17.4822,18.729 15.5102,20.542 13.3562,21.666C12.9372,21.885 12.4682,22 12.0002,22ZM11.5152,3.556L4.8452,7.13L4.3382,8.368L5.0922,12.445C5.3272,13.727 5.7502,14.836 6.3472,15.74C7.6392,17.7 9.4122,19.332 11.3392,20.337H12.6632C14.5932,19.329 16.3672,17.694 17.6582,15.735C18.2532,14.833 18.6752,13.729 18.9102,12.455L19.6632,8.368L19.0532,7.129L12.4942,3.557H11.5152V3.556Z" + android:valueTo="M12.0002,22C11.5342,22 11.0662,21.885 10.6462,21.668C8.4962,20.547 6.5242,18.735 5.0942,16.566C4.3852,15.493 3.8882,14.198 3.6162,12.716L2.9092,8.872C2.6692,7.563 3.2942,6.259 4.4632,5.625L10.5652,2.363C11.4632,1.88 12.5362,1.88 13.4322,2.359L19.5342,5.682C20.7082,6.313 21.3352,7.621 21.0912,8.936L20.3862,12.728C20.1152,14.201 19.6172,15.49 18.9112,16.56C17.4822,18.729 15.5102,20.542 13.3562,21.666C12.9372,21.885 12.4682,22 12.0002,22ZM11.5152,3.556L4.8452,7.13L4.3382,8.368L5.0922,12.445C5.3272,13.727 5.7502,14.836 6.3472,15.74C7.6392,17.7 9.4122,19.332 11.3392,20.337H12.6632C14.5932,19.329 16.3672,17.694 17.6582,15.735C18.2532,14.833 18.6752,13.729 18.9102,12.455L19.6632,8.368L19.0532,7.129L12.4942,3.557H11.5152V3.556Z" android:valueType="pathType" /> + + android:pathData="M12.0002,22C11.5342,22 11.0662,21.885 10.6462,21.668C8.4962,20.547 6.5242,18.735 5.0942,16.566C4.3852,15.493 3.8882,14.198 3.6162,12.716L2.9092,8.872C2.6692,7.563 3.2942,6.259 4.4632,5.625L10.5652,2.363C11.4632,1.88 12.5362,1.88 13.4322,2.359L19.5342,5.682C20.7082,6.313 21.3352,7.621 21.0912,8.936L20.3862,12.728C20.1152,14.201 19.6172,15.49 18.9112,16.56C17.4822,18.729 15.5102,20.542 13.3562,21.666C12.9372,21.885 12.4682,22 12.0002,22ZM11.5152,3.556L4.8452,7.13L4.3382,8.368L5.0922,12.445C5.3272,13.727 5.7502,14.836 6.3472,15.74C7.6392,17.7 9.4122,19.332 11.3392,20.337H12.6632C14.5932,19.329 16.3672,17.694 17.6582,15.735C18.2532,14.833 18.6752,13.729 18.9102,12.455L19.6632,8.368L19.0532,7.129L12.4942,3.557H11.5152V3.556Z"> + android:endX="3" + android:endY="22" + android:startX="21" + android:startY="2" + android:type="linear"> + + + @@ -41,8 +45,8 @@ android:duration="330" android:interpolator="@android:interpolator/fast_out_slow_in" android:propertyName="pathData" - android:valueFrom="M 20 6 C 20 5 19.2 4.1 18.2 4 L 12 3 L 5.8 4 C 4.8 4 4 5 4 6 L 4.1 11 C 4.4 14.2 5.1 16 6.6 18 C 7.929 19.627 9.821 20.698 11.9 21 L 12.1 21 C 14.2 20.7 16.1 19.6 17.4 18 C 19 16 19.6 14.2 19.9 11 L 20 6 Z M 17.9 10.8 C 17.9 12.963 17.198 15.069 15.9 16.8 C 14.9 17.9 13.5 18.8 12 19.1 C 10.452 18.8 9.066 17.946 8.1 16.7 C 6.816 15 6.114 12.93 6.1 10.8 C 6.041 9.167 6.041 7.533 6.1 5.9 L 12 5 L 17.9 6 L 18 6.2 L 17.9 10.9 Z M 8 7.6 L 8 10.6 C 8.3 13.3 8.8 14.3 9.7 15.6 C 10.3 16.2 11.1 16.8 12 17 L 12 7 L 8 7.6 Z" - android:valueTo="M 20 6 C 20 5 19.2 4.1 18.2 4 L 12 3 L 5.8 4 C 4.8 4 4 5 4 6 L 4.1 11 C 4.4 14.2 5.1 16 6.6 18 C 7.929 19.627 9.821 20.698 11.9 21 L 12.1 21 C 14.2 20.7 16.1 19.6 17.4 18 C 19 16 19.6 14.2 19.9 11 L 20 6 Z M 17.9 10.8 C 17.9 12.963 17.198 15.069 15.9 16.8 C 14.9 17.9 13.5 18.8 12 19.1 C 10.452 18.8 9.066 17.946 8.1 16.7 C 6.816 15 6.114 12.93 6.1 10.8 C 6.041 9.167 6.041 7.533 6.1 5.9 L 12 5 L 17.9 6 L 18 6.2 L 17.9 10.9 Z M 8 7.6 L 8 10.6 C 8.3 13.3 8.8 14.3 9.7 15.6 C 10.3 16.2 11.1 16.8 12 17 L 12 7 L 8 7.6 Z" + android:valueFrom="M12.0002,22C11.5342,22 11.0662,21.885 10.6462,21.668C8.4962,20.547 6.5242,18.735 5.0942,16.566C4.3852,15.493 3.8882,14.198 3.6162,12.716L2.9092,8.872C2.6692,7.563 3.2942,6.259 4.4632,5.625L10.5652,2.363C11.4632,1.88 12.5362,1.88 13.4322,2.359L19.5342,5.682C20.7082,6.313 21.3352,7.621 21.0912,8.936L20.3862,12.728C20.1152,14.201 19.6172,15.49 18.9112,16.56C17.4822,18.729 15.5102,20.542 13.3562,21.666C12.9372,21.885 12.4682,22 12.0002,22ZM11.5152,3.556L4.8452,7.13L4.3382,8.368L5.0922,12.445C5.3272,13.727 5.7502,14.836 6.3472,15.74C7.6392,17.7 9.4122,19.332 11.3392,20.337H12.6632C14.5932,19.329 16.3672,17.694 17.6582,15.735C18.2532,14.833 18.6752,13.729 18.9102,12.455L19.6632,8.368L19.0532,7.129L12.4942,3.557H11.5152V3.556Z" + android:valueTo="M12.0002,22C11.5342,22 11.0662,21.885 10.6462,21.668C8.4962,20.547 6.5242,18.735 5.0942,16.566C4.3852,15.493 3.8882,14.198 3.6162,12.716L2.9092,8.872C2.6692,7.563 3.2942,6.259 4.4632,5.625L10.5652,2.363C11.4632,1.88 12.5362,1.88 13.4322,2.359L19.5342,5.682C20.7082,6.313 21.3352,7.621 21.0912,8.936L20.3862,12.728C20.1152,14.201 19.6172,15.49 18.9112,16.56C17.4822,18.729 15.5102,20.542 13.3562,21.666C12.9372,21.885 12.4682,22 12.0002,22ZM11.5152,3.556L4.8452,7.13L4.3382,8.368L5.0922,12.445C5.3272,13.727 5.7502,14.836 6.3472,15.74C7.6392,17.7 9.4122,19.332 11.3392,20.337H12.6632C14.5932,19.329 16.3672,17.694 17.6582,15.735C18.2532,14.833 18.6752,13.729 18.9102,12.455L19.6632,8.368L19.0532,7.129L12.4942,3.557H11.5152V3.556Z" android:valueType="pathType" /> diff --git a/app/src/main/res/drawable/ic_alert.xml b/app/src/main/res/drawable/ic_alert.xml index 1546d32e6..94ab8c95e 100644 --- a/app/src/main/res/drawable/ic_alert.xml +++ b/app/src/main/res/drawable/ic_alert.xml @@ -8,6 +8,12 @@ android:viewportWidth="24" android:viewportHeight="24"> - + android:fillColor="@color/sync_error_text_color" + android:pathData="M11.75,7C11.336,7 11,7.336 11,7.75V13.25C11,13.664 11.336,14 11.75,14C12.164,14 12.5,13.664 12.5,13.25V7.75C12.5,7.336 12.164,7 11.75,7Z" /> + + + diff --git a/app/src/main/res/drawable/ic_arrowhead_right.xml b/app/src/main/res/drawable/ic_arrowhead_right.xml index c899ca92f..268da1cce 100644 --- a/app/src/main/res/drawable/ic_arrowhead_right.xml +++ b/app/src/main/res/drawable/ic_arrowhead_right.xml @@ -5,9 +5,9 @@ android:width="24dp" android:height="24dp" android:autoMirrored="true" - android:viewportWidth="7" - android:viewportHeight="13"> + android:viewportWidth="24" + android:viewportHeight="24"> + android:pathData="M14.289,12 L7.57,5.28a0.75,0.75 0,1 1,1.061 -1.061l7.37,7.37v0.821l-7.37,7.37a0.748,0.748 0,0 1,-1.061 0,0.75 0.75,0 0,1 0,-1.061L14.289,12z" /> diff --git a/app/src/main/res/drawable/ic_bookmark_list.xml b/app/src/main/res/drawable/ic_bookmark_list.xml index eec7c8ffe..9937d1a68 100644 --- a/app/src/main/res/drawable/ic_bookmark_list.xml +++ b/app/src/main/res/drawable/ic_bookmark_list.xml @@ -10,6 +10,9 @@ android:viewportWidth="24" android:viewportHeight="24"> + android:pathData="m7.225,11.324 l-2.86,-2.375a1.207,1.207 0,0 1,-0.378 -1.309,1.205 1.205,0 0,1 1.074,-0.835l3.697,-0.239 0.501,-0.375 1.364,-3.427A1.209,1.209 0,0 1,11.75 2c0.499,0 0.941,0.3 1.127,0.763v0.001l1.364,3.427 0.501,0.375 3.697,0.239c0.498,0.032 0.92,0.36 1.074,0.835 0.155,0.476 0.006,0.99 -0.378,1.309L16.28,11.32l-0.18,0.592 0.91,3.575c0.123,0.485 -0.059,0.986 -0.463,1.279a1.202,1.202 0,0 1,-1.359 0.046l-3.127,-1.977h-0.621l-3.126,1.977c-0.426,0.266 -0.96,0.247 -1.361,-0.045a1.205,1.205 0,0 1,-0.463 -1.279l0.908,-3.566 -0.173,-0.598z" + android:fillColor="?primaryText"/> + diff --git a/app/src/main/res/drawable/ic_bookmark_outline.xml b/app/src/main/res/drawable/ic_bookmark_outline.xml index da59f26a6..67c872b2b 100644 --- a/app/src/main/res/drawable/ic_bookmark_outline.xml +++ b/app/src/main/res/drawable/ic_bookmark_outline.xml @@ -9,5 +9,5 @@ android:viewportHeight="24"> + android:pathData="M16.6,21.1a2,2 0,0 1,-1.2 -0.3l-3.3,-2H12l-3.3,2c-0.8,0.5 -1.7,0.4 -2.4,0a2,2 0,0 1,-0.8 -2.3l1,-3.8 -0.1,-0.2 -3,-2.5a2,2 0,0 1,-0.7 -2.3,2 2,0 0,1 1.9,-1.5L8.4,8l0.2,-0.2L10,4.2a2.1,2.1 0,0 1,2 -1.3c0.9,0 1.6,0.5 2,1.3l1.4,3.6 0.2,0.2 4,0.2a2,2 0,0 1,1.8 1.5,2 2,0 0,1 -0.7,2.3l-3,2.5v0.2l1,3.8a2,2 0,0 1,-0.9 2.2,2 2,0 0,1 -1.2,0.4zM12,4.4a0.6,0.6 0,0 0,-0.6 0.3l-1.6,4 -0.9,0.8 -4.3,0.2a0.6,0.6 0,0 0,-0.6 0.5,0.6 0.6,0 0,0 0.2,0.6l3.4,2.8 0.3,1L7,19a0.6,0.6 0,0 0,0.2 0.6,0.6 0.6,0 0,0 0.7,0l3.6,-2.3h1.2l3.6,2.3c0.2,0.2 0.5,0.2 0.7,0a0.6,0.6 0,0 0,0.3 -0.6L16,14.7l0.3,-1.1 3.4,-2.8a0.6,0.6 0,0 0,0.2 -0.6,0.6 0.6,0 0,0 -0.6,-0.5l-4.3,-0.2 -1,-0.7 -1.5,-4a0.6,0.6 0,0 0,-0.6 -0.4z" /> diff --git a/app/src/main/res/drawable/ic_bookmarks_menu.xml b/app/src/main/res/drawable/ic_bookmarks_menu.xml index b0ef0537a..fce6d6829 100644 --- a/app/src/main/res/drawable/ic_bookmarks_menu.xml +++ b/app/src/main/res/drawable/ic_bookmarks_menu.xml @@ -8,6 +8,9 @@ android:viewportWidth="24" android:viewportHeight="24"> + android:pathData="m7.225,11.324 l-2.86,-2.375a1.207,1.207 0,0 1,-0.378 -1.309,1.205 1.205,0 0,1 1.074,-0.835l3.697,-0.239 0.501,-0.375 1.364,-3.427A1.209,1.209 0,0 1,11.75 2c0.499,0 0.941,0.3 1.127,0.763v0.001l1.364,3.427 0.501,0.375 3.697,0.239c0.498,0.032 0.92,0.36 1.074,0.835 0.155,0.476 0.006,0.99 -0.378,1.309L16.28,11.32l-0.18,0.592 0.91,3.575c0.123,0.485 -0.059,0.986 -0.463,1.279a1.202,1.202 0,0 1,-1.359 0.046l-3.127,-1.977h-0.621l-3.126,1.977c-0.426,0.266 -0.96,0.247 -1.361,-0.045a1.205,1.205 0,0 1,-0.463 -1.279l0.908,-3.566 -0.173,-0.598z" + android:fillColor="?primaryText"/> + diff --git a/app/src/main/res/drawable/ic_clear.xml b/app/src/main/res/drawable/ic_clear.xml index 04435d15c..049b0b031 100644 --- a/app/src/main/res/drawable/ic_clear.xml +++ b/app/src/main/res/drawable/ic_clear.xml @@ -5,9 +5,9 @@ + android:viewportWidth="20" + android:viewportHeight="20"> + android:pathData="M10,2.5C5.858,2.5 2.5,5.858 2.5,10C2.5,14.142 5.858,17.5 10,17.5C14.142,17.5 17.5,14.142 17.5,10C17.5,5.858 14.142,2.5 10,2.5ZM12.817,11.933C13.06,12.177 13.06,12.574 12.817,12.818C12.695,12.939 12.535,13 12.375,13C12.215,13 12.055,12.939 11.933,12.817L10.204,11.088L9.797,11.087L8.068,12.816C7.945,12.939 7.785,13 7.625,13C7.465,13 7.305,12.939 7.183,12.817C6.94,12.573 6.94,12.176 7.183,11.932L8.897,10.218V9.781L7.183,8.067C6.94,7.823 6.94,7.426 7.183,7.182C7.427,6.938 7.824,6.938 8.068,7.182L9.787,8.901H10.215L11.934,7.182C12.178,6.938 12.575,6.938 12.819,7.182C13.062,7.426 13.062,7.823 12.819,8.067L11.1,9.786V10.214L12.817,11.933Z" /> diff --git a/app/src/main/res/drawable/ic_close.xml b/app/src/main/res/drawable/ic_close.xml index e2c2ea022..7b82c9846 100644 --- a/app/src/main/res/drawable/ic_close.xml +++ b/app/src/main/res/drawable/ic_close.xml @@ -9,5 +9,5 @@ android:viewportHeight="24"> + android:pathData="M13.108 11.776l4.709-4.709c0.244-0.244 0.244-0.641 0-0.885s-0.64-0.244-0.884 0l-4.689 4.689h-0.488L7.067 6.183c-0.244-0.244-0.64-0.244-0.884 0s-0.244 0.641 0 0.885l4.687 4.686v0.491l-4.687 4.687c-0.244 0.244-0.244 0.641 0 0.885C6.305 17.939 6.465 18 6.625 18c0.16 0 0.32-0.061 0.442-0.183l4.687-4.687h0.491l4.687 4.687C17.055 17.939 17.215 18 17.375 18c0.16 0 0.32-0.061 0.442-0.183 0.244-0.244 0.244-0.641 0-0.885l-4.709-4.709v-0.447z" /> diff --git a/app/src/main/res/drawable/ic_delete.xml b/app/src/main/res/drawable/ic_delete.xml index c8f283867..016f2ad0b 100644 --- a/app/src/main/res/drawable/ic_delete.xml +++ b/app/src/main/res/drawable/ic_delete.xml @@ -8,6 +8,9 @@ android:viewportWidth="24" android:viewportHeight="24"> + android:pathData="M20.25,6L16,6L16,4.5A2.5,2.5 0,0 0,13.5 2h-3A2.5,2.5 0,0 0,8 4.5L8,6L3.75,6a0.75,0.75 0,0 0,0 1.5L4,7.5v12A2.5,2.5 0,0 0,6.5 22h11a2.5,2.5 0,0 0,2.5 -2.5v-12h0.25a0.75,0.75 0,0 0,0 -1.5zM9.5,4.3l0.8,-0.8h3.4l0.8,0.8L14.5,6h-5L9.5,4.3zM18.5,19.7 L17.7,20.5L6.3,20.5l-0.8,-0.8L5.5,7.5h13v12.2z" + android:fillColor="?primaryText"/> + diff --git a/app/src/main/res/drawable/ic_desktop.xml b/app/src/main/res/drawable/ic_desktop.xml index 9eec900b6..76629aa8e 100644 --- a/app/src/main/res/drawable/ic_desktop.xml +++ b/app/src/main/res/drawable/ic_desktop.xml @@ -8,5 +8,5 @@ android:viewportWidth="24" android:viewportHeight="24"> + android:pathData="M20.5,17h-2a2.5,2.5 0,0 0,2.5 -2.5v-9A2.5,2.5 0,0 0,18.5 3h-13A2.5,2.5 0,0 0,3 5.5v9A2.5,2.5 0,0 0,5.5 17h-2a1.5,1.5 0,0 0,0 3h17a1.5,1.5 0,0 0,0 -3zM5.3,15.5l-0.8,-0.8L4.5,5.3l0.8,-0.8h13.4l0.8,0.8v9.4l-0.8,0.8L5.3,15.5zM13.25,18.5h-2.5a0.75,0.75 0,0 1,0 -1.5h2.5a0.75,0.75 0,0 1,0 1.5z" /> \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_download.xml b/app/src/main/res/drawable/ic_download.xml index 144122018..ecccd5dd1 100644 --- a/app/src/main/res/drawable/ic_download.xml +++ b/app/src/main/res/drawable/ic_download.xml @@ -9,5 +9,8 @@ android:viewportHeight="24"> + android:pathData="M5.782 20.5l-0.8-0.8v-1.95a0.75 0.75 0 0 0-1.5 0v1.75a2.5 2.5 0 0 0 2.5 2.5h11.535a2.5 2.5 0 0 0 2.5-2.5v-1.75a0.75 0.75 0 0 0-1.5 0v1.95l-0.8 0.8H5.782z" /> + diff --git a/app/src/main/res/drawable/ic_fab_sync.xml b/app/src/main/res/drawable/ic_fab_sync.xml index 10369da77..59fbc439f 100644 --- a/app/src/main/res/drawable/ic_fab_sync.xml +++ b/app/src/main/res/drawable/ic_fab_sync.xml @@ -1,16 +1,13 @@ + + - - - + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + diff --git a/app/src/main/res/drawable/ic_info.xml b/app/src/main/res/drawable/ic_info.xml index 23964049b..0897d1761 100644 --- a/app/src/main/res/drawable/ic_info.xml +++ b/app/src/main/res/drawable/ic_info.xml @@ -8,6 +8,9 @@ android:viewportWidth="24" android:viewportHeight="24"> + android:pathData="M11.75,17a0.75,0.75 0,0 1,-0.75 -0.75v-5.5a0.75,0.75 0,0 1,1.5 0v5.5a0.75,0.75 0,0 1,-0.75 0.75zM12.2,7h-0.9l-0.3,0.3v0.9l0.3,0.3h0.9l0.3,-0.3v-0.9l-0.3,-0.3z" + android:fillColor="?primaryText"/> + diff --git a/app/src/main/res/drawable/ic_link_enabled.xml b/app/src/main/res/drawable/ic_link_enabled.xml index 87e43535b..ecbc5488c 100644 --- a/app/src/main/res/drawable/ic_link_enabled.xml +++ b/app/src/main/res/drawable/ic_link_enabled.xml @@ -9,5 +9,11 @@ android:viewportHeight="24"> + android:pathData="M10.08 15.526l4.324 4.324h1.13l3.815-3.815v-1.13l-4.324-4.324a1.5 1.5 0 0 1 2.12 0l3.123 3.123a2.498 2.498 0 0 1 0 3.533l-3.533 3.533a2.498 2.498 0 0 1-3.533 0l-3.123-3.123a1.5 1.5 0 0 1 0.001-2.121z" /> + + diff --git a/app/src/main/res/drawable/ic_new.xml b/app/src/main/res/drawable/ic_new.xml index 52f76c04b..ea1ea7ba1 100644 --- a/app/src/main/res/drawable/ic_new.xml +++ b/app/src/main/res/drawable/ic_new.xml @@ -9,5 +9,5 @@ android:viewportHeight="24"> + android:pathData="M19.25 12.75c0.207 0 0.395-0.084 0.53-0.22C19.916 12.394 20 12.207 20 12c0-0.414-0.336-0.75-0.75-0.75h-5.7l-0.8-0.8v-5.7C12.75 4.336 12.414 4 12 4s-0.75 0.336-0.75 0.75v5.7l-0.8 0.8h-5.7C4.336 11.25 4 11.586 4 12s0.336 0.75 0.75 0.75h5.7l0.8 0.8v5.7c0 0.414 0.336 0.75 0.75 0.75 0.207 0 0.395-0.084 0.53-0.22 0.136-0.136 0.22-0.323 0.22-0.53v-5.7l0.8-0.8h5.7z" /> diff --git a/app/src/main/res/drawable/ic_onboarding_tracking_protection.xml b/app/src/main/res/drawable/ic_onboarding_tracking_protection.xml index 6ec758a14..3fc0e565c 100644 --- a/app/src/main/res/drawable/ic_onboarding_tracking_protection.xml +++ b/app/src/main/res/drawable/ic_onboarding_tracking_protection.xml @@ -2,23 +2,29 @@ - + + android:pathData="M12.0002,22C11.5342,22 11.0662,21.885 10.6462,21.668C8.4962,20.547 6.5242,18.735 5.0942,16.566C4.3852,15.493 3.8882,14.198 3.6162,12.716L2.9092,8.872C2.6692,7.563 3.2942,6.259 4.4632,5.625L10.5652,2.363C11.4632,1.88 12.5362,1.88 13.4322,2.359L19.5342,5.682C20.7082,6.313 21.3352,7.621 21.0912,8.936L20.3862,12.728C20.1152,14.201 19.6172,15.49 18.9112,16.56C17.4822,18.729 15.5102,20.542 13.3562,21.666C12.9372,21.885 12.4682,22 12.0002,22ZM11.5152,3.556L4.8452,7.13L4.3382,8.368L5.0922,12.445C5.3272,13.727 5.7502,14.836 6.3472,15.74C7.6392,17.7 9.4122,19.332 11.3392,20.337H12.6632C14.5932,19.329 16.3672,17.694 17.6582,15.735C18.2532,14.833 18.6752,13.729 18.9102,12.455L19.6632,8.368L19.0532,7.129L12.4942,3.557H11.5152V3.556Z"> - - + android:endX="3" + android:endY="22" + android:startX="21" + android:startY="2" + android:type="linear"> + + diff --git a/app/src/main/res/drawable/ic_private_browsing.xml b/app/src/main/res/drawable/ic_private_browsing.xml index baf1a8062..10276e31e 100644 --- a/app/src/main/res/drawable/ic_private_browsing.xml +++ b/app/src/main/res/drawable/ic_private_browsing.xml @@ -9,5 +9,5 @@ android:viewportHeight="24"> + android:pathData="M21.914 8.476c-1.906-2.502-5.646-2.821-7.976-0.681l-1.303 1.197h-1.276l-1.303-1.197c-2.329-2.14-6.07-1.82-7.976 0.681-0.247 0.975 0.134 4.575 0.35 5.141 0.434 2.287 2.303 4.007 4.543 4.007 1.119 0 2.132-0.447 2.933-1.161l0.488-0.418c0.91-0.778 2.217-0.789 3.138-0.026l0.733 0.608v-0.003c0.772 0.621 1.718 1.001 2.754 1.001 2.24 0 4.109-1.72 4.543-4.007 0.218-0.567 0.613-4.152 0.352-5.142zM9.79 12.045C9.257 12.626 8.43 13 7.5 13c-0.93 0-1.757-0.374-2.29-0.955-0.28-0.305-0.28-0.785 0-1.09C5.743 10.374 6.57 10 7.5 10c0.93 0 1.757 0.374 2.29 0.955 0.28 0.305 0.28 0.785 0 1.09zm9 0C18.257 12.626 17.43 13 16.5 13c-0.93 0-1.757-0.374-2.29-0.955-0.28-0.305-0.28-0.785 0-1.09C14.743 10.374 15.57 10 16.5 10c0.93 0 1.757 0.374 2.29 0.955 0.28 0.305 0.28 0.785 0 1.09z" /> diff --git a/app/src/main/res/drawable/ic_qr.xml b/app/src/main/res/drawable/ic_qr.xml index aa81e7c49..2b237163d 100644 --- a/app/src/main/res/drawable/ic_qr.xml +++ b/app/src/main/res/drawable/ic_qr.xml @@ -9,5 +9,5 @@ android:viewportHeight="24"> + android:pathData="M15.8 4.5a0.8 0.8 0 0 1 0-1.5h2.7A2.5 2.5 0 0 1 21 5.5v2.8a0.8 0.8 0 0 1-1.5 0v-3l-0.8-0.8h-3zm-7.6 0a0.8 0.8 0 0 0 0-1.5H5.5A2.5 2.5 0 0 0 3 5.5v2.8a0.8 0.8 0 0 0 1.5 0v-3l0.8-0.8h3zm7.6 15a0.8 0.8 0 0 0 0 1.5h2.7a2.5 2.5 0 0 0 2.5-2.5v-2.8a0.8 0.8 0 0 0-1.5 0v3l-0.8 0.8h-3zm-7.6 0a0.8 0.8 0 0 1 0 1.5H5.5A2.5 2.5 0 0 1 3 18.5v-2.8a0.8 0.8 0 0 1 1.5 0v3l0.8 0.8h3zm2-8.5H7.8A0.8 0.8 0 0 1 7 10.2V7.8A0.8 0.8 0 0 1 7.8 7h2.5A0.8 0.8 0 0 1 11 7.8v2.5a0.8 0.8 0 0 1-0.8 0.7zm6.6 4H15v1.8s0.1 0.2 0.3 0.2h1.4a0.3 0.3 0 0 0 0.3-0.3v-1.4a0.3 0.3 0 0 0-0.3-0.3zm0-6H15V7.2A0.3 0.3 0 0 1 15.3 7h1.4A0.3 0.3 0 0 1 17 7.3v1.5A0.3 0.3 0 0 1 16.7 9zM15 11h-1.8a0.3 0.3 0 0 1-0.2-0.3V9.3A0.3 0.3 0 0 1 13.3 9H15v2zm1.8 2H15v-2h1.8a0.3 0.3 0 0 1 0.2 0.3v1.4a0.3 0.3 0 0 1-0.3 0.3zM15 13h-1.8a0.3 0.3 0 0 0-0.2 0.3V15h2v-2zm-2 2h-2v1.8s0.1 0.2 0.3 0.2h1.4a0.3 0.3 0 0 0 0.3-0.3V15zm-2.3-2H9.3A0.3 0.3 0 0 0 9 13.3V15h2v-1.8a0.3 0.3 0 0 0-0.3-0.2zM9 15H7.2A0.3 0.3 0 0 0 7 15.3v1.4C7 16.9 7.1 17 7.3 17h1.5A0.3 0.3 0 0 0 9 16.7V15z" /> diff --git a/app/src/main/res/drawable/ic_readermode.xml b/app/src/main/res/drawable/ic_readermode.xml index d5aac5b81..396e54072 100644 --- a/app/src/main/res/drawable/ic_readermode.xml +++ b/app/src/main/res/drawable/ic_readermode.xml @@ -9,5 +9,8 @@ android:viewportHeight="24"> + android:pathData="M6.5 3A2.5 2.5 0 0 0 4 5.5v13A2.5 2.5 0 0 0 6.5 21h11a2.5 2.5 0 0 0 2.5-2.5v-13A2.5 2.5 0 0 0 17.5 3h-11zm12 15.7l-0.8 0.8H6.3l-0.8-0.8V5.3l0.8-0.8h11.4l0.8 0.8v13.4z" /> + diff --git a/app/src/main/res/drawable/ic_readermode_selected.xml b/app/src/main/res/drawable/ic_readermode_selected.xml index c72b5267b..9a87ee124 100644 --- a/app/src/main/res/drawable/ic_readermode_selected.xml +++ b/app/src/main/res/drawable/ic_readermode_selected.xml @@ -9,7 +9,20 @@ android:viewportWidth="24" android:viewportHeight="24"> + android:pathData="M6.5 3A2.5 2.5 0 0 0 4 5.5v13A2.5 2.5 0 0 0 6.5 21h11a2.5 2.5 0 0 0 2.5-2.5v-13A2.5 2.5 0 0 0 17.5 3h-11zm12 15.7l-0.8 0.8H6.3l-0.8-0.8V5.3l0.8-0.8h11.4l0.8 0.8v13.4z" > + + + + + + android:pathData="M15.685,14.074C16.511,12.925 17,11.519 17,10C17,6.141 13.86,3 10,3C6.14,3 3,6.141 3,10C3,13.859 6.14,17 10,17C11.525,17 12.936,16.508 14.087,15.676L14.611,15.67L19.721,20.78C19.867,20.926 20.059,21 20.251,21C20.443,21 20.635,20.927 20.781,20.78C21.074,20.487 21.074,20.012 20.781,19.719L15.675,14.612L15.685,14.074ZM10,15.5C6.967,15.5 4.5,13.032 4.5,10C4.5,6.968 6.967,4.5 10,4.5C13.033,4.5 15.5,6.968 15.5,10C15.5,13.032 13.033,15.5 10,15.5Z" /> diff --git a/app/src/main/res/drawable/ic_settings.xml b/app/src/main/res/drawable/ic_settings.xml index 051a9abb9..6c3315b26 100644 --- a/app/src/main/res/drawable/ic_settings.xml +++ b/app/src/main/res/drawable/ic_settings.xml @@ -8,6 +8,9 @@ android:viewportWidth="24" android:viewportHeight="24"> + android:pathData="M12.8,22h-1.6a2,2 0,0 1,-1.9 -1.4l-0.5,-1.8 -1,-0.6 -1.9,0.4a2,2 0,0 1,-2.2 -1L3,16.4a2,2 0,0 1,0.3 -2.4l1.3,-1.3a6.7,6.7 0,0 1,0 -1.2l-1.3,-1.3A2,2 0,0 1,3 7.7l0.8,-1.4a2,2 0,0 1,2.2 -1l1.9,0.5 1,-0.6 0.5,-1.8a2,2 0,0 1,2 -1.4h1.5a2,2 0,0 1,2 1.4l0.4,1.8 1,0.6 1.9,-0.4a2,2 0,0 1,2.2 1l0.8,1.3a2,2 0,0 1,-0.3 2.4l-1.3,1.3a6.6,6.6 0,0 1,0 1.2l1.3,1.3c0.6,0.7 0.7,1.7 0.3,2.4l-0.8,1.4a2,2 0,0 1,-2.2 1l-1.8,-0.5 -1,0.6 -0.6,1.8a2,2 0,0 1,-2 1.4zM7.8,16.6l0.6,0.2 1.3,0.7 0.4,0.5 0.6,2.1c0.1,0.3 0.3,0.4 0.5,0.4h1.6c0.2,0 0.4,-0.1 0.5,-0.4l0.6,-2 0.4,-0.6a6,6 0,0 0,1.3 -0.7l0.7,-0.2 2.1,0.6c0.2,0 0.5,0 0.6,-0.3l0.8,-1.3 -0.1,-0.6 -1.6,-1.7 -0.2,-0.6a5.8,5.8 0,0 0,0 -1.5l0.2,-0.6L19.7,9c0.1,-0.1 0.2,-0.4 0,-0.6L19,7.1a0.5,0.5 0,0 0,-0.6 -0.3l-2.2,0.6 -0.6,-0.2a6,6 0,0 0,-1.3 -0.7L14,6l-0.6,-2.1c0,-0.3 -0.3,-0.4 -0.5,-0.4h-1.6c-0.2,0 -0.4,0.1 -0.5,0.4l-0.6,2 -0.4,0.6a6,6 0,0 0,-1.3 0.7l-0.6,0.2 -2.2,-0.6c-0.2,0 -0.5,0 -0.6,0.3l-0.8,1.3 0.1,0.6L6,10.6l0.2,0.6a6.1,6.1 0,0 0,0 1.5l-0.2,0.7L4.3,15c-0.1,0.1 -0.2,0.4 0,0.6l0.7,1.3c0.1,0.2 0.4,0.3 0.6,0.3l2.1,-0.6z" + android:fillColor="?primaryText"/> + diff --git a/app/src/main/res/drawable/ic_synced_tabs.xml b/app/src/main/res/drawable/ic_synced_tabs.xml index a707e9daf..5968047c9 100644 --- a/app/src/main/res/drawable/ic_synced_tabs.xml +++ b/app/src/main/res/drawable/ic_synced_tabs.xml @@ -8,9 +8,9 @@ android:viewportWidth="24" android:viewportHeight="24"> diff --git a/app/src/main/res/drawable/ic_tabs.xml b/app/src/main/res/drawable/ic_tabs.xml index eed851286..04f47f556 100644 --- a/app/src/main/res/drawable/ic_tabs.xml +++ b/app/src/main/res/drawable/ic_tabs.xml @@ -8,7 +8,7 @@ android:viewportWidth="24" android:viewportHeight="24"> diff --git a/app/src/main/res/drawable/ic_tracking_protection.xml b/app/src/main/res/drawable/ic_tracking_protection.xml index ed41ca68e..64f2d3cac 100644 --- a/app/src/main/res/drawable/ic_tracking_protection.xml +++ b/app/src/main/res/drawable/ic_tracking_protection.xml @@ -11,12 +11,4 @@ android:id="@+id/disabled" android:drawable="@drawable/ic_tracking_protection_disabled" /> - - diff --git a/app/src/main/res/drawable/ic_tracking_protection_anim_disable.xml b/app/src/main/res/drawable/ic_tracking_protection_anim_disable.xml deleted file mode 100644 index 14f17035d..000000000 --- a/app/src/main/res/drawable/ic_tracking_protection_anim_disable.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - diff --git a/app/src/main/res/drawable/ic_tracking_protection_anim_enable.xml b/app/src/main/res/drawable/ic_tracking_protection_anim_enable.xml deleted file mode 100644 index 3080ef51b..000000000 --- a/app/src/main/res/drawable/ic_tracking_protection_anim_enable.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - diff --git a/app/src/main/res/drawable/ic_tracking_protection_disabled.xml b/app/src/main/res/drawable/ic_tracking_protection_disabled.xml index 0ef9a1b5c..54d9215ad 100644 --- a/app/src/main/res/drawable/ic_tracking_protection_disabled.xml +++ b/app/src/main/res/drawable/ic_tracking_protection_disabled.xml @@ -7,21 +7,10 @@ android:height="24dp" android:viewportWidth="24" android:viewportHeight="24"> - - - - - - - - + + diff --git a/app/src/main/res/drawable/ic_tracking_protection_enabled.xml b/app/src/main/res/drawable/ic_tracking_protection_enabled.xml index 633271b15..2c5cf04a7 100644 --- a/app/src/main/res/drawable/ic_tracking_protection_enabled.xml +++ b/app/src/main/res/drawable/ic_tracking_protection_enabled.xml @@ -3,25 +3,11 @@ - 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/. --> - - - - - - - - + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + diff --git a/app/src/main/res/drawable/ic_whats_new.xml b/app/src/main/res/drawable/ic_whats_new.xml index 7fb9e238c..c96c8b5b9 100644 --- a/app/src/main/res/drawable/ic_whats_new.xml +++ b/app/src/main/res/drawable/ic_whats_new.xml @@ -9,5 +9,5 @@ android:viewportHeight="24"> + android:pathData="M18.5 7h-1.1A3.3 3.3 0 0 0 17 3a3.3 3.3 0 0 0-4.6 0 2 2 0 0 0-0.3 0.2A1.9 1.9 0 0 0 12 3a3.3 3.3 0 0 0-4.6 0A3.3 3.3 0 0 0 7 7H5.5A2.5 2.5 0 0 0 3 9.5v1c0 0.8 0.4 1.5 1 2v6A2.5 2.5 0 0 0 6.5 21h11a2.5 2.5 0 0 0 2.5-2.5v-6a2.5 2.5 0 0 0 1-2v-1A2.5 2.5 0 0 0 18.5 7zm0.2 1.5l0.8 0.8v1.4l-0.8 0.8h-6v-3h6zM13.4 4c0.7-0.7 1.8-0.7 2.5 0a1.8 1.8 0 0 1 0 2.5C15.5 6.9 14 7 12.9 7V6.3c0-1 0.2-2 0.5-2.3zm-5 2.5a1.8 1.8 0 0 1 1.2-3c0.5 0 1 0.2 1.3 0.5 0.3 0.3 0.5 1.3 0.5 2.3V7h-0.8c-1 0-1.9-0.2-2.2-0.5zM4.5 9.3l0.8-0.8h6v3h-6l-0.8-0.8V9.3zm1.8 10.2l-0.8-0.8V13h5.8v6.5h-5zm12.2-0.8l-0.8 0.8h-5V13h5.8v5.7z"/> diff --git a/app/src/main/res/drawable/mozac_ic_extensions_black.xml b/app/src/main/res/drawable/mozac_ic_extensions_black.xml index 097a4a094..9395d6040 100644 --- a/app/src/main/res/drawable/mozac_ic_extensions_black.xml +++ b/app/src/main/res/drawable/mozac_ic_extensions_black.xml @@ -5,9 +5,9 @@ + android:viewportWidth="24" + android:viewportHeight="24"> + android:pathData="M17.5,7H15.5V5.127C15.5,3.533 14.317,2.166 12.807,2.015C11.958,1.931 11.116,2.206 10.488,2.775C9.86,3.342 9.5,4.154 9.5,4.999V7H6.5C5.119,7 4,8.119 4,9.5V11.75C4,12.44 4.56,13 5.25,13H6.873C7.706,13 8.417,13.59 8.493,14.343C8.536,14.775 8.402,15.188 8.114,15.506C7.829,15.82 7.424,16 7.001,16H5.25C4.56,16 4,16.56 4,17.25V19.5C4,20.881 5.119,22 6.5,22H17.5C18.881,22 20,20.881 20,19.5V9.5C20,8.119 18.881,7 17.5,7ZM18.5,19.7L17.7,20.5H6.3L5.5,19.7V17.5H7.001C7.847,17.5 8.658,17.14 9.226,16.512C9.794,15.885 10.07,15.039 9.985,14.194C9.834,12.683 8.467,11.5 6.873,11.5H5.5V9.3L6.3,8.5H10C10.552,8.5 11,8.052 11,7.5V4.999C11,4.576 11.18,4.171 11.494,3.887C11.812,3.599 12.227,3.466 12.657,3.507C13.41,3.582 14,4.294 14,5.127V7.5C14,8.052 14.448,8.5 15,8.5H17.7L18.5,9.3V19.7Z" /> diff --git a/app/src/main/res/drawable/private_browsing_button.xml b/app/src/main/res/drawable/private_browsing_button.xml index 344500088..be68036ec 100644 --- a/app/src/main/res/drawable/private_browsing_button.xml +++ b/app/src/main/res/drawable/private_browsing_button.xml @@ -23,7 +23,7 @@ android:viewportHeight="24"> + android:pathData="M21.914 8.476c-1.906-2.502-5.646-2.821-7.976-0.681l-1.303 1.197h-1.276l-1.303-1.197c-2.329-2.14-6.07-1.82-7.976 0.681-0.247 0.975 0.134 4.575 0.35 5.141 0.434 2.287 2.303 4.007 4.543 4.007 1.119 0 2.132-0.447 2.933-1.161l0.488-0.418c0.91-0.778 2.217-0.789 3.138-0.026l0.733 0.608v-0.003c0.772 0.621 1.718 1.001 2.754 1.001 2.24 0 4.109-1.72 4.543-4.007 0.218-0.567 0.613-4.152 0.352-5.142zM9.79 12.045C9.257 12.626 8.43 13 7.5 13c-0.93 0-1.757-0.374-2.29-0.955-0.28-0.305-0.28-0.785 0-1.09C5.743 10.374 6.57 10 7.5 10c0.93 0 1.757 0.374 2.29 0.955 0.28 0.305 0.28 0.785 0 1.09zm9 0C18.257 12.626 17.43 13 16.5 13c-0.93 0-1.757-0.374-2.29-0.955-0.28-0.305-0.28-0.785 0-1.09C14.743 10.374 15.57 10 16.5 10c0.93 0 1.757 0.374 2.29 0.955 0.28 0.305 0.28 0.785 0 1.09z" /> diff --git a/app/src/main/res/drawable/shield_dark.xml b/app/src/main/res/drawable/shield_dark.xml index a230ffa1e..f97e24bdb 100644 --- a/app/src/main/res/drawable/shield_dark.xml +++ b/app/src/main/res/drawable/shield_dark.xml @@ -13,9 +13,8 @@ android:viewportHeight="24"> + android:fillColor="#FF00DDFF" + android:pathData="M12.0002,22C11.5342,22 11.0662,21.885 10.6462,21.668C8.4962,20.547 6.5242,18.735 5.0942,16.566C4.3852,15.493 3.8882,14.198 3.6162,12.716L2.9092,8.872C2.6692,7.563 3.2942,6.259 4.4632,5.625L10.5652,2.363C11.4632,1.88 12.5362,1.88 13.4322,2.359L19.5342,5.682C20.7082,6.313 21.3352,7.621 21.0912,8.936L20.3862,12.728C20.1152,14.201 19.6172,15.49 18.9112,16.56C17.4822,18.729 15.5102,20.542 13.3562,21.666C12.9372,21.885 12.4682,22 12.0002,22ZM11.5152,3.556L4.8452,7.13L4.3382,8.368L5.0922,12.445C5.3272,13.727 5.7502,14.836 6.3472,15.74C7.6392,17.7 9.4122,19.332 11.3392,20.337H12.6632C14.5932,19.329 16.3672,17.694 17.6582,15.735C18.2532,14.833 18.6752,13.729 18.9102,12.455L19.6632,8.368L19.0532,7.129L12.4942,3.557H11.5152V3.556Z" /> @@ -25,7 +24,7 @@ android:interpolator="@android:interpolator/fast_out_slow_in" android:propertyName="fillColor" android:valueFrom="#fbfbfe" - android:valueTo="#00b3f4" + android:valueTo="#FF00DDFF" android:valueType="colorType" /> diff --git a/app/src/main/res/drawable/shield_light.xml b/app/src/main/res/drawable/shield_light.xml index 083f74145..f621f8390 100644 --- a/app/src/main/res/drawable/shield_light.xml +++ b/app/src/main/res/drawable/shield_light.xml @@ -14,8 +14,7 @@ + android:pathData="M12.0002,22C11.5342,22 11.0662,21.885 10.6462,21.668C8.4962,20.547 6.5242,18.735 5.0942,16.566C4.3852,15.493 3.8882,14.198 3.6162,12.716L2.9092,8.872C2.6692,7.563 3.2942,6.259 4.4632,5.625L10.5652,2.363C11.4632,1.88 12.5362,1.88 13.4322,2.359L19.5342,5.682C20.7082,6.313 21.3352,7.621 21.0912,8.936L20.3862,12.728C20.1152,14.201 19.6172,15.49 18.9112,16.56C17.4822,18.729 15.5102,20.542 13.3562,21.666C12.9372,21.885 12.4682,22 12.0002,22ZM11.5152,3.556L4.8452,7.13L4.3382,8.368L5.0922,12.445C5.3272,13.727 5.7502,14.836 6.3472,15.74C7.6392,17.7 9.4122,19.332 11.3392,20.337H12.6632C14.5932,19.329 16.3672,17.694 17.6582,15.735C18.2532,14.833 18.6752,13.729 18.9102,12.455L19.6632,8.368L19.0532,7.129L12.4942,3.557H11.5152V3.556Z" /> @@ -25,7 +24,7 @@ android:interpolator="@android:interpolator/fast_out_slow_in" android:propertyName="fillColor" android:valueFrom="#20123a" - android:valueTo="#0250bb" + android:valueTo="#FF0250BB" android:valueType="colorType" /> diff --git a/app/src/main/res/layout/component_collection_creation.xml b/app/src/main/res/layout/component_collection_creation.xml index e8fe8a816..94ab60977 100644 --- a/app/src/main/res/layout/component_collection_creation.xml +++ b/app/src/main/res/layout/component_collection_creation.xml @@ -156,7 +156,7 @@ app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - app:srcCompat="@drawable/mozac_ic_close" + app:srcCompat="@drawable/ic_close" app:tint="?neutral" /> - - - - - - - - diff --git a/app/src/main/res/layout/share_close.xml b/app/src/main/res/layout/share_close.xml index 1221af606..8bc84de86 100644 --- a/app/src/main/res/layout/share_close.xml +++ b/app/src/main/res/layout/share_close.xml @@ -24,7 +24,7 @@ app:iconTint="@color/neutral_text" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - app:srcCompat="@drawable/mozac_ic_close" /> + app:srcCompat="@drawable/ic_close" /> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 107349023..d5b5e30b8 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -433,9 +433,6 @@ Learn more - - Turned off globally, go to Settings to turn it on. - Telemetry From 02b59d1a8c8b797cfd37e15efe0545a86164a3a5 Mon Sep 17 00:00:00 2001 From: Mihai Adrian Carare <48995920+mcarare@users.noreply.github.com> Date: Tue, 27 Apr 2021 23:04:40 +0300 Subject: [PATCH 044/256] For #19243 - Update metrics documentation. (#19269) --- docs/metrics.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/metrics.md b/docs/metrics.md index 704f337f4..98a127f15 100644 --- a/docs/metrics.md +++ b/docs/metrics.md @@ -314,9 +314,9 @@ In addition to those built-in metrics, the following metrics are added to the pi | addons.has_enabled_addons |[boolean](https://mozilla.github.io/glean/book/user/metrics/boolean.html) |Whether or not the user has enabled add-ons on the device. |[mozilla-mobile/fenix#8318](https://github.com/mozilla-mobile/fenix/pull/8318), [mozilla-mobile/fenix#13958](https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877), [mozilla-mobile/fenix#18143](https://github.com/mozilla-mobile/fenix/pull/18143)||2021-07-01 |2 | | addons.has_installed_addons |[boolean](https://mozilla.github.io/glean/book/user/metrics/boolean.html) |Whether or not the user has installed add-ons on the device. |[mozilla-mobile/fenix#8318](https://github.com/mozilla-mobile/fenix/pull/8318), [mozilla-mobile/fenix#13958](https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877), [mozilla-mobile/fenix#18143](https://github.com/mozilla-mobile/fenix/pull/18143)||2021-07-01 |2 | | addons.installed_addons |[string_list](https://mozilla.github.io/glean/book/user/metrics/string_list.html) |A list of all installed add-ons on the device. |[mozilla-mobile/fenix#11080](https://github.com/mozilla-mobile/fenix/pull/11080), [mozilla-mobile/fenix#13958](https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877), [mozilla-mobile/fenix#18143](https://github.com/mozilla-mobile/fenix/pull/18143)||2021-07-01 |2 | -| browser.search.ad_clicks |[labeled_counter](https://mozilla.github.io/glean/book/user/metrics/labeled_counters.html) |Records clicks of adverts on SERP pages. The key format is ‘’. |[mozilla-mobile/fenix#10112](https://github.com/mozilla-mobile/fenix/pull/10112), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | +| browser.search.ad_clicks |[labeled_counter](https://mozilla.github.io/glean/book/user/metrics/labeled_counters.html) |Records clicks of adverts on SERP pages. The key format is ``. |[mozilla-mobile/fenix#10112](https://github.com/mozilla-mobile/fenix/pull/10112), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | | browser.search.in_content |[labeled_counter](https://mozilla.github.io/glean/book/user/metrics/labeled_counters.html) |Records the type of interaction a user has on SERP pages. |[mozilla-mobile/fenix#10167](https://github.com/mozilla-mobile/fenix/pull/10167), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | -| browser.search.with_ads |[labeled_counter](https://mozilla.github.io/glean/book/user/metrics/labeled_counters.html) |Records counts of SERP pages with adverts displayed. The key format is ‘’. |[mozilla-mobile/fenix#10112](https://github.com/mozilla-mobile/fenix/pull/10112), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | +| browser.search.with_ads |[labeled_counter](https://mozilla.github.io/glean/book/user/metrics/labeled_counters.html) |Records counts of SERP pages with adverts displayed. The key format is ``. |[mozilla-mobile/fenix#10112](https://github.com/mozilla-mobile/fenix/pull/10112), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | | engine_tab.kill_background_age |[timing_distribution](https://mozilla.github.io/glean/book/user/metrics/timing_distribution.html) |Measures the age of the engine session of a background tab at the time its content process got killed. |[mozilla-mobile/fenix#17864](https://github.com/mozilla-mobile/fenix/pull/17864)||2021-12-31 |1 | | engine_tab.kill_foreground_age |[timing_distribution](https://mozilla.github.io/glean/book/user/metrics/timing_distribution.html) |Measures the age of the engine session of a foreground (selected) tab at the time its content process got killed. |[mozilla-mobile/fenix#17864](https://github.com/mozilla-mobile/fenix/pull/17864)||2021-12-31 |1 | | engine_tab.kills |[labeled_counter](https://mozilla.github.io/glean/book/user/metrics/labeled_counters.html) |How often was the content process of a foreground (selected) or background tab killed. |[mozilla-mobile/fenix#17864](https://github.com/mozilla-mobile/fenix/pull/17864)|
  • foreground
  • background
|2021-12-31 |1 | From 8f39592c9cfcecd9282e646e8963822bd9ba37bd Mon Sep 17 00:00:00 2001 From: Codrut Topliceanu <60002907+codrut-topliceanu@users.noreply.github.com> Date: Wed, 28 Apr 2021 01:42:40 +0300 Subject: [PATCH 045/256] For #19113 - Change top site corner radius to 8dp (#19262) --- app/src/main/res/drawable/top_sites_background.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/drawable/top_sites_background.xml b/app/src/main/res/drawable/top_sites_background.xml index c5ff9918d..897429366 100644 --- a/app/src/main/res/drawable/top_sites_background.xml +++ b/app/src/main/res/drawable/top_sites_background.xml @@ -6,7 +6,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:shape="rectangle"> - + From 59de530a9c5f16cd9cd82fdce450c9995dd77ce7 Mon Sep 17 00:00:00 2001 From: Roger Yang Date: Wed, 28 Apr 2021 12:09:27 -0400 Subject: [PATCH 046/256] Closes #18253: Remove spaces from Addons telemetry comma-separated list (#19292) --- .../components/metrics/MetricController.kt | 2 +- .../metrics/MetricControllerTest.kt | 27 +++++++++++-------- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/app/src/main/java/org/mozilla/fenix/components/metrics/MetricController.kt b/app/src/main/java/org/mozilla/fenix/components/metrics/MetricController.kt index f10182b46..4ebe8c8dc 100644 --- a/app/src/main/java/org/mozilla/fenix/components/metrics/MetricController.kt +++ b/app/src/main/java/org/mozilla/fenix/components/metrics/MetricController.kt @@ -223,7 +223,7 @@ internal class ReleaseMetricController( metadata?.get("enabled")?.let { enabledAddons -> if (enabledAddons is List<*>) { settings.enabledAddonsCount = enabledAddons.size - settings.enabledAddonsList = enabledAddons.joinToString() + settings.enabledAddonsList = enabledAddons.joinToString(",") } } diff --git a/app/src/test/java/org/mozilla/fenix/components/metrics/MetricControllerTest.kt b/app/src/test/java/org/mozilla/fenix/components/metrics/MetricControllerTest.kt index 2a824564f..25bf2274e 100644 --- a/app/src/test/java/org/mozilla/fenix/components/metrics/MetricControllerTest.kt +++ b/app/src/test/java/org/mozilla/fenix/components/metrics/MetricControllerTest.kt @@ -15,11 +15,16 @@ import mozilla.components.support.base.Component import mozilla.components.support.base.facts.Action import mozilla.components.support.base.facts.Fact import mozilla.components.support.base.log.logger.Logger +import mozilla.components.support.test.robolectric.testContext import mozilla.components.support.webextensions.facts.WebExtensionFacts +import org.junit.Assert.assertEquals import org.junit.Before import org.junit.Test +import org.junit.runner.RunWith +import org.mozilla.fenix.helpers.FenixRobolectricTestRunner import org.mozilla.fenix.utils.Settings +@RunWith(FenixRobolectricTestRunner::class) class MetricControllerTest { @MockK(relaxUnitFun = true) private lateinit var dataService1: MetricsService @@ -338,7 +343,7 @@ class MetricControllerTest { @Test fun `web extension fact should set value in SharedPreference`() { val enabled = true - val settings: Settings = mockk(relaxed = true) + val settings = Settings(testContext) val controller = ReleaseMetricController( services = listOf(dataService1), isDataTelemetryEnabled = { enabled }, @@ -350,19 +355,19 @@ class MetricControllerTest { Action.INTERACTION, WebExtensionFacts.Items.WEB_EXTENSIONS_INITIALIZED, metadata = mapOf( - "installed" to listOf("test1"), - "enabled" to listOf("test2") + "installed" to listOf("test1", "test2", "test3", "test4"), + "enabled" to listOf("test2", "test4") ) ) - verify(exactly = 0) { settings.installedAddonsCount = any() } - verify(exactly = 0) { settings.installedAddonsList = any() } - verify(exactly = 0) { settings.enabledAddonsCount = any() } - verify(exactly = 0) { settings.enabledAddonsList = any() } + assertEquals(settings.installedAddonsCount, 0) + assertEquals(settings.installedAddonsList, "") + assertEquals(settings.enabledAddonsCount, 0) + assertEquals(settings.enabledAddonsList, "") controller.factToEvent(fact) - verify(exactly = 1) { settings.installedAddonsCount = any() } - verify(exactly = 1) { settings.installedAddonsList = any() } - verify(exactly = 1) { settings.enabledAddonsCount = any() } - verify(exactly = 1) { settings.enabledAddonsList = any() } + assertEquals(settings.installedAddonsCount, 4) + assertEquals(settings.installedAddonsList, "test1,test2,test3,test4") + assertEquals(settings.enabledAddonsCount, 2) + assertEquals(settings.enabledAddonsList, "test2,test4") } } From 65374717839aba8a78358072d733edaf544f359b Mon Sep 17 00:00:00 2001 From: MickeyMoz Date: Wed, 28 Apr 2021 15:33:23 +0000 Subject: [PATCH 047/256] Update Android Components version to 90.0.20210428143111. --- buildSrc/src/main/java/AndroidComponents.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/java/AndroidComponents.kt b/buildSrc/src/main/java/AndroidComponents.kt index 9dc1be11f..513d0f0d5 100644 --- a/buildSrc/src/main/java/AndroidComponents.kt +++ b/buildSrc/src/main/java/AndroidComponents.kt @@ -3,5 +3,5 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ object AndroidComponents { - const val VERSION = "90.0.20210426143115" + const val VERSION = "90.0.20210428143111" } From c9fba71d5f7f0af1ce6f3a7caff7b22e39ce25a1 Mon Sep 17 00:00:00 2001 From: Mozilla L10n Automation Bot Date: Thu, 29 Apr 2021 00:07:29 +0000 Subject: [PATCH 048/256] Import l10n. --- app/src/main/res/values-ka/strings.xml | 20 ++++++++++++++++++++ app/src/main/res/values-pt-rBR/strings.xml | 12 ++++++------ 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/app/src/main/res/values-ka/strings.xml b/app/src/main/res/values-ka/strings.xml index a0b13a824..9834b4356 100644 --- a/app/src/main/res/values-ka/strings.xml +++ b/app/src/main/res/values-ka/strings.xml @@ -603,12 +603,16 @@ პირადი სეანსი პირადი ჩანართები + + დასინქ. ჩანართები ჩანართის დამატება პირადი ჩანართის დამატება პირადი + + დასინქრონება გახსნილი ჩანართები @@ -619,6 +623,8 @@ ყველა ჩანართის გაზიარება ბოლოს დახურული ჩანართები + + ანგარიშის პარამეტრები ჩანართის პარამეტრები @@ -974,6 +980,8 @@ ყველა მოქმედება ბოლოს გამოყენებული + + სინქრონიზაციაში შესვლა დასინქრონებაში შესვლა @@ -1552,8 +1560,12 @@ საკრედიტო ბარათის დამატება + + შენახული ბარათების მართვა ბარათის დამატება + + ბარათის ჩასწორება ბარათის ნომერი @@ -1562,6 +1574,8 @@ მფლობელის სახელი ბარათის ზედმეტსახელი + + ბარათის წაშლა ბარათის წაშლა @@ -1571,6 +1585,9 @@ გაუქმება + + შენახული ბარათები + საძიებო სისტემის დამატება @@ -1731,6 +1748,9 @@ გაუქმება + + მითითება რომ ბმულები ვებსაიტებიდან, ელფოსტიდან და შეტყობინებებიდან, გაიხსნას პირდაპირ Firefox-ში. + მოცილება diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 57bed6e31..0c8d440c4 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -475,7 +475,7 @@ - Ativar o Sync + Ativar a sincronização Digitalizar código de pareamento no Firefox de computador @@ -1195,7 +1195,7 @@ Entrando… - Criar uma conta + Conectar Conta Firefox Permanecer desconectado @@ -1274,11 +1274,11 @@ Pronto para digitalizar - Entre com sua câmera + Conecte usando sua câmera Usar email - Crie uma para sincronizar o Firefox entre dispositivos.]]> + Crie uma para sincronizar o Firefox entre dispositivos.]]> O Firefox deixará de sincronizar com sua conta, mas não excluirá seus dados de navegação neste dispositivo. @@ -1300,7 +1300,7 @@ Navegue sem ser seguido - Mantenha seus dados consigo. O %s lhe protege de muitos dos rastreadores mais comuns que seguem o que você faz online. + Mantenha seus dados com você. O %s te protege de muitos dos rastreadores mais comuns que tentam seguir o que você faz online. Saiba mais @@ -1347,7 +1347,7 @@ Fingerprinters Bloqueado: - Permitido + Permitido: Rastreadores de mídias sociais From 70fe7d5886ba8465bfb61a14a27bb25322121f15 Mon Sep 17 00:00:00 2001 From: Sebastian Kaspari Date: Wed, 28 Apr 2021 11:50:57 +0200 Subject: [PATCH 049/256] Issue #10941: Align Nightly version with Gecko/A-C version. Instead of using a timestamp this will synchronize the Nightly version with the version of Gecko / A-C. So when using 90.0.20210426143115 then the Nightly version will be 90.0a1 - similar to what Firefox desktop uses. --- app/build.gradle | 4 +++- buildSrc/src/main/java/Config.kt | 8 ++++++++ taskcluster/fenix_taskgraph/transforms/build.py | 7 ++----- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 1275b8e7a..5234c6ad1 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -231,7 +231,7 @@ android.applicationVariants.all { variant -> def isDebug = variant.buildType.resValues['IS_DEBUG']?.value ?: false def useReleaseVersioning = variant.buildType.buildConfigFields['USE_RELEASE_VERSIONING']?.value ?: false - def versionName = Config.releaseVersionName(project) + def versionName = variant.buildType.name == 'nightly' ? Config.nightlyVersionName() : Config.releaseVersionName(project) println("----------------------------------------------") println("Variant name: " + variant.name) @@ -245,6 +245,8 @@ android.applicationVariants.all { variant -> // same version code. Therefore we need to have different version codes for our ARM and x86 // builds. + println("versionName override: $versionName") + variant.outputs.each { output -> def abi = output.getFilter(OutputFile.ABI) // We use the same version code generator, that we inherited from Fennec, across all channels - even on diff --git a/buildSrc/src/main/java/Config.kt b/buildSrc/src/main/java/Config.kt index ff824ff74..7460906f4 100644 --- a/buildSrc/src/main/java/Config.kt +++ b/buildSrc/src/main/java/Config.kt @@ -36,6 +36,14 @@ object Config { return if (project.hasProperty("versionName")) project.property("versionName") as String else "" } + @JvmStatic + fun nightlyVersionName(): String { + // Nightly versions use the Gecko/A-C major version and append "0.a1", e.g. with A-C 90.0.20210426143115 + // the Nightly version will be 90.0a1 + val majorVersion = AndroidComponents.VERSION.split(".")[0] + return "$majorVersion.0a1" + } + @JvmStatic fun generateBuildDate(): String { val dateTime = LocalDateTime.now() diff --git a/taskcluster/fenix_taskgraph/transforms/build.py b/taskcluster/fenix_taskgraph/transforms/build.py index 4a65b4abb..4c8029a69 100644 --- a/taskcluster/fenix_taskgraph/transforms/build.py +++ b/taskcluster/fenix_taskgraph/transforms/build.py @@ -95,14 +95,11 @@ def add_disable_optimization(config, tasks): @transforms.add def add_nightly_version(config, tasks): - push_date_string = config.params["moz_build_date"] - push_date_time = datetime.datetime.strptime(push_date_string, "%Y%m%d%H%M%S") - formated_date_time = 'Nightly {}'.format(push_date_time.strftime('%y%m%d %H:%M')) - for task in tasks: if task.pop("include-nightly-version", False): task["run"]["gradlew"].extend([ - '-PversionName={}'.format(formated_date_time), + # We only set the `official` flag here. The actual version name will be determined + # by Gradle (depending on the Gecko/A-C version being used) '-Pofficial' ]) yield task From 5f4a5904184083fe7e54250f5e89e1251bd4ae3a Mon Sep 17 00:00:00 2001 From: Sebastian Kaspari Date: Thu, 29 Apr 2021 10:50:25 +0200 Subject: [PATCH 050/256] Issue #19040 - Update marketing data setting description --- .../java/org/mozilla/fenix/settings/DataChoicesFragment.kt | 7 ------- app/src/main/res/values/strings.xml | 2 ++ app/src/main/res/xml/data_choices_preferences.xml | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/org/mozilla/fenix/settings/DataChoicesFragment.kt b/app/src/main/java/org/mozilla/fenix/settings/DataChoicesFragment.kt index ca0229a2a..eb0c11332 100644 --- a/app/src/main/java/org/mozilla/fenix/settings/DataChoicesFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/settings/DataChoicesFragment.kt @@ -67,13 +67,6 @@ class DataChoicesFragment : PreferenceFragmentCompat() { requirePreference(R.string.pref_key_marketing_telemetry).apply { isChecked = context.settings().isMarketingTelemetryEnabled - - val appName = context.getString(R.string.app_name) - summary = String.format( - context.getString(R.string.preferences_marketing_data_description), - appName - ) - onPreferenceChangeListener = SharedPreferenceUpdater() } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index d5b5e30b8..354dc6794 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -443,6 +443,8 @@ Marketing data Shares data about what features you use in %1$s with Leanplum, our mobile marketing vendor. + + Shares basic usage data with Adjust, our mobile marketing vendor Studies diff --git a/app/src/main/res/xml/data_choices_preferences.xml b/app/src/main/res/xml/data_choices_preferences.xml index 8026e973a..d2dcc9d06 100644 --- a/app/src/main/res/xml/data_choices_preferences.xml +++ b/app/src/main/res/xml/data_choices_preferences.xml @@ -9,7 +9,7 @@ android:title="@string/preference_usage_data" /> Date: Thu, 29 Apr 2021 16:36:17 +0200 Subject: [PATCH 051/256] Issue #19040 - Fix UI test: settingsPrivacyItemsTest --- .../fenix/ui/robots/SettingsSubMenuDataCollectionRobot.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/SettingsSubMenuDataCollectionRobot.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/SettingsSubMenuDataCollectionRobot.kt index 07f36c0ff..c4dbca480 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/SettingsSubMenuDataCollectionRobot.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/SettingsSubMenuDataCollectionRobot.kt @@ -77,7 +77,7 @@ private fun assertDataCollectionOptions() { .check(matches(withEffectiveVisibility(Visibility.VISIBLE))) val marketingDataText = - "Shares data about what features you use in Firefox Preview with Leanplum, our mobile marketing vendor." + "Shares basic usage data with Adjust, our mobile marketing vendor" onView(withText(marketingDataText)) .check(matches(withEffectiveVisibility(Visibility.VISIBLE))) From 66049b074e178f81d6795a925ceda550436eded6 Mon Sep 17 00:00:00 2001 From: MickeyMoz Date: Thu, 29 Apr 2021 15:35:26 +0000 Subject: [PATCH 052/256] Update Android Components version to 90.0.20210429143130. --- buildSrc/src/main/java/AndroidComponents.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/java/AndroidComponents.kt b/buildSrc/src/main/java/AndroidComponents.kt index 513d0f0d5..f7eda3538 100644 --- a/buildSrc/src/main/java/AndroidComponents.kt +++ b/buildSrc/src/main/java/AndroidComponents.kt @@ -3,5 +3,5 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ object AndroidComponents { - const val VERSION = "90.0.20210428143111" + const val VERSION = "90.0.20210429143130" } From 5b5e7ebf47c0d6bd6de7244f3dfa85fd0a661a1f Mon Sep 17 00:00:00 2001 From: Elise Richards Date: Thu, 29 Apr 2021 11:34:57 -0500 Subject: [PATCH 053/256] Turn on feature flag for three-dot menu redesign for beta. (#19111) --- app/src/main/java/org/mozilla/fenix/FeatureFlags.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/mozilla/fenix/FeatureFlags.kt b/app/src/main/java/org/mozilla/fenix/FeatureFlags.kt index eaf3489f9..205761689 100644 --- a/app/src/main/java/org/mozilla/fenix/FeatureFlags.kt +++ b/app/src/main/java/org/mozilla/fenix/FeatureFlags.kt @@ -37,7 +37,7 @@ object FeatureFlags { /** * Shows new three-dot toolbar menu design. */ - val toolbarMenuFeature = Config.channel.isNightlyOrDebug + const val toolbarMenuFeature = true /** * Enables the tabs tray re-write with Synced Tabs. From 05c38d911e1ca6af737a4b9663608e0db55cff9d Mon Sep 17 00:00:00 2001 From: Priyanka <56197993+priyanka0906@users.noreply.github.com> Date: Fri, 30 Apr 2021 00:36:46 +0530 Subject: [PATCH 054/256] For #19273 - Ensure a new line at the EOF is available in all xml files (#19295) --- app/src/debug/res/xml/shortcuts.xml | 2 +- app/src/main/res/anim/fade_in.xml | 2 +- app/src/main/res/anim/fade_out.xml | 2 +- app/src/main/res/anim/placeholder_animation.xml | 2 +- app/src/main/res/anim/slide_out_right.xml | 2 +- app/src/main/res/anim/zoom_in_fade.xml | 2 +- app/src/main/res/anim/zoom_out_fade.xml | 2 +- app/src/main/res/color/onboarding_illustration_color.xml | 2 +- app/src/main/res/color/readerview_private_button_color.xml | 2 +- app/src/main/res/color/readerview_private_radio_color.xml | 2 +- app/src/main/res/color/saved_login_clear_edit_text_tint.xml | 2 +- app/src/main/res/color/tab_checkbox_tint.xml | 2 +- app/src/main/res/color/tab_icon.xml | 2 +- app/src/main/res/drawable-v24/shield_light.xml | 2 +- .../main/res/drawable-v26/ic_launcher_private_background.xml | 1 - .../main/res/drawable-v26/ic_static_shortcut_private_tab.xml | 2 +- app/src/main/res/drawable-v26/ic_static_shortcut_tab.xml | 2 +- app/src/main/res/drawable/add_tabs_to_collection_background.xml | 2 +- .../res/drawable/bottom_sheet_dialog_fragment_background.xml | 2 +- app/src/main/res/drawable/button_background.xml | 2 +- app/src/main/res/drawable/button_background_grey.xml | 2 +- app/src/main/res/drawable/crash_reporter_button.xml | 2 +- app/src/main/res/drawable/device_background.xml | 2 +- app/src/main/res/drawable/dialog_background.xml | 2 +- app/src/main/res/drawable/dialog_button_background.xml | 2 +- app/src/main/res/drawable/favicon_background.xml | 2 +- app/src/main/res/drawable/home_search_background.xml | 2 +- app/src/main/res/drawable/ic_autoplay.xml | 2 +- app/src/main/res/drawable/ic_desktop.xml | 2 +- app/src/main/res/drawable/ic_drawer_pull_tab.xml | 2 +- app/src/main/res/drawable/ic_home.xml | 2 +- app/src/main/res/drawable/ic_link.xml | 2 +- app/src/main/res/drawable/ic_static_shortcut_background.xml | 2 +- app/src/main/res/drawable/ic_static_shortcut_private_tab.xml | 2 +- app/src/main/res/drawable/ic_static_shortcut_tab.xml | 2 +- app/src/main/res/drawable/ic_top_sites.xml | 1 - app/src/main/res/drawable/migration_button_background.xml | 2 +- .../main/res/drawable/mozac_ic_warning_with_bottom_padding.xml | 2 +- app/src/main/res/drawable/private_home_background_gradient.xml | 2 +- app/src/main/res/drawable/recent_apps_background.xml | 2 +- app/src/main/res/drawable/rounded_bottom_corners.xml | 2 +- .../res/drawable/rounded_grey_corners_transparent_center.xml | 2 +- app/src/main/res/drawable/rounded_search_widget_background.xml | 2 +- app/src/main/res/drawable/search_url_background.xml | 2 +- app/src/main/res/drawable/session_border.xml | 2 +- app/src/main/res/drawable/shield_light.xml | 2 +- app/src/main/res/drawable/url_background.xml | 2 +- app/src/main/res/font/metropolis.xml | 2 +- app/src/main/res/layout/browser_toolbar_popup_window.xml | 2 +- app/src/main/res/layout/collection_header.xml | 2 +- app/src/main/res/layout/component_browser_top_toolbar.xml | 1 - app/src/main/res/layout/component_locale_settings.xml | 2 +- .../res/layout/component_permissions_blocked_by_android.xml | 1 - app/src/main/res/layout/component_tabhistory.xml | 1 - app/src/main/res/layout/delete_exceptions_button.xml | 1 - app/src/main/res/layout/download_list_item.xml | 2 +- app/src/main/res/layout/etp_dropdown_item.xml | 2 +- app/src/main/res/layout/fragment_locale_settings.xml | 2 +- .../layout/fragment_manage_site_permissions_feature_phone.xml | 2 +- app/src/main/res/layout/fragment_search.xml | 2 +- .../res/layout/fragment_site_permissions_exceptions_item.xml | 1 - app/src/main/res/layout/layout_url_background.xml | 2 +- app/src/main/res/layout/locale_settings_item.xml | 2 +- app/src/main/res/layout/migration_list_item.xml | 2 +- app/src/main/res/layout/onboarding_tracking_protection.xml | 2 +- app/src/main/res/layout/preference_cat_style.xml | 2 +- app/src/main/res/layout/preference_category_no_icon_style.xml | 2 +- app/src/main/res/layout/preference_search_engine_chooser.xml | 2 +- .../res/layout/quicksetting_permission_spinner_dropdown.xml | 2 +- app/src/main/res/layout/recently_closed_nav_item.xml | 2 +- app/src/main/res/layout/search_suggestions_hint.xml | 2 +- app/src/main/res/layout/search_widget_small_no_mic.xml | 2 +- app/src/main/res/layout/share_close.xml | 2 +- app/src/main/res/layout/share_tab_item.xml | 2 +- app/src/main/res/layout/share_to_apps.xml | 1 - app/src/main/res/layout/tab_history_list_item.xml | 1 - app/src/main/res/layout/tabs_tray_tab_counter.xml | 2 +- app/src/main/res/layout/tabs_tray_tab_counter2.xml | 2 +- app/src/main/res/layout/view_synced_tabs_no_item.xml | 2 +- app/src/main/res/layout/view_synced_tabs_title.xml | 2 +- app/src/main/res/menu/download_select_multi.xml | 2 +- app/src/main/res/menu/login_save.xml | 2 +- app/src/main/res/menu/tab_tray_menu.xml | 2 +- app/src/main/res/mipmap-anydpi-v26/ic_launcher_private.xml | 2 +- .../main/res/mipmap-anydpi-v26/ic_launcher_private_round.xml | 2 +- app/src/main/res/values/arrays.xml | 2 +- app/src/main/res/values/mozonline_strings.xml | 1 - app/src/main/res/xml/logins_preferences.xml | 1 - app/src/main/res/xml/search_widget_info.xml | 2 +- app/src/main/res/xml/shortcuts.xml | 2 +- 90 files changed, 79 insertions(+), 90 deletions(-) diff --git a/app/src/debug/res/xml/shortcuts.xml b/app/src/debug/res/xml/shortcuts.xml index 1873a5af4..43b3ff7bd 100644 --- a/app/src/debug/res/xml/shortcuts.xml +++ b/app/src/debug/res/xml/shortcuts.xml @@ -26,4 +26,4 @@ android:targetPackage="org.mozilla.fenix.debug" android:targetClass="org.mozilla.fenix.IntentReceiverActivity" /> - \ No newline at end of file + diff --git a/app/src/main/res/anim/fade_in.xml b/app/src/main/res/anim/fade_in.xml index 8024b31fd..b5e953477 100644 --- a/app/src/main/res/anim/fade_in.xml +++ b/app/src/main/res/anim/fade_in.xml @@ -5,4 +5,4 @@ \ No newline at end of file + android:duration="250" /> diff --git a/app/src/main/res/anim/fade_out.xml b/app/src/main/res/anim/fade_out.xml index 4c00bc4a6..7dd6477c2 100644 --- a/app/src/main/res/anim/fade_out.xml +++ b/app/src/main/res/anim/fade_out.xml @@ -5,4 +5,4 @@ \ No newline at end of file + android:duration="250" /> diff --git a/app/src/main/res/anim/placeholder_animation.xml b/app/src/main/res/anim/placeholder_animation.xml index 80c254842..348af4210 100644 --- a/app/src/main/res/anim/placeholder_animation.xml +++ b/app/src/main/res/anim/placeholder_animation.xml @@ -6,4 +6,4 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:fromXDelta="0" android:toXDelta="0" - android:duration="900" /> \ No newline at end of file + android:duration="900" /> diff --git a/app/src/main/res/anim/slide_out_right.xml b/app/src/main/res/anim/slide_out_right.xml index 240992691..0e8b6ccbc 100644 --- a/app/src/main/res/anim/slide_out_right.xml +++ b/app/src/main/res/anim/slide_out_right.xml @@ -8,4 +8,4 @@ android:duration="275"/> - \ No newline at end of file + diff --git a/app/src/main/res/anim/zoom_in_fade.xml b/app/src/main/res/anim/zoom_in_fade.xml index 5248878fd..3482fd7e3 100644 --- a/app/src/main/res/anim/zoom_in_fade.xml +++ b/app/src/main/res/anim/zoom_in_fade.xml @@ -16,4 +16,4 @@ android:fromYScale="100%" android:toYScale="113%" android:duration="125" /> - \ No newline at end of file + diff --git a/app/src/main/res/anim/zoom_out_fade.xml b/app/src/main/res/anim/zoom_out_fade.xml index 720b5bf3c..993dafc81 100644 --- a/app/src/main/res/anim/zoom_out_fade.xml +++ b/app/src/main/res/anim/zoom_out_fade.xml @@ -16,4 +16,4 @@ android:fromYScale="108%" android:toYScale="100%" android:duration="175" /> - \ No newline at end of file + diff --git a/app/src/main/res/color/onboarding_illustration_color.xml b/app/src/main/res/color/onboarding_illustration_color.xml index 040718d7a..5a8c8da54 100644 --- a/app/src/main/res/color/onboarding_illustration_color.xml +++ b/app/src/main/res/color/onboarding_illustration_color.xml @@ -5,4 +5,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/color/readerview_private_button_color.xml b/app/src/main/res/color/readerview_private_button_color.xml index 48b2a921e..afd227af8 100644 --- a/app/src/main/res/color/readerview_private_button_color.xml +++ b/app/src/main/res/color/readerview_private_button_color.xml @@ -5,4 +5,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/color/readerview_private_radio_color.xml b/app/src/main/res/color/readerview_private_radio_color.xml index 0136866d0..56b5f8a12 100644 --- a/app/src/main/res/color/readerview_private_radio_color.xml +++ b/app/src/main/res/color/readerview_private_radio_color.xml @@ -5,4 +5,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/color/saved_login_clear_edit_text_tint.xml b/app/src/main/res/color/saved_login_clear_edit_text_tint.xml index ada9ebc97..1a800496d 100644 --- a/app/src/main/res/color/saved_login_clear_edit_text_tint.xml +++ b/app/src/main/res/color/saved_login_clear_edit_text_tint.xml @@ -7,4 +7,4 @@ android:color="?primaryText" /> - \ No newline at end of file + diff --git a/app/src/main/res/color/tab_checkbox_tint.xml b/app/src/main/res/color/tab_checkbox_tint.xml index 3eff7db2a..fe33814e7 100644 --- a/app/src/main/res/color/tab_checkbox_tint.xml +++ b/app/src/main/res/color/tab_checkbox_tint.xml @@ -4,4 +4,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/color/tab_icon.xml b/app/src/main/res/color/tab_icon.xml index 48ad13b5b..ed703e81e 100644 --- a/app/src/main/res/color/tab_icon.xml +++ b/app/src/main/res/color/tab_icon.xml @@ -5,4 +5,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/drawable-v24/shield_light.xml b/app/src/main/res/drawable-v24/shield_light.xml index e04aca611..0e322f569 100644 --- a/app/src/main/res/drawable-v24/shield_light.xml +++ b/app/src/main/res/drawable-v24/shield_light.xml @@ -78,4 +78,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/drawable-v26/ic_launcher_private_background.xml b/app/src/main/res/drawable-v26/ic_launcher_private_background.xml index ab3c79093..26ba3b670 100644 --- a/app/src/main/res/drawable-v26/ic_launcher_private_background.xml +++ b/app/src/main/res/drawable-v26/ic_launcher_private_background.xml @@ -23,4 +23,3 @@
- diff --git a/app/src/main/res/drawable-v26/ic_static_shortcut_private_tab.xml b/app/src/main/res/drawable-v26/ic_static_shortcut_private_tab.xml index 479544f20..0fc49198c 100644 --- a/app/src/main/res/drawable-v26/ic_static_shortcut_private_tab.xml +++ b/app/src/main/res/drawable-v26/ic_static_shortcut_private_tab.xml @@ -6,4 +6,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/drawable-v26/ic_static_shortcut_tab.xml b/app/src/main/res/drawable-v26/ic_static_shortcut_tab.xml index cb4d26633..2351ce27c 100644 --- a/app/src/main/res/drawable-v26/ic_static_shortcut_tab.xml +++ b/app/src/main/res/drawable-v26/ic_static_shortcut_tab.xml @@ -6,4 +6,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/drawable/add_tabs_to_collection_background.xml b/app/src/main/res/drawable/add_tabs_to_collection_background.xml index 43cde06e7..d50f08972 100644 --- a/app/src/main/res/drawable/add_tabs_to_collection_background.xml +++ b/app/src/main/res/drawable/add_tabs_to_collection_background.xml @@ -6,4 +6,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/drawable/bottom_sheet_dialog_fragment_background.xml b/app/src/main/res/drawable/bottom_sheet_dialog_fragment_background.xml index 0c9ac22a3..93ba489d3 100644 --- a/app/src/main/res/drawable/bottom_sheet_dialog_fragment_background.xml +++ b/app/src/main/res/drawable/bottom_sheet_dialog_fragment_background.xml @@ -5,4 +5,4 @@ android:topLeftRadius="@dimen/bottom_sheet_corner_radius" android:topRightRadius="@dimen/bottom_sheet_corner_radius" /> - \ No newline at end of file + diff --git a/app/src/main/res/drawable/button_background.xml b/app/src/main/res/drawable/button_background.xml index d50c66558..927fa280d 100644 --- a/app/src/main/res/drawable/button_background.xml +++ b/app/src/main/res/drawable/button_background.xml @@ -6,4 +6,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/drawable/button_background_grey.xml b/app/src/main/res/drawable/button_background_grey.xml index 6dcdce8a8..916a19155 100644 --- a/app/src/main/res/drawable/button_background_grey.xml +++ b/app/src/main/res/drawable/button_background_grey.xml @@ -6,4 +6,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/drawable/crash_reporter_button.xml b/app/src/main/res/drawable/crash_reporter_button.xml index 81511ea2c..976bc05cd 100644 --- a/app/src/main/res/drawable/crash_reporter_button.xml +++ b/app/src/main/res/drawable/crash_reporter_button.xml @@ -13,4 +13,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/drawable/device_background.xml b/app/src/main/res/drawable/device_background.xml index 8cc5ad492..c9c973af2 100644 --- a/app/src/main/res/drawable/device_background.xml +++ b/app/src/main/res/drawable/device_background.xml @@ -7,4 +7,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/drawable/dialog_background.xml b/app/src/main/res/drawable/dialog_background.xml index aa3fcf5c6..98156a1b9 100644 --- a/app/src/main/res/drawable/dialog_background.xml +++ b/app/src/main/res/drawable/dialog_background.xml @@ -6,4 +6,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/drawable/dialog_button_background.xml b/app/src/main/res/drawable/dialog_button_background.xml index e4aaec8f3..faafaaf7f 100644 --- a/app/src/main/res/drawable/dialog_button_background.xml +++ b/app/src/main/res/drawable/dialog_button_background.xml @@ -6,4 +6,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/drawable/favicon_background.xml b/app/src/main/res/drawable/favicon_background.xml index 5efbdace9..5aebd70dd 100644 --- a/app/src/main/res/drawable/favicon_background.xml +++ b/app/src/main/res/drawable/favicon_background.xml @@ -6,4 +6,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/drawable/home_search_background.xml b/app/src/main/res/drawable/home_search_background.xml index 19e41a79f..20619c9f3 100644 --- a/app/src/main/res/drawable/home_search_background.xml +++ b/app/src/main/res/drawable/home_search_background.xml @@ -5,4 +5,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/drawable/ic_autoplay.xml b/app/src/main/res/drawable/ic_autoplay.xml index 86ea0d369..f3d5a487f 100644 --- a/app/src/main/res/drawable/ic_autoplay.xml +++ b/app/src/main/res/drawable/ic_autoplay.xml @@ -12,4 +12,4 @@ android:id="@+id/disabled" android:drawable="@drawable/ic_autoplay_disabled" /> - \ No newline at end of file + diff --git a/app/src/main/res/drawable/ic_desktop.xml b/app/src/main/res/drawable/ic_desktop.xml index 76629aa8e..de303bb1e 100644 --- a/app/src/main/res/drawable/ic_desktop.xml +++ b/app/src/main/res/drawable/ic_desktop.xml @@ -9,4 +9,4 @@ android:viewportHeight="24"> - \ No newline at end of file + diff --git a/app/src/main/res/drawable/ic_drawer_pull_tab.xml b/app/src/main/res/drawable/ic_drawer_pull_tab.xml index b3a54e018..015f3ef7c 100644 --- a/app/src/main/res/drawable/ic_drawer_pull_tab.xml +++ b/app/src/main/res/drawable/ic_drawer_pull_tab.xml @@ -9,4 +9,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/drawable/ic_home.xml b/app/src/main/res/drawable/ic_home.xml index 57149e629..2348db076 100644 --- a/app/src/main/res/drawable/ic_home.xml +++ b/app/src/main/res/drawable/ic_home.xml @@ -10,4 +10,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/drawable/ic_link.xml b/app/src/main/res/drawable/ic_link.xml index 0e034b502..7cf4c3232 100644 --- a/app/src/main/res/drawable/ic_link.xml +++ b/app/src/main/res/drawable/ic_link.xml @@ -11,4 +11,4 @@ android:id="@+id/disabled" android:drawable="@drawable/ic_link_disabled" /> - \ No newline at end of file + diff --git a/app/src/main/res/drawable/ic_static_shortcut_background.xml b/app/src/main/res/drawable/ic_static_shortcut_background.xml index a186424a7..32a587e21 100644 --- a/app/src/main/res/drawable/ic_static_shortcut_background.xml +++ b/app/src/main/res/drawable/ic_static_shortcut_background.xml @@ -7,4 +7,4 @@ android:shape="oval"> - \ No newline at end of file + diff --git a/app/src/main/res/drawable/ic_static_shortcut_private_tab.xml b/app/src/main/res/drawable/ic_static_shortcut_private_tab.xml index beaaf6582..d9f67886f 100644 --- a/app/src/main/res/drawable/ic_static_shortcut_private_tab.xml +++ b/app/src/main/res/drawable/ic_static_shortcut_private_tab.xml @@ -6,4 +6,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/drawable/ic_static_shortcut_tab.xml b/app/src/main/res/drawable/ic_static_shortcut_tab.xml index 15759ffc3..c78a6647b 100644 --- a/app/src/main/res/drawable/ic_static_shortcut_tab.xml +++ b/app/src/main/res/drawable/ic_static_shortcut_tab.xml @@ -6,4 +6,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/drawable/ic_top_sites.xml b/app/src/main/res/drawable/ic_top_sites.xml index 44ca20fe3..11123a240 100644 --- a/app/src/main/res/drawable/ic_top_sites.xml +++ b/app/src/main/res/drawable/ic_top_sites.xml @@ -11,4 +11,3 @@ android:fillColor="?primaryText" android:pathData="m9.667,13c0.7362,0 1.333,0.5968 1.333,1.333v5.334c0,0.7362 -0.5968,1.333 -1.333,1.333h-5.334c-0.7362,0 -1.333,-0.5968 -1.333,-1.333v-5.334c0,-0.7362 0.5968,-1.333 1.333,-1.333zM19.667,13c0.7362,0 1.333,0.5968 1.333,1.333v5.334c0,0.7362 -0.5968,1.333 -1.333,1.333h-5.334c-0.7362,0 -1.333,-0.5968 -1.333,-1.333v-5.334c0,-0.7362 0.5968,-1.333 1.333,-1.333zM9.667,3c0.7362,0 1.333,0.5968 1.333,1.333v5.334c0,0.7362 -0.5968,1.333 -1.333,1.333h-5.334c-0.7362,0 -1.333,-0.5968 -1.333,-1.333v-5.334c0,-0.7362 0.5968,-1.333 1.333,-1.333zM19.667,3c0.7362,0 1.333,0.5968 1.333,1.333v5.334c0,0.7362 -0.5968,1.333 -1.333,1.333h-5.334c-0.7362,0 -1.333,-0.5968 -1.333,-1.333v-5.334c0,-0.7362 0.5968,-1.333 1.333,-1.333z" /> - diff --git a/app/src/main/res/drawable/migration_button_background.xml b/app/src/main/res/drawable/migration_button_background.xml index e70aee5b4..99596c710 100644 --- a/app/src/main/res/drawable/migration_button_background.xml +++ b/app/src/main/res/drawable/migration_button_background.xml @@ -6,4 +6,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/drawable/mozac_ic_warning_with_bottom_padding.xml b/app/src/main/res/drawable/mozac_ic_warning_with_bottom_padding.xml index 408f4c077..d285b129b 100644 --- a/app/src/main/res/drawable/mozac_ic_warning_with_bottom_padding.xml +++ b/app/src/main/res/drawable/mozac_ic_warning_with_bottom_padding.xml @@ -6,4 +6,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/drawable/private_home_background_gradient.xml b/app/src/main/res/drawable/private_home_background_gradient.xml index bf2877bae..267bc2096 100644 --- a/app/src/main/res/drawable/private_home_background_gradient.xml +++ b/app/src/main/res/drawable/private_home_background_gradient.xml @@ -13,4 +13,4 @@ android:type="linear" /> - \ No newline at end of file + diff --git a/app/src/main/res/drawable/recent_apps_background.xml b/app/src/main/res/drawable/recent_apps_background.xml index a7c314420..3aaebe431 100644 --- a/app/src/main/res/drawable/recent_apps_background.xml +++ b/app/src/main/res/drawable/recent_apps_background.xml @@ -5,4 +5,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/drawable/rounded_bottom_corners.xml b/app/src/main/res/drawable/rounded_bottom_corners.xml index 4ce4f140b..1407f4e20 100644 --- a/app/src/main/res/drawable/rounded_bottom_corners.xml +++ b/app/src/main/res/drawable/rounded_bottom_corners.xml @@ -6,4 +6,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/drawable/rounded_grey_corners_transparent_center.xml b/app/src/main/res/drawable/rounded_grey_corners_transparent_center.xml index e933d4ef2..e803ff8df 100644 --- a/app/src/main/res/drawable/rounded_grey_corners_transparent_center.xml +++ b/app/src/main/res/drawable/rounded_grey_corners_transparent_center.xml @@ -10,4 +10,4 @@ android:width="1dp" android:color="?toolbarDivider"/> - \ No newline at end of file + diff --git a/app/src/main/res/drawable/rounded_search_widget_background.xml b/app/src/main/res/drawable/rounded_search_widget_background.xml index e37f2029b..a21f3705d 100644 --- a/app/src/main/res/drawable/rounded_search_widget_background.xml +++ b/app/src/main/res/drawable/rounded_search_widget_background.xml @@ -6,4 +6,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/drawable/search_url_background.xml b/app/src/main/res/drawable/search_url_background.xml index 955ed4696..fd279d445 100644 --- a/app/src/main/res/drawable/search_url_background.xml +++ b/app/src/main/res/drawable/search_url_background.xml @@ -9,4 +9,4 @@ android:bottomLeftRadius="8dp" android:topLeftRadius="8dp" android:topRightRadius="8dp"/> - \ No newline at end of file + diff --git a/app/src/main/res/drawable/session_border.xml b/app/src/main/res/drawable/session_border.xml index daa19bd86..5b7de5836 100644 --- a/app/src/main/res/drawable/session_border.xml +++ b/app/src/main/res/drawable/session_border.xml @@ -6,4 +6,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/drawable/shield_light.xml b/app/src/main/res/drawable/shield_light.xml index f621f8390..34cbdc10e 100644 --- a/app/src/main/res/drawable/shield_light.xml +++ b/app/src/main/res/drawable/shield_light.xml @@ -28,4 +28,4 @@ android:valueType="colorType" /> - \ No newline at end of file + diff --git a/app/src/main/res/drawable/url_background.xml b/app/src/main/res/drawable/url_background.xml index 3058f12e5..d543eb368 100644 --- a/app/src/main/res/drawable/url_background.xml +++ b/app/src/main/res/drawable/url_background.xml @@ -10,4 +10,4 @@ android:bottomRightRadius="8dp" android:topLeftRadius="8dp" android:topRightRadius="8dp" /> - \ No newline at end of file + diff --git a/app/src/main/res/font/metropolis.xml b/app/src/main/res/font/metropolis.xml index bdb818c34..5ccbd737a 100644 --- a/app/src/main/res/font/metropolis.xml +++ b/app/src/main/res/font/metropolis.xml @@ -74,4 +74,4 @@ app:fontStyle="normal" app:fontWeight="100" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/browser_toolbar_popup_window.xml b/app/src/main/res/layout/browser_toolbar_popup_window.xml index 3cd156001..28ed26d0f 100644 --- a/app/src/main/res/layout/browser_toolbar_popup_window.xml +++ b/app/src/main/res/layout/browser_toolbar_popup_window.xml @@ -50,4 +50,4 @@ android:text="@string/browser_toolbar_long_press_popup_paste_and_go" android:textAllCaps="false" android:textColor="?primaryText" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/collection_header.xml b/app/src/main/res/layout/collection_header.xml index e2d7af88d..9122f0455 100644 --- a/app/src/main/res/layout/collection_header.xml +++ b/app/src/main/res/layout/collection_header.xml @@ -8,4 +8,4 @@ android:layout_height="48dp" android:gravity="center_vertical" android:text="@string/collections_header" - android:textAppearance="@style/HeaderTextStyle" /> \ No newline at end of file + android:textAppearance="@style/HeaderTextStyle" /> diff --git a/app/src/main/res/layout/component_browser_top_toolbar.xml b/app/src/main/res/layout/component_browser_top_toolbar.xml index 77f460296..0152ecdb1 100644 --- a/app/src/main/res/layout/component_browser_top_toolbar.xml +++ b/app/src/main/res/layout/component_browser_top_toolbar.xml @@ -20,4 +20,3 @@ app:browserToolbarProgressBarGravity="bottom" app:browserToolbarSecureColor="?primaryText" app:browserToolbarTrackingProtectionAndSecurityIndicatorSeparatorColor="?toolbarDivider" /> - diff --git a/app/src/main/res/layout/component_locale_settings.xml b/app/src/main/res/layout/component_locale_settings.xml index 338f2868c..5cde4858c 100644 --- a/app/src/main/res/layout/component_locale_settings.xml +++ b/app/src/main/res/layout/component_locale_settings.xml @@ -18,4 +18,4 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/component_permissions_blocked_by_android.xml b/app/src/main/res/layout/component_permissions_blocked_by_android.xml index 7ddd84db2..57bdd497b 100644 --- a/app/src/main/res/layout/component_permissions_blocked_by_android.xml +++ b/app/src/main/res/layout/component_permissions_blocked_by_android.xml @@ -63,4 +63,3 @@ android:text="@string/phone_feature_go_to_settings" /> - diff --git a/app/src/main/res/layout/component_tabhistory.xml b/app/src/main/res/layout/component_tabhistory.xml index 073753f5c..f01a2efcf 100644 --- a/app/src/main/res/layout/component_tabhistory.xml +++ b/app/src/main/res/layout/component_tabhistory.xml @@ -28,4 +28,3 @@ android:paddingTop="19dp" tools:listitem="@layout/history_list_item" /> - diff --git a/app/src/main/res/layout/delete_exceptions_button.xml b/app/src/main/res/layout/delete_exceptions_button.xml index 7b4bee99e..6b69a49a6 100644 --- a/app/src/main/res/layout/delete_exceptions_button.xml +++ b/app/src/main/res/layout/delete_exceptions_button.xml @@ -8,4 +8,3 @@ style="@style/NeutralButton" android:layout_marginHorizontal="16dp" android:text="@string/preferences_tracking_protection_exceptions_turn_on_for_all" /> - diff --git a/app/src/main/res/layout/download_list_item.xml b/app/src/main/res/layout/download_list_item.xml index 89c5da55c..bf2dc7d2d 100644 --- a/app/src/main/res/layout/download_list_item.xml +++ b/app/src/main/res/layout/download_list_item.xml @@ -21,4 +21,4 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="@dimen/library_item_height" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/etp_dropdown_item.xml b/app/src/main/res/layout/etp_dropdown_item.xml index e0ce6d9f9..33790393d 100644 --- a/app/src/main/res/layout/etp_dropdown_item.xml +++ b/app/src/main/res/layout/etp_dropdown_item.xml @@ -11,4 +11,4 @@ android:paddingStart="15dp" android:gravity="center_vertical" android:background="@drawable/etp_spinner_item_background" - android:textSize="14sp" /> \ No newline at end of file + android:textSize="14sp" /> diff --git a/app/src/main/res/layout/fragment_locale_settings.xml b/app/src/main/res/layout/fragment_locale_settings.xml index eb8b403c7..d235e7043 100644 --- a/app/src/main/res/layout/fragment_locale_settings.xml +++ b/app/src/main/res/layout/fragment_locale_settings.xml @@ -16,4 +16,4 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/fragment_manage_site_permissions_feature_phone.xml b/app/src/main/res/layout/fragment_manage_site_permissions_feature_phone.xml index f1019b488..9dab31a01 100644 --- a/app/src/main/res/layout/fragment_manage_site_permissions_feature_phone.xml +++ b/app/src/main/res/layout/fragment_manage_site_permissions_feature_phone.xml @@ -80,4 +80,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/layout/fragment_search.xml b/app/src/main/res/layout/fragment_search.xml index 6a7e8be88..da0653431 100644 --- a/app/src/main/res/layout/fragment_search.xml +++ b/app/src/main/res/layout/fragment_search.xml @@ -202,4 +202,4 @@ android:textOn="@string/search_engine_button" app:drawableStartCompat="@drawable/ic_search" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/fragment_site_permissions_exceptions_item.xml b/app/src/main/res/layout/fragment_site_permissions_exceptions_item.xml index ed6da05d1..476a6bcc3 100644 --- a/app/src/main/res/layout/fragment_site_permissions_exceptions_item.xml +++ b/app/src/main/res/layout/fragment_site_permissions_exceptions_item.xml @@ -31,4 +31,3 @@ tools:text="mozilla.com" /> - diff --git a/app/src/main/res/layout/layout_url_background.xml b/app/src/main/res/layout/layout_url_background.xml index da7b45fae..db5a90b13 100644 --- a/app/src/main/res/layout/layout_url_background.xml +++ b/app/src/main/res/layout/layout_url_background.xml @@ -13,4 +13,4 @@ android:layout_height="40dp" android:layout_gravity="center_vertical" android:background="@drawable/search_url_background"/> -
\ No newline at end of file +
diff --git a/app/src/main/res/layout/locale_settings_item.xml b/app/src/main/res/layout/locale_settings_item.xml index 511ae58c5..ca15df65a 100644 --- a/app/src/main/res/layout/locale_settings_item.xml +++ b/app/src/main/res/layout/locale_settings_item.xml @@ -56,4 +56,4 @@ app:layout_constraintVertical_chainStyle="packed" tools:text="English (United States)" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/migration_list_item.xml b/app/src/main/res/layout/migration_list_item.xml index 1060a1ad3..811790ec2 100644 --- a/app/src/main/res/layout/migration_list_item.xml +++ b/app/src/main/res/layout/migration_list_item.xml @@ -33,4 +33,4 @@ app:layout_constraintStart_toEndOf="@+id/migration_status_image" app:layout_constraintTop_toTopOf="parent" tools:text="@sample/migration_items" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/onboarding_tracking_protection.xml b/app/src/main/res/layout/onboarding_tracking_protection.xml index e97cc3041..97ce4d7b1 100644 --- a/app/src/main/res/layout/onboarding_tracking_protection.xml +++ b/app/src/main/res/layout/onboarding_tracking_protection.xml @@ -80,4 +80,4 @@ app:onboardingKeyDescription="@string/onboarding_tracking_protection_strict_button_description_3" app:onboardingKeyTitle="@string/onboarding_tracking_protection_strict_option" tools:text="Strict" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/preference_cat_style.xml b/app/src/main/res/layout/preference_cat_style.xml index b0b640ed7..98934ae20 100644 --- a/app/src/main/res/layout/preference_cat_style.xml +++ b/app/src/main/res/layout/preference_cat_style.xml @@ -10,4 +10,4 @@ android:layout_height="@dimen/section_header_height" android:layout_marginStart="@dimen/top_bar_alignment_margin_start" android:gravity="start|center_vertical" - app:allowDividerAbove="true" /> \ No newline at end of file + app:allowDividerAbove="true" /> diff --git a/app/src/main/res/layout/preference_category_no_icon_style.xml b/app/src/main/res/layout/preference_category_no_icon_style.xml index b5f7df4ab..fee6140d9 100644 --- a/app/src/main/res/layout/preference_category_no_icon_style.xml +++ b/app/src/main/res/layout/preference_category_no_icon_style.xml @@ -10,4 +10,4 @@ android:layout_height="@dimen/section_header_height" android:layout_marginStart="@dimen/top_bar_no_icon_alignment_margin_start" android:gravity="start|center_vertical" - app:allowDividerAbove="true" /> \ No newline at end of file + app:allowDividerAbove="true" /> diff --git a/app/src/main/res/layout/preference_search_engine_chooser.xml b/app/src/main/res/layout/preference_search_engine_chooser.xml index 650f700f4..0fdae27f9 100644 --- a/app/src/main/res/layout/preference_search_engine_chooser.xml +++ b/app/src/main/res/layout/preference_search_engine_chooser.xml @@ -13,4 +13,4 @@ android:layout_width="match_parent" android:layout_height="wrap_content" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/quicksetting_permission_spinner_dropdown.xml b/app/src/main/res/layout/quicksetting_permission_spinner_dropdown.xml index 20d16c5f6..649870fec 100644 --- a/app/src/main/res/layout/quicksetting_permission_spinner_dropdown.xml +++ b/app/src/main/res/layout/quicksetting_permission_spinner_dropdown.xml @@ -13,4 +13,4 @@ android:paddingStart="15dp" android:paddingEnd="15dp" tools:text="Allow Audible" - android:textColor="?accentUsedOnDarkBackground" /> \ No newline at end of file + android:textColor="?accentUsedOnDarkBackground" /> diff --git a/app/src/main/res/layout/recently_closed_nav_item.xml b/app/src/main/res/layout/recently_closed_nav_item.xml index 02ad905ae..6230b4d5f 100644 --- a/app/src/main/res/layout/recently_closed_nav_item.xml +++ b/app/src/main/res/layout/recently_closed_nav_item.xml @@ -63,4 +63,4 @@ app:layout_constraintTop_toBottomOf="@id/recently_closed_tabs_header" app:layout_goneMarginEnd="@dimen/library_item_icon_margin_horizontal" tools:text="2 tabs" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/search_suggestions_hint.xml b/app/src/main/res/layout/search_suggestions_hint.xml index 14bf46202..914a63125 100644 --- a/app/src/main/res/layout/search_suggestions_hint.xml +++ b/app/src/main/res/layout/search_suggestions_hint.xml @@ -102,4 +102,4 @@ app:layout_constraintTop_toTopOf="@id/allow" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/search_widget_small_no_mic.xml b/app/src/main/res/layout/search_widget_small_no_mic.xml index 89c056207..d0bd2d81a 100644 --- a/app/src/main/res/layout/search_widget_small_no_mic.xml +++ b/app/src/main/res/layout/search_widget_small_no_mic.xml @@ -16,4 +16,4 @@ android:layout_height="40dp" android:layout_gravity="center" android:contentDescription="@string/search_widget_content_description" /> -
\ No newline at end of file + diff --git a/app/src/main/res/layout/share_close.xml b/app/src/main/res/layout/share_close.xml index 8bc84de86..918f0c9f3 100644 --- a/app/src/main/res/layout/share_close.xml +++ b/app/src/main/res/layout/share_close.xml @@ -48,4 +48,4 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/title" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/share_tab_item.xml b/app/src/main/res/layout/share_tab_item.xml index 47735c24f..48315f2f2 100644 --- a/app/src/main/res/layout/share_tab_item.xml +++ b/app/src/main/res/layout/share_tab_item.xml @@ -48,4 +48,4 @@ app:layout_constraintTop_toBottomOf="@id/share_tab_title" app:layout_constraintEnd_toEndOf="parent"/> - \ No newline at end of file + diff --git a/app/src/main/res/layout/share_to_apps.xml b/app/src/main/res/layout/share_to_apps.xml index 3f654bcfa..54d257d2b 100644 --- a/app/src/main/res/layout/share_to_apps.xml +++ b/app/src/main/res/layout/share_to_apps.xml @@ -101,4 +101,3 @@ - diff --git a/app/src/main/res/layout/tab_history_list_item.xml b/app/src/main/res/layout/tab_history_list_item.xml index 3bdef8369..a58a46d22 100644 --- a/app/src/main/res/layout/tab_history_list_item.xml +++ b/app/src/main/res/layout/tab_history_list_item.xml @@ -8,4 +8,3 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="@dimen/library_item_height" /> - diff --git a/app/src/main/res/layout/tabs_tray_tab_counter.xml b/app/src/main/res/layout/tabs_tray_tab_counter.xml index df8b697ac..c09d7df21 100644 --- a/app/src/main/res/layout/tabs_tray_tab_counter.xml +++ b/app/src/main/res/layout/tabs_tray_tab_counter.xml @@ -31,4 +31,4 @@ android:textSize="12sp" android:textStyle="bold" tools:text="16" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/tabs_tray_tab_counter2.xml b/app/src/main/res/layout/tabs_tray_tab_counter2.xml index 6c5a6832b..c8ea417bd 100644 --- a/app/src/main/res/layout/tabs_tray_tab_counter2.xml +++ b/app/src/main/res/layout/tabs_tray_tab_counter2.xml @@ -16,4 +16,4 @@ android:layout_height="wrap_content" mozac:tabCounterTintColor="@color/tab_icon" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/view_synced_tabs_no_item.xml b/app/src/main/res/layout/view_synced_tabs_no_item.xml index 769081cd6..362e45190 100644 --- a/app/src/main/res/layout/view_synced_tabs_no_item.xml +++ b/app/src/main/res/layout/view_synced_tabs_no_item.xml @@ -18,4 +18,4 @@ android:textColor="?secondaryText" android:textSize="12sp" /> - \ No newline at end of file + diff --git a/app/src/main/res/layout/view_synced_tabs_title.xml b/app/src/main/res/layout/view_synced_tabs_title.xml index 7082a78b0..80cfee5aa 100644 --- a/app/src/main/res/layout/view_synced_tabs_title.xml +++ b/app/src/main/res/layout/view_synced_tabs_title.xml @@ -30,4 +30,4 @@ app:srcCompat="@drawable/mozac_ic_refresh" app:tint="?primaryText" /> - \ No newline at end of file + diff --git a/app/src/main/res/menu/download_select_multi.xml b/app/src/main/res/menu/download_select_multi.xml index e0087d5c2..d5cd26234 100644 --- a/app/src/main/res/menu/download_select_multi.xml +++ b/app/src/main/res/menu/download_select_multi.xml @@ -12,4 +12,4 @@ android:id="@+id/delete_downloads_multi_select" android:title="@string/download_delete_item_1" app:showAsAction="never" /> - \ No newline at end of file + diff --git a/app/src/main/res/menu/login_save.xml b/app/src/main/res/menu/login_save.xml index fb9682757..644dbf941 100644 --- a/app/src/main/res/menu/login_save.xml +++ b/app/src/main/res/menu/login_save.xml @@ -11,4 +11,4 @@ app:iconTint="@color/save_enabled_ic_color" android:title="@string/save_changes_to_login" app:showAsAction="always" /> - \ No newline at end of file + diff --git a/app/src/main/res/menu/tab_tray_menu.xml b/app/src/main/res/menu/tab_tray_menu.xml index 35c8e87ff..9022adce5 100644 --- a/app/src/main/res/menu/tab_tray_menu.xml +++ b/app/src/main/res/menu/tab_tray_menu.xml @@ -22,4 +22,4 @@ android:id="@+id/tab_tray_close_menu_item" android:title="@string/tab_tray_menu_item_close" app:showAsAction="never" /> - \ No newline at end of file + diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_private.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_private.xml index a527ca92e..66196fc1d 100644 --- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_private.xml +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_private.xml @@ -6,4 +6,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_private_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_private_round.xml index a527ca92e..66196fc1d 100644 --- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_private_round.xml +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_private_round.xml @@ -6,4 +6,4 @@ - \ No newline at end of file + diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index 1143fed8a..de00358b1 100644 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -39,4 +39,4 @@ @string/chrome_scheme @string/about_scheme - \ No newline at end of file + diff --git a/app/src/main/res/values/mozonline_strings.xml b/app/src/main/res/values/mozonline_strings.xml index 61724501e..a9b52aba1 100644 --- a/app/src/main/res/values/mozonline_strings.xml +++ b/app/src/main/res/values/mozonline_strings.xml @@ -36,4 +36,3 @@ https://firefox.com.cn/pair]]> - diff --git a/app/src/main/res/xml/logins_preferences.xml b/app/src/main/res/xml/logins_preferences.xml index 0c003b154..146a83de2 100644 --- a/app/src/main/res/xml/logins_preferences.xml +++ b/app/src/main/res/xml/logins_preferences.xml @@ -24,4 +24,3 @@ android:title="@string/preferences_passwords_exceptions" app:icon="@drawable/ic_internet" /> - diff --git a/app/src/main/res/xml/search_widget_info.xml b/app/src/main/res/xml/search_widget_info.xml index ddd4549bf..ce7e44a2a 100644 --- a/app/src/main/res/xml/search_widget_info.xml +++ b/app/src/main/res/xml/search_widget_info.xml @@ -12,4 +12,4 @@ android:updatePeriodMillis="3600000" android:initialLayout="@layout/search_widget_large" android:widgetCategory="home_screen"> - \ No newline at end of file + diff --git a/app/src/main/res/xml/shortcuts.xml b/app/src/main/res/xml/shortcuts.xml index 434607e82..e250a8904 100644 --- a/app/src/main/res/xml/shortcuts.xml +++ b/app/src/main/res/xml/shortcuts.xml @@ -26,4 +26,4 @@ android:targetPackage="org.mozilla.fenix" android:targetClass="org.mozilla.fenix.IntentReceiverActivity" /> - \ No newline at end of file + From 4036ae92df394ee1ebe6a5c4f4ae3e3e595aad72 Mon Sep 17 00:00:00 2001 From: Mozilla L10n Automation Bot Date: Fri, 30 Apr 2021 00:03:42 +0000 Subject: [PATCH 055/256] Import l10n. --- app/src/main/res/values-de/strings.xml | 20 +--------- app/src/main/res/values-dsb/strings.xml | 20 +--------- app/src/main/res/values-en-rCA/strings.xml | 20 +--------- app/src/main/res/values-en-rGB/strings.xml | 20 +--------- app/src/main/res/values-hr/strings.xml | 20 +--------- app/src/main/res/values-hsb/strings.xml | 20 +--------- app/src/main/res/values-hu/strings.xml | 20 +--------- app/src/main/res/values-ko/strings.xml | 24 ++---------- app/src/main/res/values-oc/strings.xml | 21 ++-------- app/src/main/res/values-pt-rBR/strings.xml | 20 +--------- app/src/main/res/values-sat/strings.xml | 45 ++++------------------ app/src/main/res/values-sv-rSE/strings.xml | 20 +--------- app/src/main/res/values-uk/strings.xml | 20 +--------- app/src/main/res/values-zh-rCN/strings.xml | 20 +--------- app/src/main/res/values-zh-rTW/strings.xml | 20 +--------- 15 files changed, 39 insertions(+), 291 deletions(-) diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 3b5e018b9..d4a9391a1 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -453,9 +453,6 @@ Weitere Informationen - - Global ausgeschaltet. Öffnen Sie die Einstellungen, um diesen einzuschalten. - Telemetrie @@ -466,6 +463,8 @@ Marketing-Daten Gibt Daten darüber, welche Funktionen Sie in %1$s verwenden, an Leanplum weiter, unseren Anbieter für mobiles Marketing. + + Teilt grundlegende Nutzungsdaten mit Adjust, unserem mobilen Marketing-Anbieter Studien @@ -807,8 +806,6 @@ %1$s gelöscht Ordner hinzufügen - - Lesezeichen erstellt Lesezeichen gespeichert @@ -1782,20 +1779,7 @@ Entfernen - - Machen Sie das Beste aus %s. - Klicken Sie hier für weitere Details - - Sammeln Sie die Dinge, die Ihnen wichtig sind - - Gruppieren Sie ähnliche Suchanfragen, Websites und Tabs, um später schnell darauf zugreifen zu können. - - Sie sind in einem anderen Firefox-Browser auf diesem Handy als %s angemeldet. Möchten Sie sich mit diesem Konto anmelden? - - Sie können diese Website einfach zum Startbildschirm Ihres Handys hinzufügen, um unmittelbaren Zugriff darauf zu haben und sie wie eine App zu nutzen. - diff --git a/app/src/main/res/values-dsb/strings.xml b/app/src/main/res/values-dsb/strings.xml index c0f281d32..80425566b 100644 --- a/app/src/main/res/values-dsb/strings.xml +++ b/app/src/main/res/values-dsb/strings.xml @@ -442,9 +442,6 @@ Dalšne informacije - - Globalnje znjemóžnjony, źiśo do nastajenjow, aby jen zmóžnił. - Telemetrija @@ -455,6 +452,8 @@ Marketingowe daty Źěli daty wó tom, kótare funkcije w %1$s wužywaśo, z Leanplum, našym póbitowarjom za mobilny marketing. + + Źěli zakładne wužywańske daty z Adjust, našym mobilnym marketingowym póbitowarjom Studije @@ -795,8 +794,6 @@ %1$s jo se wulašował Zarědnik pśidaś - - Cytańske znamje jo se napórało. Cytańske znamje jo se składło! @@ -1752,20 +1749,7 @@ Wótwónoźeś - - Wuwónoźćo nejlěpše z %s. - Klikniśo za dalšne drobnostki - - Gromaźćo wěcy, kótarež su wam wažne - - Zrědujśo pódobne pytanja, sedła a rejtariki za póznjejšy malsny pśistup. - - Sćo se pśizjawił ako %s w drugem wobglědowaku Firefox na toś tom telefonje. Cośo se z toś tym kontom pśizjawiś? - - Móžośo startowej wobrazowce swójogo telefona toś to websedło lažko pśidaś, aby direktny pśistup měł a malsnjej z dožywjenim nałoženja pśeglědował. - diff --git a/app/src/main/res/values-en-rCA/strings.xml b/app/src/main/res/values-en-rCA/strings.xml index 4d02910bd..6a60c1ea1 100644 --- a/app/src/main/res/values-en-rCA/strings.xml +++ b/app/src/main/res/values-en-rCA/strings.xml @@ -441,9 +441,6 @@ Learn more - - Turned off globally, go to Settings to turn it on. - Telemetry @@ -454,6 +451,8 @@ Marketing data Shares data about what features you use in %1$s with Leanplum, our mobile marketing vendor. + + Shares basic usage data with Adjust, our mobile marketing vendor Studies @@ -789,8 +788,6 @@ Deleted %1$s Add folder - - Bookmark created. Bookmark saved! @@ -1737,20 +1734,7 @@ Remove - - Get the most out of %s. - Click for more details - - Collect the things that matter to you - - Group together similar searches, sites, and tabs for quick access later. - - You are signed in as %s on another Firefox browser on this phone. Would you like to sign in with this account? - - You can easily add this website to your phone’s Home screen to have instant access and browse faster with an app-like experience. - diff --git a/app/src/main/res/values-en-rGB/strings.xml b/app/src/main/res/values-en-rGB/strings.xml index 57a937472..3c4966757 100644 --- a/app/src/main/res/values-en-rGB/strings.xml +++ b/app/src/main/res/values-en-rGB/strings.xml @@ -441,9 +441,6 @@ Learn more - - Turned off globally, go to Settings to turn it on. - Telemetry @@ -454,6 +451,8 @@ Marketing data Shares data about what features you use in %1$s with Leanplum, our mobile marketing vendor. + + Shares basic usage data with Adjust, our mobile marketing vendor Studies @@ -791,8 +790,6 @@ Deleted %1$s Add folder - - Bookmark created. Bookmark saved! @@ -1740,20 +1737,7 @@ Remove - - Get the most out of %s. - Click for more details - - Collect the things that matter to you - - Group together similar searches, sites, and tabs for quick access later. - - You are signed in as %s on another Firefox browser on this phone. Would you like to sign in with this account? - - You can easily add this web site to your phone’s Home screen to have instant access and browse faster with an app-like experience. - diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml index a37ce9124..af409b823 100644 --- a/app/src/main/res/values-hr/strings.xml +++ b/app/src/main/res/values-hr/strings.xml @@ -443,9 +443,6 @@ Saznaj više - - Isključeno je globalno, za uključivanje, idi na postavke. - Telemetrija @@ -456,6 +453,8 @@ Marketinški podaci Dijeli podatke o funkcijama koje upotrebljavaš u %1$s s Leanplumom, našim pružateljem usluga mobilnog marketinga. + + Dijeli osnovne podatke o korištenju s Adjustom, našim pružateljem mobilnog marketinga Istraživanja @@ -800,8 +799,6 @@ Izbrisano: %1$s Dodaj mapu - - Zabilješka stvorena. Zabilješka spremljena! @@ -1765,20 +1762,7 @@ Ukloni - - Iskoristi sve prednosti aplikacije %s. - Klikni za više informacija - - Skupi stvari koje su ti bitne - - Grupiraj slične pretrage, stranice i kartice za brži pristup kasnije. - - Prijavljen/a si kao %s na jednom drugom Firefox pregledniku na ovom telefonu. Želiš li se prijaviti s ovim računom? - - Možete jednostavno dodati ovu web stranicu na početni zaslon uređaja kako biste imali brz pristup i pretraživali brže, kao da ste u aplikaciji. - diff --git a/app/src/main/res/values-hsb/strings.xml b/app/src/main/res/values-hsb/strings.xml index 9a1eb58e7..bffdf69e6 100644 --- a/app/src/main/res/values-hsb/strings.xml +++ b/app/src/main/res/values-hsb/strings.xml @@ -445,9 +445,6 @@ Dalše informacije - - Globalnje znjemóžnjeny, dźiće do nastajenjow, zo by jón zmóžnił. - Telemetrija @@ -458,6 +455,8 @@ Marketingowe daty Dźěli daty wo tym, kotre funkcije w %1$s wužiwaće, z Leanplum, našim poskićowarjom za mobilny marketing. + + Dźěli zakładne wužiwanske daty z Adjust, našim mobilnym marketingowym poskićowarjom Studije @@ -798,8 +797,6 @@ %1$s je so zhašał Rjadowak přidać - - Zapołožka je so wutworiła. Zapołožka je so składowała! @@ -1754,20 +1751,7 @@ Wotstronić - - Wućehńće najlěpše z %s. - Klikńće za dalše podrobnosće - - Zběrajće wěcy, kotrež su wam wažne - - Zeskupće podobne pytanja, sydła a rajtarki za pozdźiši spěšny přistup. - - Sće so jako %s w druhim wobhladowaku Firefox na tutym telefonje přizjewił. Chceće so z tutym kontom přizjewić? - - Móžeće startowej wobrazowce swojeho telefona tute websydło lochko přidać, zo byšće direktny přistup měł a spěšnišo z dožiwjenjom nałoženja přehladował. - diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml index b5a36e387..0ee316f8a 100644 --- a/app/src/main/res/values-hu/strings.xml +++ b/app/src/main/res/values-hu/strings.xml @@ -445,9 +445,6 @@ További tudnivalók - - Globálisan kikapcsolva, a bekapcsoláshoz ugorjon a Beállításokhoz. - Telemetria @@ -458,6 +455,8 @@ Marketing adatok Megosztja a Leanplummal, a mobil marketing szolgáltatónkkal, hogy mely funkciókat használja a %1$s böngészőben. + + Megosztja az alapvető használati adatokat az Adjusttal, a mobilos marketing szolgáltatónkkal Tanulmányok @@ -799,8 +798,6 @@ %1$s törölve Mappa hozzáadása - - Könyvjelző létrehozva. Könyvjelző mentve. @@ -1763,20 +1760,7 @@ Eltávolítás - - Hozza ki a legtöbbet a %s böngészőből. - Kattintson a további részletekért - - Gyűjtse össze az Önnek fontos dolgokat - - Csoportosítsa a hasonló kereséseket, webhelyeket és lapokat a későbbi gyors elérés érdekében. - - A következőként van bejelentkezve egy másik Firefox böngészőben ezen a telefonon: %s. Szeretne bejelentkezni ezzel a fiókkal? - - Könnyedén hozzáadhatja ezt a weboldalt a telefonja Kezdőképernyőhöz, és azonnal elérheti azt, így gyorsabban böngészve, miközben alkalmazásszerű élményt kap. - diff --git a/app/src/main/res/values-ko/strings.xml b/app/src/main/res/values-ko/strings.xml index a8ebc3942..4283c5653 100644 --- a/app/src/main/res/values-ko/strings.xml +++ b/app/src/main/res/values-ko/strings.xml @@ -458,19 +458,18 @@ 더 알아보기 - - 꺼져 있습니다. 켜려면 설정에서 변경하세요. - 데이터 수집 - 사용량과 기술 데이터 + 사용 현황 및 기술 데이터 - %1$s의 개선을 위해 브라우저의 성능, 사용량, 하드웨어 및 설정 데이터를 Mozilla와 공유 + %1$s의 개선을 위해 브라우저의 성능, 사용 현황, 하드웨어 및 설정 데이터를 Mozilla와 공유 마케팅 데이터 %1$s에서 사용하는 기능에 대한 데이터를 모바일 마케팅 공급업체인 Leanplum과 공유합니다. + + 모바일 마케팅 공급업체인 Adjust와 기본 사용 현황 데이터를 공유 연구 @@ -814,8 +813,6 @@ %1$s 삭제됨 폴더 추가 - - 북마크 생성됨. 북마크가 저장되었습니다! @@ -1803,20 +1800,7 @@ 삭제 - - %s를 최대한 활용해 보세요. - 상세 정보 - - 중요한 것들 수집하기 - - 나중에 빠르게 접근할 수 있도록 유사한 검색, 사이트 및 탭을 모아 보세요. - - 이 휴대폰의 다른 Firefox 브라우저에서 %s(으)로 로그인했습니다. 이 계정으로 로그인하시겠습니까? - - 이 웹 사이트를 휴대폰의 홈 화면에 쉽게 추가하여 앱과 같은 경험을 통해 즉시 액세스하고 더 빠르게 탐색 할 수 있습니다. - diff --git a/app/src/main/res/values-oc/strings.xml b/app/src/main/res/values-oc/strings.xml index f10979d26..e53e29ee8 100644 --- a/app/src/main/res/values-oc/strings.xml +++ b/app/src/main/res/values-oc/strings.xml @@ -446,9 +446,6 @@ Ne saber mai - - Desactivada globalament, anatz als Paramètres per l’activar. - Telemetria @@ -459,6 +456,8 @@ Donadas marketing Parteja de donadas sus las foncionalitats qu’utilizatz amb Leanplum, nòstre provesidor de marketing mobil. + + Parteja de donadas basicas d’utilizacion amb Adjust, nòstre prestatari de marketing mobil Estudis @@ -801,8 +800,6 @@ %1$s suprimit Apondre un dossièr - - Marcapagina creat. Marcapagina apondut ! @@ -1775,19 +1772,7 @@ Suprimir - - Ne fasètz mai amb %s. - Clicatz per aver de detalhs - - Amassatz çò que compta per vos - - Agropatz de recèrcas, de sites e d’onglets similaris per i accedir rapidament mai tard. - - Sètz connectat coma %s sus un autre navegador Firefox sus aqueste telefòn. Volètz vos connectar amb aqueste compte ? - - Podètz facilament apondre aqueste site a vòstre ecran d’acuèlh de telefòn per i accedir e navigar mai rapidament coma se foguèssetz dins l’aplicacion. - + diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 0c8d440c4..0a7ecb088 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -444,9 +444,6 @@ Saiba mais - - Desativada globalmente, vá em Configurações para ativar. - Telemetria @@ -457,6 +454,8 @@ Dados de marketing Compartilhar dados sobre que recursos você usa no %1$s com o Leanplum, nosso fornecedor de marketing para celular. + + Compartilha dados básicos de uso com a Adjust, nossa fornecedora de marketing em dispositivos móveis Estudos @@ -794,8 +793,6 @@ %1$s excluída Adicionar pasta - - Favorito criado. Favorito salvo! @@ -1754,20 +1751,7 @@ Remover - - Aproveite ao máximo o %s. - Clique para ver mais detalhes - - Reúna o que é importante para você - - Agrupe pesquisas, sites e abas semelhantes para acesso rápido mais tarde. - - Você está conectado como %s em outro navegador Firefox neste celular. Quer entrar com esta conta? - - Você pode facilmente adicionar este site à tela inicial do celular para ter acesso imediato e navegar mais rápido com uma experiência semelhante a um aplicativo. - diff --git a/app/src/main/res/values-sat/strings.xml b/app/src/main/res/values-sat/strings.xml index 7aef50afb..f8772e630 100644 --- a/app/src/main/res/values-sat/strings.xml +++ b/app/src/main/res/values-sat/strings.xml @@ -17,10 +17,6 @@ ᱟᱢᱟᱜ ᱠᱷᱩᱞᱟᱹ ᱟᱠᱟᱱ ᱴᱮᱵ ᱠᱚ ᱫᱚ ᱱᱚᱰᱮ ᱫᱮᱠᱷᱟᱣᱜᱼᱟ ᱾ ᱟᱢᱟᱜ ᱱᱤᱡᱚᱨᱟᱜ ᱴᱮᱵᱽ ᱠᱚ ᱫᱚ ᱱᱚᱰᱮ ᱩᱫᱩᱜ ᱦᱩᱭᱩᱜ-ᱟ ᱾ - - ᱵᱟᱭᱰᱩ - - JD 1 ᱴᱮᱵᱽ ᱠᱷᱩᱞᱟᱹᱭ ᱢᱮ ᱾ ᱴᱮᱵᱽ ᱵᱚᱫᱚᱞ ᱞᱟᱹᱜᱤᱫ ᱴᱤᱯᱟᱹᱣ ᱢᱮ ᱾ @@ -176,6 +172,11 @@ ᱧᱮᱞ ᱵᱤᱰᱟᱹᱣ + + ᱥᱮᱞᱮᱫᱽ + + ᱥᱟᱯᱲᱟᱣ + ᱵᱟᱝ ᱡᱩᱲᱟᱹᱣ ᱫᱟᱲᱮᱭᱟᱜ ᱠᱟᱱᱟ ᱾ URL ᱥᱠᱤᱢ ᱵᱟᱝ ᱪᱤᱱᱦᱟᱹᱣ ᱫᱟᱲᱮᱞᱟᱱᱟ ᱾ @@ -871,15 +872,15 @@ ᱪᱟᱹᱞᱩ ᱵᱚᱸᱫᱚ - + ᱟᱰᱤᱭᱳ ᱟᱨ ᱣᱤᱰᱤᱭᱳ ᱦᱮᱥᱟᱨᱤᱭᱟᱹ ᱢᱮ ᱥᱮᱞᱩᱞᱟᱹᱨ ᱰᱟᱴᱟ ᱨᱮᱜᱤ ᱟᱰᱤᱭᱳ ᱟᱨ ᱣᱤᱰᱤᱭᱳ ᱟᱴᱠᱟᱣ ᱢᱮ ᱟᱰᱤᱭᱳ ᱟᱨ ᱣᱤᱰᱤᱭᱳ Wi-Fi ᱨᱮ ᱮᱱᱮᱡᱚᱣᱟ - + ᱟᱰᱤᱭᱳ ᱜᱤ ᱟᱴᱠᱟᱣ ᱢᱮ - + ᱟᱰᱤᱭᱳ ᱟᱨ ᱣᱤᱰᱤᱭᱳ ᱟᱴᱠᱟᱣ ᱢᱮ ᱪᱚᱞᱩ @@ -1140,9 +1141,6 @@ %s ᱨᱮ ᱥᱟᱹᱜᱩᱱ ᱫᱟᱨᱟᱢ! ᱞᱟᱦᱟ ᱠᱷᱚᱱ ᱠᱷᱟᱛᱟ ᱢᱮᱱᱟᱜ ᱛᱟᱢᱟ? - - %s ᱵᱟᱵᱚᱛ ᱵᱟᱲᱟᱭ ᱢᱮ ᱧᱮᱞ ᱢᱮ ᱪᱮᱫ ᱱᱟᱶᱟ ᱢᱮᱱᱟᱜ-ᱟ ᱱᱚᱰᱮ ᱛᱮᱞᱟ ᱠᱚ ᱧᱟᱢ ᱟᱢ - - ᱵᱩᱠᱢᱟᱨᱠ, ᱫᱟᱱᱟᱝ ᱥᱟᱵᱟᱫ ᱟᱨ ᱵᱟᱹᱲᱛᱤ ᱠᱚ ᱞᱟᱹᱜᱤᱛ ᱟᱢᱟᱜ Firefox ᱠᱷᱟᱛᱟ ᱨᱮ ᱥᱭᱸᱠ ᱮᱦᱚᱵᱽ ᱢᱮ ᱾ - - ᱰᱷᱮᱨ ᱥᱮᱬᱟᱭ ᱢᱮ @@ -1162,35 +1156,18 @@ ᱦᱮᱸ, ᱵᱚᱞᱚ ᱪᱷᱚᱭᱤᱧ ᱢᱮ ᱵᱚᱞᱚᱱᱟ ᱠᱟᱹᱱᱟᱹᱧ… - - Firefox ᱨᱮ ᱵᱚᱞᱚᱱ ᱥᱩᱦᱤ ᱢᱮ ᱵᱟᱦᱨᱮ ᱨᱮᱜᱮ ᱛᱟᱦᱮᱸ ᱠᱚᱜ ᱢᱮ ᱥᱭᱸᱠ ᱪᱟᱹᱞᱩ ᱢᱮᱱᱟᱜ-ᱟ ᱵᱚᱞᱚᱱ ᱥᱩᱦᱤ ᱰᱤᱜᱟᱹᱣᱮᱱᱟ - - ᱟᱡ ᱛᱮᱭᱟᱜ ᱱᱤᱥᱚᱱ - - ᱯᱨᱭᱣᱮᱥᱭ ᱟᱨ ᱨᱩᱠᱷᱤᱭᱟᱹ ᱥᱟᱡᱟᱣ ᱯᱟᱧᱡᱟ ᱫᱟᱱᱟᱲ, ᱢᱟᱞᱣᱮᱨ ᱟᱨ ᱠᱚᱢᱯᱟᱭ ᱠᱚ ᱮᱢᱟᱱ ᱵᱞᱚᱠ ᱠᱚᱣᱟ ᱠᱚ ᱚᱠᱚᱭ ᱫᱚ ᱟᱢ ᱯᱟᱧᱡᱟ ᱠᱟᱫ ᱢᱮᱭᱟ ᱾ ᱵᱮᱥᱟᱜ (ᱢᱩᱞ ᱯᱷᱮᱲᱟᱛ) - - ᱯᱟᱧᱡᱟ ᱫᱟᱱᱟᱲ ᱠᱚ ᱵᱞᱚᱠ ᱠᱚᱣᱟᱭ ᱾ ᱥᱟᱦᱴᱟ ᱫᱚ ᱢᱟᱲᱟᱝ ᱞᱮᱠᱷᱟ ᱜᱮ ᱞᱟᱫᱮᱜᱼᱟ ᱾ ᱱᱤᱦᱟᱹᱛ (ᱵᱟᱛᱟᱣᱮᱢᱠᱟᱱᱟ) ᱱᱤᱦᱟᱹᱛ - - ᱡᱟᱹᱥᱛᱤ ᱯᱟᱧᱡᱟ ᱫᱟᱱᱟᱲ, ᱰᱷᱟᱣᱨᱟ ᱟᱨ ᱴᱟᱴᱠᱟ ᱚᱰᱚᱠ ᱠᱚ ᱟᱴᱠᱟᱣ ᱟᱭ , ᱥᱟᱠᱟᱢ ᱞᱚᱜᱚᱱ ᱞᱚᱰᱚᱜᱼᱟ ᱦᱮᱞᱮ ᱠᱤᱪᱷᱤ ᱡᱤᱱᱤᱥ ᱴᱷᱤᱠ ᱥᱮ ᱵᱟᱭ ᱠᱟᱹᱢᱤᱟᱭ ᱾ - - ᱡᱟᱭᱜᱟ ᱦᱟᱛᱟᱣ ᱢᱮ - - ᱞᱟᱛᱟᱨ ᱴᱩᱞᱵᱟᱨ ᱥᱟᱞᱟᱜ ᱢᱤᱫ ᱛᱤ ᱵᱨᱟᱣᱡᱤᱝ ᱥᱟᱞᱟᱜ ᱪᱮᱛᱟᱱ ᱥᱮᱱ ᱨᱟᱠᱟᱵ ᱨᱮᱭᱟᱜ ᱪᱮᱥᱴᱟᱭ ᱢᱮ ᱾ ᱱᱤᱡᱮᱨᱟᱜ ᱨᱮ ᱵᱨᱟᱩᱡ ᱢᱮ ᱩᱭᱦᱟᱹᱨ ᱵᱟᱪᱷᱟᱣ ᱛᱟᱢ - - ᱛᱤᱱᱟᱹᱜ ᱜᱟᱱ ᱵᱮᱴᱨᱭ ᱵᱚᱪᱚᱛ ᱢᱮ ᱟᱨ ᱟᱢᱟᱜ ᱢᱮᱫ ᱵᱟᱸᱪᱟᱣ ᱛᱟᱢ ᱧᱩᱛ ᱩᱭᱦᱟᱹᱨ ᱪᱟᱹᱞᱩ ᱠᱟᱛᱮ ᱾ ᱟᱪᱛᱮ @@ -1269,14 +1244,10 @@ ᱰᱷᱮᱨ ᱥᱮᱬᱟᱭ ᱢᱮ ᱱᱟᱯ (ᱢᱩᱞ ᱯᱷᱮᱲᱟᱛ) - - ᱠᱚᱢ ᱯᱟᱧᱡᱟ ᱫᱟᱱᱟᱲ ᱠᱚ ᱵᱚᱸᱫᱚᱭᱮᱟ ᱾ ᱥᱟᱦᱴᱟ ᱢᱟᱲᱟᱝ ᱞᱮᱠᱷᱟ ᱞᱟᱫᱮᱜᱼᱟ ᱾ ᱢᱩᱞ ᱜᱷᱮᱨ ᱮᱥᱮᱫ ᱨᱚᱠᱷᱭᱟ ᱫᱚ ᱪᱮᱫ ᱮ ᱵᱞᱚᱠ ᱪᱷᱚ ᱠᱮᱜᱼᱟᱭ ᱱᱤᱦᱟᱹᱛ - - ᱡᱟᱹᱥᱛᱤ ᱯᱟᱧᱡᱟ ᱫᱟᱱᱟᱲ, ᱰᱷᱟᱣᱨᱟ ᱟᱨ ᱴᱟᱴᱠᱟ ᱚᱰᱚᱠ ᱠᱚ ᱟᱴᱠᱟᱣ ᱟᱭ , ᱥᱟᱠᱟᱢ ᱞᱚᱜᱚᱱ ᱞᱚᱰᱚᱜᱼᱟ ᱦᱮᱞᱮ ᱠᱤᱪᱷᱤ ᱡᱤᱱᱤᱥ ᱴᱷᱤᱠ ᱥᱮ ᱵᱟᱭ ᱠᱟᱹᱢᱤᱟᱭ ᱾ ᱴᱷᱤᱴ ᱜᱷᱮᱨ ᱮᱥᱮᱫ ᱨᱩᱠᱷᱭᱟ ᱫᱚ ᱪᱮᱫ ᱵᱞᱚᱠ ᱠᱮᱜᱼᱟᱭ diff --git a/app/src/main/res/values-sv-rSE/strings.xml b/app/src/main/res/values-sv-rSE/strings.xml index 7fe7e6d41..48585ca78 100644 --- a/app/src/main/res/values-sv-rSE/strings.xml +++ b/app/src/main/res/values-sv-rSE/strings.xml @@ -451,9 +451,6 @@ Läs mer - - Stängt av globalt, gå till Inställningar för att slå på den. - Telemetri @@ -465,6 +462,8 @@ Marknadsföringsdata Delar data om vilka funktioner du använder i %1$s med Leanplum, vår mobila marknadsföringsleverantör. + + Delar grundläggande användningsdata med Adjust, vår leverantör av mobil marknadsföring Undersökningar @@ -806,8 +805,6 @@ Tog bort %1$s Lägg till mapp - - Bokmärke skapat. Bokmärke sparat! @@ -1768,20 +1765,7 @@ Ta bort - - Få ut det mesta av %s. - Klicka för mer information - - Samla de saker som är viktiga för dig - - Gruppera liknande sökningar, webbplatser och flikar för snabb åtkomst senare. - - Du är inloggad som %s på en annan Firefox-webbläsare på den här telefonen. Vill du logga in med det här kontot? - - Du kan enkelt lägga till den här webbplatsen på telefonens startsida för att få direktåtkomst och surfa snabbare med en appliknande upplevelse. - diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index 724cbd47d..a79e8b5be 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -451,9 +451,6 @@ Докладніше - - Вимкнено глобально. Перейдіть у Налаштування, щоб увімкнути. - Телеметрія @@ -464,6 +461,8 @@ Маркетингові дані Надсилання даних про функції, які ви використовуєте в %1$s, нашій компанії з мобільного маркетингу Leanplum. + + Надсилати основні дані про користування до Adjust, нашого постачальника мобільного маркетингу Дослідження @@ -803,8 +802,6 @@ %1$s видалено Додати теку - - Закладку створено. Закладку збережено! @@ -1766,20 +1763,7 @@ Вилучити - - Отримайте якнайбільше від %s. - Показати подробиці - - Зберігайте важливе для вас - - Групуйте подібні пошуки, сайти та вкладки для швидкого доступу. - - Ви увійшли як %s в іншому браузері Firefox на цьому пристрої. Бажаєте увійти в цей обліковий запис? - - Ви можете легко додати цей вебсайт на головний екран вашого телефону, щоб мати миттєвий доступ до нього і працювати швидше, неначе зі звичайною програмою. - diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index e10e3ae89..d343ca957 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -458,9 +458,6 @@ 详细了解 - - 已全局关闭,请前往“设置”开启。 - 遥测技术 @@ -471,6 +468,8 @@ 营销数据 与我们的移动营销供应商 Leanplum 分享您使用 %1$s 的哪些功能。 + + 与我们的移动营销服务商 Adjust 分享基本使用数据 研究 @@ -814,8 +813,6 @@ 已删除 %1$s 新建文件夹 - - 书签已创建。 书签已保存! @@ -1791,20 +1788,7 @@ 移除 - - 全面体验 %s。 - 点击了解更多信息 - - 有用的东西收藏在这 - - 将相似的搜索查询、网站和标签页归入一组,方便以后快速访问。 - - 您已在此手机上的其他 Firefox 浏览器上以 %s 身份登录。也要使用此账号登录吗? - - 您可以轻松将此网站添加到手机主屏幕,以便迅捷访问并以类似应用的体验畅享浏览。 - diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index c611cabe5..295c359ba 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -452,9 +452,6 @@ 了解更多 - - 已全域關閉。請到「設定」頁面開啟。 - Telemetry @@ -465,6 +462,8 @@ 行銷資料 與我們的行動行銷服務供應商 Leanplum 分享您在 %1$s 使用了哪些功能。 + + 與我們的行動行銷服務廠商 Adjust 分享基本使用資料 使用者研究 @@ -806,8 +805,6 @@ 已刪除 %1$s 新增資料夾 - - 已建立書籤。 已加入書籤! @@ -1779,20 +1776,7 @@ 移除 - - 發揮 %s 的最大威力。 - 點這裡取得詳細資訊 - - 收集對您而言重要的東西 - - 將類似的搜尋、網站、分頁放在一起,方便之後快速使用。 - - 您已經在這支手機的其他 Firefox 瀏覽器以 %s 登入。也要使用此帳號登入嗎? - - 您可將此網站加到手機主畫面,方便快速開啟,或是以類似 App 的方式使用。 - From ea47db4a9ee50f9dbc789e2bc16da94f200a1367 Mon Sep 17 00:00:00 2001 From: Sebastian Kaspari Date: Thu, 29 Apr 2021 19:36:58 +0200 Subject: [PATCH 056/256] Unit tests: Bump max heap size to 3072m. --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 5234c6ad1..2bac2cb33 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -205,7 +205,7 @@ android { // instead. :) maxParallelForks = 2 forkEvery = 80 - maxHeapSize = "2048m" + maxHeapSize = "3072m" minHeapSize = "1024m" } } From 49025e46691df348c6d2f9ad23e2029f006355ef Mon Sep 17 00:00:00 2001 From: MickeyMoz Date: Fri, 30 Apr 2021 15:35:45 +0000 Subject: [PATCH 057/256] Update Android Components version to 90.0.20210430143137. --- buildSrc/src/main/java/AndroidComponents.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/java/AndroidComponents.kt b/buildSrc/src/main/java/AndroidComponents.kt index f7eda3538..2c122a886 100644 --- a/buildSrc/src/main/java/AndroidComponents.kt +++ b/buildSrc/src/main/java/AndroidComponents.kt @@ -3,5 +3,5 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ object AndroidComponents { - const val VERSION = "90.0.20210429143130" + const val VERSION = "90.0.20210430143137" } From 879f1b9e9710afc9519262bcc14605f4f8dcd8dd Mon Sep 17 00:00:00 2001 From: Gregory Mierzwinski Date: Fri, 30 Apr 2021 14:22:44 -0400 Subject: [PATCH 058/256] Bug 1708631 - Update visual metrics script to the latest. (#19332) --- .../visual-metrics/run-visual-metrics.py | 31 ++++++++++++------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/taskcluster/docker/visual-metrics/run-visual-metrics.py b/taskcluster/docker/visual-metrics/run-visual-metrics.py index 698d66237..2593a0877 100755 --- a/taskcluster/docker/visual-metrics/run-visual-metrics.py +++ b/taskcluster/docker/visual-metrics/run-visual-metrics.py @@ -46,6 +46,9 @@ class Job: #: The extra options for this job. extra_options = attr.ib(type=str) + #: If true, we allow 0's in the vismet results + accept_zero_vismet = attr.ib(type=bool) + #: json_path: The path to the ``browsertime.json`` file on disk. json_path = attr.ib(type=Path) @@ -61,6 +64,7 @@ JOB_SCHEMA = Schema( Required("test_name"): str, Required("browsertime_json_path"): str, Required("extra_options"): [str], + Required("accept_zero_vismet"): bool, } ], Required("application"): {Required("name"): str, "version": str}, @@ -185,7 +189,7 @@ def append_result(log, suites, test_name, name, result, extra_options): "replicates": [result], "lowerIsBetter": True, "unit": "ms", - "shouldAlert": SHOULD_ALERT[name], + "shouldAlert": SHOULD_ALERT.get(name, False), } else: subtests[name]["replicates"].append(result) @@ -322,6 +326,7 @@ def main(log, args): extra_options=len(job["extra_options"]) > 0 and job["extra_options"] or jobs_json["extra_options"], + accept_zero_vismet=job["accept_zero_vismet"], json_path=browsertime_json_path, video_path=browsertime_json_path.parent / video, count=count, @@ -420,18 +425,20 @@ def run_visual_metrics(job, visualmetrics_path, options): # Python 3.5 requires a str object (not 3.6+) res = json.loads(res.decode("utf8")) - # Ensure that none of these values are at 0 which - # is indicative of a failling test - monitored_tests = [ - "contentfulspeedindex", - "lastvisualchange", - "perceptualspeedindex", - "speedindex", - ] failed_tests = [] - for metric, val in res.items(): - if metric.lower() in monitored_tests and val == 0: - failed_tests.append(metric) + if not job.accept_zero_vismet: + # Ensure that none of these values are at 0 which + # is indicative of a failling test + monitored_tests = [ + "contentfulspeedindex", + "lastvisualchange", + "perceptualspeedindex", + "speedindex", + ] + for metric, val in res.items(): + if metric.lower() in monitored_tests and val == 0: + failed_tests.append(metric) + if failed_tests: log.error( "TEST-UNEXPECTED-FAIL | Some visual metrics have an erroneous value of 0." From 622f7ab4a8ef34a4c5897eabae0c8b00ee0cdae1 Mon Sep 17 00:00:00 2001 From: Mozilla L10n Automation Bot Date: Sat, 1 May 2021 00:03:39 +0000 Subject: [PATCH 059/256] Import l10n. --- app/src/main/res/values-cy/strings.xml | 20 ++------------------ app/src/main/res/values-el/strings.xml | 20 ++------------------ app/src/main/res/values-es-rAR/strings.xml | 20 ++------------------ app/src/main/res/values-eu/strings.xml | 20 ++------------------ app/src/main/res/values-fi/strings.xml | 20 ++------------------ app/src/main/res/values-fr/strings.xml | 20 ++------------------ app/src/main/res/values-fy-rNL/strings.xml | 20 ++------------------ app/src/main/res/values-nl/strings.xml | 20 ++------------------ app/src/main/res/values-pt-rPT/strings.xml | 20 ++------------------ app/src/main/res/values-rm/strings.xml | 20 ++------------------ app/src/main/res/values-ru/strings.xml | 20 ++------------------ app/src/main/res/values-tg/strings.xml | 21 +++------------------ app/src/main/res/values-vi/strings.xml | 20 ++------------------ 13 files changed, 27 insertions(+), 234 deletions(-) diff --git a/app/src/main/res/values-cy/strings.xml b/app/src/main/res/values-cy/strings.xml index 616a81865..b115ce804 100644 --- a/app/src/main/res/values-cy/strings.xml +++ b/app/src/main/res/values-cy/strings.xml @@ -444,9 +444,6 @@ Dysgu rhagor - - Wedi’i ddiffodd yn eang, ewch i Gosodiadau i’w droi ymlaen. - Telemetreg @@ -457,6 +454,8 @@ Data marchnata Yn rhannu data am ba nodweddion rydych chi’n eu defnyddio yn %1$s gyda Leanplum, ein gwerthwr marchnata symudol. + + Yn rhannu data defnydd sylfaenol gydag Adjust, ein gwerthwr marchnata symudol Astudiaethau @@ -795,8 +794,6 @@ Wedi dileu %1$s Ychwanegu ffolder - - Nod tudalen wedi’i greu. Nod tudalen wedi’i gadw! @@ -1750,20 +1747,7 @@ Fodd bynnag, gall fod yn llai sefydlog. Llwythwch ein porwr Beta i gael profiad Tynnu - - Cael y gorau o %s. - Cliciwch am ragor o fanylion - - Casglwch y pethau sy’n bwysig i chi - - Grwpiwch chwiliadau, gwefannau a thabiau tebyg ar gyfer mynediad cyflym yn y dyfodol. - - Rydych wedi eich mewngofnodi fel %s ar borwr Firefox arall ar y ffôn hwn. Hoffech chi fewngofnodi gyda’r cyfrif hwn? - - Gallwch ychwanegu’r wefan hon yn hawdd i sgrin Cartref eich ffôn. Byddwch yn cael mynediad ar unwaith a phori’n gyflymach gyda phrofiad tebyg i ap. - diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index 0483e792d..507a0971c 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -450,9 +450,6 @@ Μάθετε περισσότερα - - Γενικά ανενεργή, μεταβείτε στις Ρυθμίσεις για ενεργοποίηση. - Τηλεμετρία @@ -464,6 +461,8 @@ Δεδομένα μάρκετινγκ Αποστέλλει δεδομένα σχετικά με τις λειτουργίες που χρησιμοποιείτε στο %1$s με το Leanplum, την εταιρεία μάρκετινγκ για κινητές συσκευές. + + Κοινή χρήση βασικών δεδομένων χρήσης με το Adjust, την υπηρεσία μας για μάρκετινγκ κινητών Μελέτες @@ -806,8 +805,6 @@ Ο φάκελος "%1$s" διαγράφηκε Προσθήκη φακέλου - - Ο σελιδοδείκτης δημιουργήθηκε. Ο σελιδοδείκτης αποθηκεύτηκε! @@ -1773,20 +1770,7 @@ Αφαίρεση - - Αξιοποιήστε στο έπακρο το %s. - Πατήστε για περισσότερες λεπτομέρειες - - Συλλέξτε όλα όσα έχουν σημασία για εσάς - - Ομαδοποιήστε παρόμοιες αναζητήσεις, σελίδες και καρτέλες για γρήγορη πρόσβαση αργότερα. - - Έχετε συνδεθεί ως %s σε άλλο πρόγραμμα περιήγησης Firefox σε αυτό το τηλέφωνο. Θέλετε να συνδεθείτε με αυτό τον λογαριασμό; - - Μπορείτε εύκολα να προσθέσετε αυτή την ιστοσελίδα στην αρχική οθόνη για άμεση πρόσβαση και ταχύτερη περιήγηση, σαν να ήταν εφαρμογή. - diff --git a/app/src/main/res/values-es-rAR/strings.xml b/app/src/main/res/values-es-rAR/strings.xml index 9729b1e65..d228847da 100644 --- a/app/src/main/res/values-es-rAR/strings.xml +++ b/app/src/main/res/values-es-rAR/strings.xml @@ -452,9 +452,6 @@ Conocer más - - Deshabilitado globalmente, ir a Ajustes para habilitarlo. - Telemetría @@ -465,6 +462,8 @@ Datos de marketing Comparte datos acerca de las funciones que usás en %1$s con Leanplum, nuestro proveedor de marketing para móviles. + + Comparte datos de uso básicos con Adjust, nuestro proveedor de marketing móvil Estudios @@ -811,8 +810,6 @@ Se eliminó %1$s Agregar carpeta - - Marcador creado. ¡Marcador guardado! @@ -1772,20 +1769,7 @@ Eliminar - - Aprovechá %s al máximo. - Hacer clic aquí para más detalles - - Recolectá lo que te importa - - Agrupar búsquedas, sitios y pestañas similares para acceder rápidamente más tarde. - - Iniciaste sesión como %s en otro navegador Firefox en este teléfono. ¿Querés iniciar sesión con esta cuenta? - - Podés agregar fácilmente este sitio web a la pantalla de inicio de tu teléfono para tener acceso instantáneo y navegar más rápido con una experiencia similar a la de una aplicación. - diff --git a/app/src/main/res/values-eu/strings.xml b/app/src/main/res/values-eu/strings.xml index ade8f35de..08c8d2e64 100644 --- a/app/src/main/res/values-eu/strings.xml +++ b/app/src/main/res/values-eu/strings.xml @@ -452,9 +452,6 @@ Argibide gehiago - - Modu globalean desgaituta; gaitzeko, joan ezarpenetara. - Telemetry @@ -465,6 +462,8 @@ Marketing datuak %1$s(r)en erabiltzen dituzun eginbideei buruzko datuak partekatzen ditu Leanplum-ekin, mugikorrerako gure marketing hornitzailearekin. + + Oinarrizko erabilpen-datuak partekatzen ditu Adjust-ekin, mugikorretarako gure marketing hornitzailearekin Esperimentuak @@ -806,8 +805,6 @@ %1$s ezabatuta Gehitu karpeta - - Laster-marka sortuta. Laster-marka gordeta! @@ -1765,20 +1762,7 @@ Kendu - - Atera %s(r)i ahalik eta zuku gehiena. - Egin klik xehetasun gehiagorako - - Bildu zuretzat garrantzizkoa dena - - Multzokatu antzerako bilaketak, guneak eta fitxak sarbide azkarrago baterako. - - %s bezala saioa hasita duzu telefono honetako beste Firefox nabigatzaile batean. Kontu honekin saioa hasi nahi duzu? - - Modu errazean gehi dezakezu webgune hau zure telefonoaren hasierako pantailan berehalako sarbidea izan eta aplikazio-moduko esperientziarekin azkarrago nabigatzeko. - diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml index 7d21e31b1..768032289 100644 --- a/app/src/main/res/values-fi/strings.xml +++ b/app/src/main/res/values-fi/strings.xml @@ -451,9 +451,6 @@ Lue lisää - - Poistettu käytöstä yleisesti. Voit ottaa sen käyttöön asetuksista. - Telemetria @@ -464,6 +461,8 @@ Markkinointitiedot Jakaa tietoa %1$sissa käyttämistäsi ominaisuuksista mobiilimarkkinointia meille toteuttavan Leanplumin kanssa. + + Jakaa perustiedot käytöstä mobiilimarkkinointitoimittajamme Adjustin kanssa Tutkimukset @@ -805,8 +804,6 @@ %1$s poistettu Lisää kansio - - Kirjanmerkki luotu. Kirjanmerkki tallennettu! @@ -1767,20 +1764,7 @@ Poista - - Ota kaikki irti %sista. - Napsauta saadaksesi lisätietoja - - Kerää yhteen sinulle tärkeät asiat - - Kokoa yhteen samanlaiset haut, sivustot ja välilehdet nopeaa käyttöä varten. - - Olet kirjautunut tilillä %s toiseen Firefox-selaimeen tällä puhelimessa. Haluatko kirjautua sisään tällä tilillä? - - Voit lisätä tämän sivuston puhelimesi aloitusnäytölle, jolloin sivuston käyttö onnistuu nopeasti ja tarjoaa sovelluksen kaltaisen kokemuksen. - diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 930692cb6..cfea6e133 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -451,9 +451,6 @@ En savoir plus - - Désactivée globalement, allez dans les paramètres pour l’activer. - Télémétrie @@ -464,6 +461,8 @@ Données marketing Partage des données sur les fonctionnalités que vous utilisez dans %1$s avec Leanplum, notre fournisseur de marketing mobile. + + Partage des données d’utilisation de base avec Adjust, notre fournisseur de marketing mobile Études @@ -806,8 +805,6 @@ %1$s supprimé Ajouter un dossier - - Marque-page ajouté. Marque-page ajouté @@ -1783,20 +1780,7 @@ Cependant, il peut être moins stable. Téléchargez la version bêta de notre n Supprimer - - Tirez le meilleur parti de %s. - Cliquez pour plus de précisions - - Rassemblez ce qui compte pour vous - - Regroupez des recherches, des sites et des onglets similaires pour y accéder rapidement plus tard. - - Vous êtes connecté·e en tant que %s sur un autre navigateur Firefox avec ce téléphone. Voulez-vous vous connecter avec ce compte ? - - Vous pouvez facilement ajouter ce site à l’écran d’accueil de votre téléphone pour y avoir accès directement et naviguer plus rapidement, comme si vous utilisiez une application. - diff --git a/app/src/main/res/values-fy-rNL/strings.xml b/app/src/main/res/values-fy-rNL/strings.xml index ecdb6c688..cca2d1b30 100644 --- a/app/src/main/res/values-fy-rNL/strings.xml +++ b/app/src/main/res/values-fy-rNL/strings.xml @@ -446,9 +446,6 @@ Mear ynfo - - Globaal útskeakele, gean nei Ynstellingen om it yn te skeakeljen. - Telemetry @@ -459,6 +456,8 @@ Marketinggegevens Dielt gegevens oer hokker funksjes jo yn %1$s brûke mei Leanplum, ús leveransier fan mobile marketing. + + Dielt basale gebrûksgegevens mei Adjust, ús leveransier fan mobile marketing Undersiken @@ -795,8 +794,6 @@ %1$s fuortsmiten Map tafoegje - - Blêdwizer oanmakke. Blêdwizer bewarre! @@ -1752,20 +1749,7 @@ Fuortsmite - - Helje it measte út %s. - Klik foar mear details - - Sammelje de dingen dy\'t wichtich foar jo binne - - Groepearje fergelykbere sykopdrachten, websites en ljepblêden foar flugge tagong letter. - - Jo binne op in oare Firefox-browser op dizze telefoan oanmeld as %s . Wolle jo oanmelde mei dizze account? - - Jo kinne dizze website ienfâldichwei oan it startskerm fan jo telefoan tafoegje foar daliks tagong en flugger surfe mei in app-eftige ûnderfining. - diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 16444bcfc..2f9177463 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -450,9 +450,6 @@ Meer info - - Globaal uitgeschakeld, ga naar Instellingen om in te schakelen. - Telemetry @@ -463,6 +460,8 @@ Marketinggegevens Deelt gegevens over welke functies u in %1$s gebruikt met Leanplum, onze leverancier van mobiele marketing. + + Deelt basale gebruiksgegevens met Adjust, onze leverancier van mobiele marketing Onderzoeken @@ -803,8 +802,6 @@ %1$s verwijderd Map toevoegen - - Bladwijzer gemaakt. Bladwijzer opgeslagen! @@ -1760,20 +1757,7 @@ Verwijderen - - Haal het meeste uit %s. - Klik voor meer details - - Verzamel de dingen die belangrijk voor u zijn - - Groepeer vergelijkbare zoekopdrachten, websites en tabbladen voor snelle toegang later. - - U bent op een andere Firefox-browser op deze telefoon aangemeld als %s. Wilt u zich aanmelden met deze account? - - U kunt deze website eenvoudig aan het startscherm van uw telefoon toevoegen voor directe toegang en sneller surfen met een app-achtige ervaring. - diff --git a/app/src/main/res/values-pt-rPT/strings.xml b/app/src/main/res/values-pt-rPT/strings.xml index c6d9bc69a..30c521ed1 100644 --- a/app/src/main/res/values-pt-rPT/strings.xml +++ b/app/src/main/res/values-pt-rPT/strings.xml @@ -443,9 +443,6 @@ Saber mais - - Desligado globalmente, aceda às Configurações para a ativar. - Telemetria @@ -457,6 +454,8 @@ Partilha dados sobre as funcionalidades que utiliza no %1$s com o Leanplum, o nosso parceiro de marketing para dispositivos móveis. + + Partilha informação básica de utilização com a Adjust, o nosso fornecedor de marketing para dispositivos móveis Estudos @@ -798,8 +797,6 @@ Eliminada %1$s Adicionar pasta - - Marcador criado. Marcador guardado! @@ -1758,20 +1755,7 @@ Remover - - Tire o máximo proveito do %s. - Clique para mais detalhes - - Colecione as coisas que são importantes para si - - Agrupe pesquisas, sites e separadores semelhantes para um acesso rápido mais tarde. - - Está autenticado como %s noutro navegador Firefox neste telefone. Deseja iniciar sessão com esta conta? - - Pode adicionar facilmente este site ao seu ecrã inicial do seu telemóvel para ter acesso instantâneo e navegar mais rápido, com uma experiência semelhante ao de uma aplicação. - diff --git a/app/src/main/res/values-rm/strings.xml b/app/src/main/res/values-rm/strings.xml index 72ad334bd..6ea17ce4a 100644 --- a/app/src/main/res/values-rm/strings.xml +++ b/app/src/main/res/values-rm/strings.xml @@ -440,9 +440,6 @@ Ulteriuras infurmaziuns - - Deactivà globalmain, acceda als parameters per activar. - Telemetria @@ -453,6 +450,8 @@ Datas da marketing Transmetta datas davart las funcziunalitads che ti dovras en %1$s a Leanplum, noss partenari per il marketing sin apparats mobils. + + Cundivida datas d\'utilisaziun da basa cun Adjust, noss purschider da marketing mobil Studis @@ -789,8 +788,6 @@ Stizzà %1$s Agiuntar in ordinatur - - Creà il segnapagina. Memorisà il segnapagina! @@ -1755,20 +1752,7 @@ Allontanar - - Rabla ora il maximum da %s. - Cliccar per ulteriurs detagls - - Rimna las chaussas che t\'èn impurtantas - - Gruppescha retschertgas, paginas e tabs sumegliants per pli tard pudair acceder pli svelt. - - Ti es annunzià sco %s en in auter navigatur da Firefox sin quest telefonin. Vuls ti t\'annunziar cun quest conto? - - Ti pos agiuntar a moda simpla questa website al visur da partenza da tes telefonin per avair access direct e navigar pli svelt, sco sch\'i fiss ina app. - diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 2046def9e..5e9d4d404 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -456,9 +456,6 @@ Узнать больше - - Выключено глобально. Можно включить в настройках. - Телеметрия @@ -469,6 +466,8 @@ Маркетинговые данные Делиться данными о том, что вы используете в %1$s, с Leanplum, нашим мобильным маркетинговым вендором. + + Делиться базовыми данными об использовании с Adjust, нашим мобильным маркетинговым вендором Исследования @@ -810,8 +809,6 @@ %1$s удалена Создать папку - - Закладка создана. Закладка сохранена! @@ -1782,20 +1779,7 @@ Убрать - - Получите максимум от %s. - Нажмите, чтобы узнать больше - - Собирайте то, что важно для вас - - Объединяйте похожие запросы, сайты и вкладки, для быстрого доступа к ним в будущем. - - В другом браузере Firefox на этом устройстве вы вошли как %s. Вы хотите авторизоваться с помощью этого аккаунта? - - Вы можете легко добавить этот веб-сайт на домашний экран вашего телефона, чтобы иметь к нему мгновенный доступ и сёрфить быстрее со скоростью нативного приложения. - diff --git a/app/src/main/res/values-tg/strings.xml b/app/src/main/res/values-tg/strings.xml index b48acb69c..54b0e7aff 100644 --- a/app/src/main/res/values-tg/strings.xml +++ b/app/src/main/res/values-tg/strings.xml @@ -441,9 +441,6 @@ Маълумоти бештар - - Комилан ғайрифаъол карда шуд, Барои фаъол кардани он ба Танзимот гузаред. - Телеметрия @@ -454,6 +451,8 @@ Маълумоти маркетингӣ Маълумот дар бораи хусусиятҳое, ки шумо дар %1$s истифода мебаред бо Leanplum, яъне фурӯшандаи маркетинги мобилии мо, мубодила карда шавад + + Маълумоти асосии истифодабариро бо «Adjust», фурӯшандаи маркетингии мобилии мо, мубодила мекунад Таҳқиқҳо @@ -792,8 +791,6 @@ %1$s нест карда шуд Илова кардани ҷузвадон - - Хатбарак эҷод карда шуд. Хатбарак нигоҳ дошта шуд! @@ -1753,19 +1750,7 @@ Тоза кардан - - Аз %s баштар истифода баред. - Барои тафсилоти бештар зер кунед - - Чизҳоеро, ки ба шумо муҳиманд, ҷамъ кунед - - Ҷустуҷӯҳо, сомонаҳо ва варақаҳои монандро барои дастрасии фаврӣ дар оянда якҷоя кунед. - - Шумо ҳамчун %s тавассути браузери дигари Firefox дар ин телефон ворид шудаед. Шумо мехоҳед, ки бо ин ҳисоб ворид шавед? - - Шумо метавонед ин сомонаро ба экрани асосии телефони худ ба осонӣ илова кунед, то ки ба он дастрасии фаврӣ дошта бошед ва бо таҷрибаи ба барнома монанд зудтар паймоиш кунед. - + diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml index 12d6a64b2..3e864c14f 100644 --- a/app/src/main/res/values-vi/strings.xml +++ b/app/src/main/res/values-vi/strings.xml @@ -443,9 +443,6 @@ Tìm hiểu thêm - - Đã tắt toàn bộ, đi tới cài đặt để bật nó. - Telemetry @@ -456,6 +453,8 @@ Dữ liệu tiếp thị Chia sẻ dữ liệu về những tính năng bạn sử dụng trong %1$s với Leanplum, nhà cung cấp tiếp thị di động của chúng tôi. + + Chia sẻ dữ liệu sử dụng cơ bản với Adjust, nhà cung cấp tiếp thị di động của chúng tôi Nghiên cứu @@ -792,8 +791,6 @@ Đã xóa %1$s Thêm thư mục - - Đã tạo dấu trang. Đã lưu dấu trang! @@ -1741,20 +1738,7 @@ Xóa - - Tận dụng tối đa %s. - Chạm để biết thêm chi tiết - - Thu thập những thứ quan trọng với bạn - - Nhóm các tìm kiếm, trang web và thẻ tương tự để truy cập nhanh sau này. - - Bạn đã đăng nhập dưới dạng %s trên một trình duyệt Firefox khác trên điện thoại này. Bạn có muốn đăng nhập bằng tài khoản này không? - - Bạn có thể dễ dàng thêm trang web vào màn hình chính của điện thoại của bạn để có thể truy cập và duyệt web nhanh hơn với trải nghiệm giống như trên ứng dụng. - From df616a2e10f5de1fb21e27398fcf634127e7941a Mon Sep 17 00:00:00 2001 From: MickeyMoz Date: Sat, 1 May 2021 15:36:57 +0000 Subject: [PATCH 060/256] Update Android Components version to 90.0.20210501143136. --- buildSrc/src/main/java/AndroidComponents.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/java/AndroidComponents.kt b/buildSrc/src/main/java/AndroidComponents.kt index 2c122a886..68f269502 100644 --- a/buildSrc/src/main/java/AndroidComponents.kt +++ b/buildSrc/src/main/java/AndroidComponents.kt @@ -3,5 +3,5 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ object AndroidComponents { - const val VERSION = "90.0.20210430143137" + const val VERSION = "90.0.20210501143136" } From 2f5937aeb354fe40e93663519183b0332e550c2f Mon Sep 17 00:00:00 2001 From: Mozilla L10n Automation Bot Date: Sun, 2 May 2021 00:03:28 +0000 Subject: [PATCH 061/256] Import l10n. --- app/src/main/res/values-cak/strings.xml | 27 ++++++++-------------- app/src/main/res/values-co/strings.xml | 24 ++++--------------- app/src/main/res/values-it/strings.xml | 20 ++-------------- app/src/main/res/values-iw/strings.xml | 20 ++-------------- app/src/main/res/values-kk/strings.xml | 20 ++-------------- app/src/main/res/values-pa-rIN/strings.xml | 20 ++-------------- app/src/main/res/values-pl/strings.xml | 20 ++-------------- 7 files changed, 23 insertions(+), 128 deletions(-) diff --git a/app/src/main/res/values-cak/strings.xml b/app/src/main/res/values-cak/strings.xml index ba13ee1b0..eac749a67 100644 --- a/app/src/main/res/values-cak/strings.xml +++ b/app/src/main/res/values-cak/strings.xml @@ -461,9 +461,6 @@ Tetamäx ch\'aqa\' chik - - Tachupu\' chijun, jät pa Nuk\'ulem richin natzïj. - Etataqonel @@ -820,8 +817,6 @@ Xyuj %1$s Titz\'aqatisäx Yakwuj - - Xtz\'ukutäj ri yaketal. ¡Xyak yaketal! @@ -1216,6 +1211,8 @@ ¿La k\'o ak\'utunik chi rij ri xwachib\'ëx chik chi rij ri %s? ¿La nawajo\' nawetamaj achike ri xjalatäj? Wawe\' e k\'o ri tzolin taq tzij + + Taxima\' Firefox pa taq awokisab\'al @@ -1224,6 +1221,8 @@ Ja\', titikirisäx molojri\'ïl Nitikirisäx molojri\'ïl… + + Tatz\'ib\'aj ab\'i\' Jantape\' chupül @@ -1231,6 +1230,8 @@ Xsach toq xtikirisäx molojri\'ïl + + Junelïk tzijïl ichinanem Junaman (k\'o wi) @@ -1579,6 +1580,9 @@ Titz\'aqatisäx rutarjeta\' kre\'ito\' + + Rajilab\'al Tarjeta\' + Titz\'aqatisäx kanob\'äl @@ -1743,20 +1747,7 @@ Achi\'el: \nhttps://www.google.com/search?q=%s Tiyuj - - Ütz tawokisaj ri %s. - Tipitz\' richin ch\'aqa\' rub\'anikil - - Ke\'amolo\' ri taq wachinäq niqa chawa - - Ketzob\'ajïx taq kanoxïk, taq ruxaq chuqa\' taq ruwi\' ejunam richin ye\'okisäx na. - - Xatikirisaj molojri\'ïl pa jun chik rokik\'amaya\'l Firefox achi\'el %s pa re oyonib\'äl re\'. ¿La nawajo\' natikirisaj molojri\'ïl rik\'in re rub\'i\' taqoya\'l re\'? - - Anin yatikïr naya\' re ajk\'amaya\'l pa ri Rutikirib\'al ruxaq awoyonib\'al richin aninäq nawokisaj chuqa\' aninäq yatok pa k\'amaya\'l, achi\'el ta xa jun chokoy. - diff --git a/app/src/main/res/values-co/strings.xml b/app/src/main/res/values-co/strings.xml index ecd103632..04fd07eaa 100644 --- a/app/src/main/res/values-co/strings.xml +++ b/app/src/main/res/values-co/strings.xml @@ -450,9 +450,6 @@ Sapene di più - - Disattivata di manera glubale, andate in e Preferenze per attivalla. - Telemetria @@ -460,9 +457,11 @@ Sparte cù Mozilla i dati d’andamentu, d’impiegu, di materiale è di persunalizazione di u vostru navigatore per aiutacci à amendà %1$s - Dati di cummercializazione + Dati cummerciali - Scumparte i dati nant’à e funzioni di %1$s chì voi impiegate cù Leanplum, u nostru furnidore di cummercializazione mubile. + Scumparte i dati nant’à e funzioni di %1$s chì voi impiegate cù Leanplum, u nostru venditore di dati cummerciali d’apparechji mubili. + + Spartera di i dati d’adopru basichi cù Adjust, u nostru venditore di dati cummerciali d’apparechji mubili Studii @@ -803,8 +802,6 @@ %1$s squassatu Aghjunghje un cartulare - - Indetta aghjunta. Indetta arregistrata @@ -1767,20 +1764,7 @@ Caccià - - Ottene u più bellu da %s. - Cliccu per sapene di più - - Racuglite ciò chì conta per voi - - Gruppate inseme ricerche simile, i siti è l’unghjette per un accessu future più prestu. - - Site cunnettu cum’è %s nant’à un altru navigatore Firefox cù stu telefonu. Vulete cunnettavvi cù stu contu ? - - Hè faciule d’aghjunghje stu situ nant’à u screnu d’accolta di u vostru telefonu per accedeci direttamente è navigà più prestu cum’è s’ella fussi un’appiecazione. - diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index e25d0b7a7..1eba66099 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -454,9 +454,6 @@ Ulteriori informazioni - - Disattivata a livello globale, aprire le impostazioni per attivarla. - Telemetria @@ -468,6 +465,8 @@ Dati di marketing Condividi dati sulle funzioni utilizzate in %1$s con Leanplum, il nostro partner per il marketing su piattaforma mobile. + + Condivide i dati di utilizzo di base con Adjust, il nostro fornitore di mobile marketing Studi @@ -810,8 +809,6 @@ %1$s eliminata Aggiungi cartella - - Segnalibro aggiunto. Segnalibro salvato @@ -1790,20 +1787,7 @@ Elimina - - Ottieni il massimo da %s. - Fare clic per ulteriori dettagli - - Raggruppa i tuoi interessi - - Raggruppa ricerche, siti e schede simili tra loro per ritrovarle più rapidamente. - - Sei già connesso come %s in un altro browser Firefox sul dispositivo in uso. Desideri accedere con questo account? - - È possibile aggiungere questo sito web alla schermata principale del telefono per accedervi più rapidamente, come se si trattasse di un’app. - diff --git a/app/src/main/res/values-iw/strings.xml b/app/src/main/res/values-iw/strings.xml index 2f16e3340..7b5624330 100644 --- a/app/src/main/res/values-iw/strings.xml +++ b/app/src/main/res/values-iw/strings.xml @@ -445,9 +445,6 @@ מידע נוסף - - כבויה באופן גלובלי, יש לעבור להגדרות כדי להפעיל אותה. - Telemetry @@ -459,6 +456,8 @@ נתוני שיווק שיתוף מידע על התכונות שהכי משמשות אותך ב־%1$s עם Leanplum, ספק השיווק שלנו למכשירים ניידים. + + משתף נתוני שימוש בסיסיים עם Adjust, ספק השיווק שלנו בסלולר מחקרים @@ -796,8 +795,6 @@ נמחק %1$s הוספת תיקייה - - סימנייה נוצרה. הסימנייה נשמרה! @@ -1755,20 +1752,7 @@ הסרה - - להוציא את המיטב מ־%s. - יש ללחוץ לפרטים נוספים - - לאסוף את הדברים החשובים לך - - ניתן לקבץ חיפושים, אתרים ולשוניות דומים יחד כדי לגשת אליהם מהר יותר בהמשך. - - דפדפן Firefox נוסף בטלפון זה מחובר כ־%s. האם ברצונך להתחבר עם חשבון זה? - - באפשרותך להוסיף בקלות אתר זה למסך הבית של הטלפון שלך כדי לקבל גישה מיידית ולגלוש מהר יותר עם חוויה שמדמה שימוש ביישומון. - diff --git a/app/src/main/res/values-kk/strings.xml b/app/src/main/res/values-kk/strings.xml index d1e47d9e8..9926d5c6d 100644 --- a/app/src/main/res/values-kk/strings.xml +++ b/app/src/main/res/values-kk/strings.xml @@ -437,9 +437,6 @@ Көбірек білу - - Толығымен сөндірілген, іске қосу үшін Баптауларға өтіңіз. - Телеметрия @@ -450,6 +447,8 @@ Маркетингтік мәліметтер Leanplum, біздің мобильді маркетинг өндірушісімен, %1$s ішінде қандай мүмкіндіктерді пайдаланғаныңыз туралы деректермен бөліседі. + + Біздің мобильді маркетинг вендоры Adjust-пен негізгі пайдалану деректерін бөліседі Зерттеулер @@ -786,8 +785,6 @@ %1$s өшірілді Буманы қосу - - Бетбелгі жасалды. Бетбелгі сақталды! @@ -1744,20 +1741,7 @@ Өшіру - - %s өнімін толықтай пайдаланыңыз. - Көбірек білу үшін шертіңіз - - Өзіңізге маңызды заттарды жинаңыз - - Кейінірек жылдам қатынау үшін ұқсас іздеулер, сайттар және беттерді топтастырыңыз. - - Сіз осы телефондағы басқа Firefox браузерінде %s ретінде кірдіңіз. Осы тіркелгімен кіргіңіз келе ме? - - Бұл веб-сайтты жылдам қатынау және қолданба тектес режимде жылдам шолу мақсатымен телефоныңыздың үй бетіңізге қосуға болады. - diff --git a/app/src/main/res/values-pa-rIN/strings.xml b/app/src/main/res/values-pa-rIN/strings.xml index 31717c24e..05b7d1a01 100644 --- a/app/src/main/res/values-pa-rIN/strings.xml +++ b/app/src/main/res/values-pa-rIN/strings.xml @@ -455,9 +455,6 @@ ਹੋਰ ਸਿੱਖੋ - - ਪੂਰੇ ਤੌਰ ‘ਤੇ ਬੰਦ ਹੈ, ਇਸ ਨੂੰ ਚਾਲੂ ਕਰਨ ਲਈ ਸੈਟਿੰਗਾਂ ‘ਤੇ ਜਾਓ। - ਟੈਲੀਮੈਟਰੀ @@ -468,6 +465,8 @@ ਮਾਰਕੀਟਿੰਗ ਡਾਟਾ %1$s ਵਿੱਚ ਕਿਹੜੇ ਫੀਚਰ ਤੁਸੀਂ ਵਰਤਦੇ ਹੋ, ਬਾਰੇ ਡਾਟੇ ਨੂੰ Leanplum, ਸਾਡੇ ਮਾਰਕੀਟਿੰਗ ਵੇਂਡਰ ਨਾਲ ਸਾਂਝਾ ਕਰਦਾ ਹੈ। + + ਕੁਝ ਅਨੁਕੂਲ ਬਣਾ ਕੇ ਮੁੱਢਲਾ ਵਰਤੋਂ ਡਾਟਾ ਸਾਡੇ ਮੋਬਾਈਲ ਮਾਰਕੀਟਿੰਗ ਵੇਂਡਰ ਨਾਲ ਸਾਂਝਾ ਕਰਦਾ ਹੈ ਅਧਿਐਨ @@ -811,8 +810,6 @@ %1$s ਨੂੰ ਹਟਾਇਆ ਫੋਲਡਰ ਜੋੜੋ - - ਬੁੱਕਮਾਰਕ ਬਣਾਇਆ। ਬੁੱਕਮਾਰਕ ਸੰਭਾਲਿਆ! @@ -1771,20 +1768,7 @@ ਹਟਾਓ - - %s ਤੋਂ ਪੂਰਾ ਪੂਰਾ ਫਾਇਦਾ ਲਵੋ। - ਹੋਰ ਵੇਰਵਿਆਂ ਲਈ ਕਲਿੱਕ ਕਰੋ - - ਚੀਜ਼ਾਂ ਇਕੱਤਰ ਕਰੋ, ਜੋ ਤੁਹਾਡੇ ਲਈ ਜ਼ਰੂਰੀ ਹਨ - - ਬਾਅਦ ਵਿੱਚ ਫ਼ੌਰੀ ਵਰਤਣ ਲਈ ਰਲਦੀਆਂ ਖੋਜਾਂ, ਸਾਈਤਾਂ ਤੇ ਟੈਬਾਂ ਨੂੰ ਗਰੁੱਪ ਵਿੱਚ ਇਕੱਠੀਆਂ ਕਰੋ। - - ਤੁਸੀਂ ਇਸ ਫ਼ੋਨ ‘ਤੇ ਹੋਰ ਫਾਇਰਫਾਕਸ ਬਰਾਊਜ਼ਰ ਉੱਤੇ %s ਵਜੋਂ ਸਾਈਨ ਇਨ ਹੋ। ਕੀ ਤੁਸੀਂ ਇਸ ਖਾਤੇ ਨਾਲ ਸਾਈਨ ਇਨ ਕਰਨਾ ਚਾਹੁੰਦੇ ਹੋ? - - ਤੁਸੀਂ ਇਸ ਵੈੱਬਸਾਈਟ ਨੂੰ ਸੌਖੀ ਤਰ੍ਹਾਂ ਆਪਣੀ ਫ਼ੋਨ ਦੀ ਮੁੱਖ ਸਕਰੀਨ ‘ਤੇ ਜੋੜ ਸਕਦੇ ਹੋ ਤਾਂ ਕਿ ਐਪ ਵਰਗੇ ਤਜਰਬੇ ਵਾਸਤੇ ਤੁਰੰਤ ਪਹੁੰਚ ਅਤੇ ਤੇਜ਼ੀ ਨਾਲ ਬਰਾਊਜ਼ ਕਰਨ ਲਈ ਵਰਤਿਆ ਜਾ ਸਕੇ। - diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index 90f528356..d21392bdd 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -449,9 +449,6 @@ Więcej informacji - - Całkowicie wyłączona, otwórz ustawienia, aby ją włączyć. - Telemetria @@ -462,6 +459,8 @@ Dane marketingowe Udostępnia dane o funkcjach przeglądarki %1$s używanych przez użytkownika firmie Leanplum, naszemu dostawcy marketingu mobilnego. + + Udostępnia podstawowe dane o użyciu firmie Adjust, naszemu dostawcy marketingu mobilnego. Badania @@ -801,8 +800,6 @@ Usunięto folder „%1$s” Dodaj folder - - Utworzono zakładkę Dodano zakładkę @@ -1760,20 +1757,7 @@ Usuń - - Zacznij synchronizować zakładki, hasła i nie tylko za pomocą konta Firefoksa. - Kliknij, aby wyświetlić więcej informacji - - Zbierz rzeczy, które są dla Ciebie ważne - - Połącz ze sobą podobne wyszukiwania, witryny i karty, aby szybciej do nich wracać. - - Zalogowano jako %s w innej przeglądarce Firefox na tym telefonie. Czy chcesz się zalogować na tym koncie? - - Można łatwo dodać tę stronę do ekranu głównego telefonu, aby mieć do niej bezpośredni dostęp i używać jej jak aplikację. - From d55758345ddb8d39d633c5523c85cb91a458151a Mon Sep 17 00:00:00 2001 From: MickeyMoz Date: Sun, 2 May 2021 15:36:31 +0000 Subject: [PATCH 062/256] Update Android Components version to 90.0.20210502143118. --- buildSrc/src/main/java/AndroidComponents.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/java/AndroidComponents.kt b/buildSrc/src/main/java/AndroidComponents.kt index 68f269502..c2e73f6b1 100644 --- a/buildSrc/src/main/java/AndroidComponents.kt +++ b/buildSrc/src/main/java/AndroidComponents.kt @@ -3,5 +3,5 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ object AndroidComponents { - const val VERSION = "90.0.20210501143136" + const val VERSION = "90.0.20210502143118" } From bd9d5597fac442f249f1a1db27614cc1effa9929 Mon Sep 17 00:00:00 2001 From: Mozilla L10n Automation Bot Date: Mon, 3 May 2021 00:06:09 +0000 Subject: [PATCH 063/256] Import l10n. --- app/src/main/res/values-es-rCL/strings.xml | 20 ++------------------ app/src/main/res/values-es-rES/strings.xml | 20 ++------------------ app/src/main/res/values-lt/strings.xml | 20 ++------------------ app/src/main/res/values-nn-rNO/strings.xml | 20 ++------------------ app/src/main/res/values-pt-rBR/strings.xml | 16 ++++++++-------- app/src/main/res/values-uk/strings.xml | 6 +++--- app/src/main/res/values-zh-rCN/strings.xml | 4 ++-- 7 files changed, 21 insertions(+), 85 deletions(-) diff --git a/app/src/main/res/values-es-rCL/strings.xml b/app/src/main/res/values-es-rCL/strings.xml index 7a346492b..12727bdd7 100644 --- a/app/src/main/res/values-es-rCL/strings.xml +++ b/app/src/main/res/values-es-rCL/strings.xml @@ -442,9 +442,6 @@ Aprender más - - Desactivado de forma global, ve a Ajustes para activarla. - Telemetría @@ -455,6 +452,8 @@ Datos de marketing Comparte datos acerca de las funcionalidades que usas en %1$s con Leanplum, nuestro proveedor de marketing para móviles. + + Comparte datos de uso básico con Adjust, nuestro proveedor de marketing móvil Estudios @@ -793,8 +792,6 @@ %1$s eliminado Añadir carpeta - - Marcador creado. ¡Marcador guardado! @@ -1747,20 +1744,7 @@ Eliminar - - Saca el máximo provecho a %s. - Clic para más detalles - - Recolecta lo que te importa - - Agrupa búsquedas, sitios y pestañas similares para acceder a ellos rápidamente. - - Te has conectado como %s en otro navegador Firefox en este teléfono. ¿Quieres conectarte con esta cuenta? - - Puedes añadir fácilmente este sitio web a tu pantalla de inicio de tu teléfono para tener acceso instantáneo y navegar rápidamente, consiguiendo una experiencia similar a la de una aplicación real. - diff --git a/app/src/main/res/values-es-rES/strings.xml b/app/src/main/res/values-es-rES/strings.xml index ac87fca5a..2bb4678c1 100644 --- a/app/src/main/res/values-es-rES/strings.xml +++ b/app/src/main/res/values-es-rES/strings.xml @@ -454,9 +454,6 @@ Saber más - - Se desactivó en general, ve a Ajustes para activarlo. - Telemetry @@ -467,6 +464,8 @@ Datos de marketing Comparte datos acerca de las funcionalidades que usas en %1$s con Leanplum, nuestro proveedor de marketing para móviles. + + Comparte datos básicos de uso con Adjust, nuestro proveedor de marketing móvil Estudios @@ -807,8 +806,6 @@ Se ha eliminado %1$s Agregar carpeta - - Se ha creado el marcador. ¡Marcador guardado! @@ -1789,20 +1786,7 @@ Eliminar - - Sácale el mejor provecho a %s. - Clic para más detalles - - Colecciona las cosas que te importan - - Agrupa búsquedas, sitios y pestañas similares para un acceso rápido más tarde. - - Ya has iniciado sesión como %s en otro navegador Firefox de este teléfono. ¿Quieres iniciar sesión con esta cuenta? - - Puedes añadir fácilmente este sitio web a tu página de inicio para tener acceso instantáneo y navegar rápidamente como si fuera una aplicación. - diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml index 644911fba..4a0db67f6 100644 --- a/app/src/main/res/values-lt/strings.xml +++ b/app/src/main/res/values-lt/strings.xml @@ -442,9 +442,6 @@ Sužinoti daugiau - - Išjungta globaliai, eikite į „Nuostatas“, norėdami įjungti. - Telemetrija @@ -456,6 +453,8 @@ Rinkodaros duomenys Duomenys apie jūsų naudojamas „%1$s“ funkcijas bus perduodami „Leanplum“, mūsų mobiliosios rinkodaros pardavėjui. + + Pagrindiniai naudojimosi duomenys bus perduodami „Adjust“, mūsų mobiliosios rinkodaros pardavėjui Tyrimai @@ -798,8 +797,6 @@ Pašalintas „%1$s“ Įtraukti aplanką - - Adresyno įrašas sukurtas. Adresyno įrašas išsaugotas! @@ -1767,20 +1764,7 @@ Pašalinti - - išnaudokite daugiau „%s“ galimybių. - Spustelėkite čia, jeigu norite daugiau informacijos - - Kaupkite jums svarbius dalykus - - Sugrupuokite panašias paieškas, svetaines, ir korteles patogesniam pasiekimui. - - Esate prisijungę kaip %s kitoje „Firefox“ naršyklėje šiame įrenginyje. Ar norėtumėte prisijungti su šia paskyra? - - Galite lengvai pridėti šią svetainę į savo telefono pradžios ekraną, kad turėtumėte greitą priėjimą ir naršytumėte sparčiau, tarsi naudodamiesi programa. - diff --git a/app/src/main/res/values-nn-rNO/strings.xml b/app/src/main/res/values-nn-rNO/strings.xml index 8848f06af..518f2bd5a 100644 --- a/app/src/main/res/values-nn-rNO/strings.xml +++ b/app/src/main/res/values-nn-rNO/strings.xml @@ -447,9 +447,6 @@ Les meir - - Slått av globalt, gå til Innstillingar for å slå på vern. - Telemetri @@ -460,6 +457,8 @@ Marknadsføringsdata Deler data om kva for funksjonar du brukar i %1$s med Leanplum, den mobile marknadsføringsleverandøren vår. + + Deler grunnleggjande bruksdata med Adjust, leverandøren vår av mobil marknadsføring undersøking @@ -805,8 +804,6 @@ Sletta %1$s Legg til mappe - - Bokmerke laga. Bokmerke lagra! @@ -1770,20 +1767,7 @@ Fjern - - Få mest muleg ut av %s. - Trykk her for meir informasjon - - Samle dei tinga som betyr noko for deg - - Grupper saman liknande søk, nettstadar og faner for rask tilgang seinare. - - Du er logga inn som %s på ein annan Firefox-nettlesar på denne telefonen. Vil du logge inn med denne kontoen? - - Du kan enkelt leggje til denne nettstaden på startskjermen til telefonen for å få direkte tilgang, og surfe raskare med ei app-liknande oppleving. - diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 0a7ecb088..9ac4c9c93 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -455,7 +455,7 @@ Compartilhar dados sobre que recursos você usa no %1$s com o Leanplum, nosso fornecedor de marketing para celular. - Compartilha dados básicos de uso com a Adjust, nossa fornecedora de marketing em dispositivos móveis + Compartilhar dados básicos de uso com a Adjust, nossa fornecedora de marketing em dispositivos móveis Estudos @@ -528,7 +528,7 @@ Favoritos - Favoritos do computador + Favoritos no computador Menu de favoritos @@ -581,20 +581,20 @@ Manualmente - Após um dia + Após um dia sem uso - Após uma semana + Após uma semana sem uso - Após um mês + Após um mês sem uso Fechar manualmente - Fechar após um dia + Fechar após um dia sem uso - Fechar após uma semana + Fechar após uma semana sem uso - Fechar após um mês + Fechar após um mês sem uso diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml index a79e8b5be..aeb1b82d0 100644 --- a/app/src/main/res/values-uk/strings.xml +++ b/app/src/main/res/values-uk/strings.xml @@ -368,7 +368,7 @@ Власна збірка додатків - OK + Гаразд Скасувати @@ -462,7 +462,7 @@ Надсилання даних про функції, які ви використовуєте в %1$s, нашій компанії з мобільного маркетингу Leanplum. - Надсилати основні дані про користування до Adjust, нашого постачальника мобільного маркетингу + Надсилати основні дані про використання до нашого постачальника мобільного маркетингу Adjust Дослідження @@ -1753,7 +1753,7 @@ Назва популярного сайту - OK + Гаразд Скасувати diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index d343ca957..108e79773 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -758,9 +758,9 @@ - 清除下载记录 + 清空下载记录 - 您确定要清除下载记录吗? + 您确定要清空下载记录吗? 下载记录已清除 From d71df4d505af2dc4863eb866f4365a6d9215dc63 Mon Sep 17 00:00:00 2001 From: MickeyMoz Date: Mon, 3 May 2021 15:35:30 +0000 Subject: [PATCH 064/256] Update Android Components version to 90.0.20210503143138. --- buildSrc/src/main/java/AndroidComponents.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/java/AndroidComponents.kt b/buildSrc/src/main/java/AndroidComponents.kt index c2e73f6b1..0d7468423 100644 --- a/buildSrc/src/main/java/AndroidComponents.kt +++ b/buildSrc/src/main/java/AndroidComponents.kt @@ -3,5 +3,5 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ object AndroidComponents { - const val VERSION = "90.0.20210502143118" + const val VERSION = "90.0.20210503143138" } From 79cf3fc765c6a6b71688653c36372da4af486851 Mon Sep 17 00:00:00 2001 From: Roger Yang Date: Mon, 3 May 2021 17:27:19 -0400 Subject: [PATCH 065/256] Closes #18253: Bookmark and History open new tabs in the background (#19275) --- .../org/mozilla/fenix/ui/BookmarksTest.kt | 6 +-- .../java/org/mozilla/fenix/ui/HistoryTest.kt | 6 +-- .../mozilla/fenix/ui/robots/TabDrawerRobot.kt | 6 +++ .../ui/robots/ThreeDotMenuBookmarksRobot.kt | 12 ++--- .../ui/robots/ThreeDotMenuHistoryItemRobot.kt | 12 ++--- .../library/bookmarks/BookmarkController.kt | 24 +++++++-- .../library/bookmarks/BookmarkFragment.kt | 6 ++- .../library/history/HistoryController.kt | 14 +++-- .../fenix/library/history/HistoryFragment.kt | 53 +++++++++++-------- .../library/history/HistoryInteractor.kt | 4 +- .../bookmarks/BookmarkControllerTest.kt | 29 ++++++++-- .../library/history/HistoryControllerTest.kt | 14 ++--- .../library/history/HistoryInteractorTest.kt | 4 +- 13 files changed, 126 insertions(+), 64 deletions(-) diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/BookmarksTest.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/BookmarksTest.kt index d09de56b3..747aed42d 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/BookmarksTest.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/BookmarksTest.kt @@ -223,8 +223,7 @@ class BookmarksTest { IdlingRegistry.getInstance().register(bookmarksListIdlingResource!!) }.openThreeDotMenu(defaultWebPage.url) { }.clickOpenInNewTab { - verifyUrl(defaultWebPage.url.toString()) - }.openTabDrawer { + verifyTabTrayIsOpened() verifyNormalModeSelected() } } @@ -242,8 +241,7 @@ class BookmarksTest { IdlingRegistry.getInstance().register(bookmarksListIdlingResource!!) }.openThreeDotMenu(defaultWebPage.url) { }.clickOpenInPrivateTab { - verifyUrl(defaultWebPage.url.toString()) - }.openTabDrawer { + verifyTabTrayIsOpened() verifyPrivateModeSelected() } } diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/HistoryTest.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/HistoryTest.kt index 8267e85be..6dcdc9e4c 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/HistoryTest.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/HistoryTest.kt @@ -149,8 +149,7 @@ class HistoryTest { IdlingRegistry.getInstance().register(historyListIdlingResource!!) }.openThreeDotMenu { }.clickOpenInNormalTab { - verifyUrl(firstWebPage.url.toString()) - }.openTabDrawer { + verifyTabTrayIsOpened() verifyNormalModeSelected() } } @@ -170,8 +169,7 @@ class HistoryTest { IdlingRegistry.getInstance().register(historyListIdlingResource!!) }.openThreeDotMenu { }.clickOpenInPrivateTab { - verifyUrl(firstWebPage.url.toString()) - }.openTabDrawer { + verifyTabTrayIsOpened() verifyPrivateModeSelected() } } diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/TabDrawerRobot.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/TabDrawerRobot.kt index f0007760c..8a9256817 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/TabDrawerRobot.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/TabDrawerRobot.kt @@ -80,6 +80,7 @@ class TabDrawerRobot { fun verifySelectTabsButton() = assertSelectTabsButton() fun verifyTabTrayOverflowMenu(visibility: Boolean) = assertTabTrayOverflowButton(visibility) + fun verifyTabTrayIsOpened() = assertTabTrayDoesExist() fun verifyTabTrayIsClosed() = assertTabTrayDoesNotExist() fun verifyHalfExpandedRatio() = assertMinisculeHalfExpandedRatio() fun verifyBehaviorState(expectedState: Int) = assertBehaviorState(expectedState) @@ -421,6 +422,11 @@ private fun assertTabTrayOverflowButton(visible: Boolean) = onView(withId(R.id.tab_tray_overflow)) .check(matches(withEffectiveVisibility(visibleOrGone(visible)))) +private fun assertTabTrayDoesExist() { + onView(withId(R.id.tab_wrapper)) + .check(matches(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE))) +} + private fun assertTabTrayDoesNotExist() { onView(withId(R.id.tab_wrapper)) .check(doesNotExist()) diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/ThreeDotMenuBookmarksRobot.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/ThreeDotMenuBookmarksRobot.kt index 1173b6bec..2c13ba626 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/ThreeDotMenuBookmarksRobot.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/ThreeDotMenuBookmarksRobot.kt @@ -38,18 +38,18 @@ class ThreeDotMenuBookmarksRobot { return BookmarksRobot.Transition() } - fun clickOpenInNewTab(interact: BrowserRobot.() -> Unit): BrowserRobot.Transition { + fun clickOpenInNewTab(interact: TabDrawerRobot.() -> Unit): TabDrawerRobot.Transition { openInNewTabButton().click() - BrowserRobot().interact() - return BrowserRobot.Transition() + TabDrawerRobot().interact() + return TabDrawerRobot.Transition() } - fun clickOpenInPrivateTab(interact: BrowserRobot.() -> Unit): BrowserRobot.Transition { + fun clickOpenInPrivateTab(interact: TabDrawerRobot.() -> Unit): TabDrawerRobot.Transition { openInPrivateTabButton().click() - BrowserRobot().interact() - return BrowserRobot.Transition() + TabDrawerRobot().interact() + return TabDrawerRobot.Transition() } fun clickDelete(interact: BookmarksRobot.() -> Unit): BookmarksRobot.Transition { diff --git a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/ThreeDotMenuHistoryItemRobot.kt b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/ThreeDotMenuHistoryItemRobot.kt index cc44a1621..850a9cec9 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/ui/robots/ThreeDotMenuHistoryItemRobot.kt +++ b/app/src/androidTest/java/org/mozilla/fenix/ui/robots/ThreeDotMenuHistoryItemRobot.kt @@ -41,16 +41,16 @@ class ThreeDotMenuHistoryItemRobot { return LibrarySubMenusMultipleSelectionToolbarRobot.Transition() } - fun clickOpenInNormalTab(interact: BrowserRobot.() -> Unit): BrowserRobot.Transition { + fun clickOpenInNormalTab(interact: TabDrawerRobot.() -> Unit): TabDrawerRobot.Transition { openInNewNormalTabButton().click() - BrowserRobot().interact() - return BrowserRobot.Transition() + TabDrawerRobot().interact() + return TabDrawerRobot.Transition() } - fun clickOpenInPrivateTab(interact: BrowserRobot.() -> Unit): BrowserRobot.Transition { + fun clickOpenInPrivateTab(interact: TabDrawerRobot.() -> Unit): TabDrawerRobot.Transition { openInNewPrivateTabButton().click() - BrowserRobot().interact() - return BrowserRobot.Transition() + TabDrawerRobot().interact() + return TabDrawerRobot.Transition() } fun clickDelete(interact: HistoryRobot.() -> Unit): HistoryRobot.Transition { diff --git a/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkController.kt b/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkController.kt index 3dc18e26d..2f6950e22 100644 --- a/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkController.kt +++ b/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkController.kt @@ -14,6 +14,7 @@ import kotlinx.coroutines.launch import mozilla.appservices.places.BookmarkRoot import mozilla.components.concept.engine.prompt.ShareData import mozilla.components.concept.storage.BookmarkNode +import mozilla.components.feature.tabs.TabsUseCases import mozilla.components.service.fxa.sync.SyncReason import org.mozilla.fenix.BrowserDirection import org.mozilla.fenix.HomeActivity @@ -55,11 +56,13 @@ class DefaultBookmarkController( private val scope: CoroutineScope, private val store: BookmarkFragmentStore, private val sharedViewModel: BookmarksSharedViewModel, + private val tabsUseCases: TabsUseCases?, private val loadBookmarkNode: suspend (String) -> BookmarkNode?, private val showSnackbar: (String) -> Unit, private val deleteBookmarkNodes: (Set, Event) -> Unit, private val deleteBookmarkFolder: (Set) -> Unit, - private val invokePendingDeletion: () -> Unit + private val invokePendingDeletion: () -> Unit, + private val showTabTray: () -> Unit ) : BookmarkController { private val resources: Resources = activity.resources @@ -70,7 +73,7 @@ class DefaultBookmarkController( } override fun handleBookmarkTapped(item: BookmarkNode) { - openInNewTab(item.url!!, true, BrowserDirection.FromBookmarks, activity.browsingModeManager.mode) + openInNewTabAndShow(item.url!!, true, BrowserDirection.FromBookmarks, activity.browsingModeManager.mode) } override fun handleBookmarkExpand(folder: BookmarkNode) { @@ -126,7 +129,8 @@ class DefaultBookmarkController( } override fun handleOpeningBookmark(item: BookmarkNode, mode: BrowsingMode) { - openInNewTab(item.url!!, true, BrowserDirection.FromBookmarks, mode) + openInNewTab(item.url!!, mode) + showTabTray() } override fun handleBookmarkDeletion(nodes: Set, eventType: Event) { @@ -169,7 +173,7 @@ class DefaultBookmarkController( } } - private fun openInNewTab( + private fun openInNewTabAndShow( searchTermOrURL: String, newTab: Boolean, from: BrowserDirection, @@ -182,6 +186,18 @@ class DefaultBookmarkController( } } + private fun openInNewTab( + url: String, + mode: BrowsingMode + ) { + invokePendingDeletion.invoke() + activity.browsingModeManager.mode = BrowsingMode.fromBoolean(mode == BrowsingMode.Private) + tabsUseCases?.let { tabsUseCases -> + val addTab = if (mode == BrowsingMode.Private) tabsUseCases.addPrivateTab else tabsUseCases.addTab + addTab.invoke(url) + } + } + private fun navigateToGivenDirection(directions: NavDirections) { invokePendingDeletion.invoke() navController.nav(R.id.bookmarkFragment, directions) diff --git a/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkFragment.kt b/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkFragment.kt index 4b93a4f31..e7a1a8475 100644 --- a/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkFragment.kt @@ -92,11 +92,13 @@ class BookmarkFragment : LibraryPageFragment(), UserInteractionHan scope = viewLifecycleOwner.lifecycleScope, store = bookmarkStore, sharedViewModel = sharedViewModel, + tabsUseCases = activity?.components?.useCases?.tabsUseCases, loadBookmarkNode = ::loadBookmarkNode, showSnackbar = ::showSnackBarWithText, deleteBookmarkNodes = ::deleteMulti, deleteBookmarkFolder = ::showRemoveFolderDialog, - invokePendingDeletion = ::invokePendingDeletion + invokePendingDeletion = ::invokePendingDeletion, + showTabTray = ::showTabTray ), metrics = metrics!! ) @@ -243,7 +245,7 @@ class BookmarkFragment : LibraryPageFragment(), UserInteractionHan private fun showTabTray() { invokePendingDeletion() - navigateToBookmarkFragment(BookmarkFragmentDirections.actionGlobalTabTrayDialogFragment()) + navigateToBookmarkFragment(BookmarkFragmentDirections.actionGlobalTabsTrayFragment()) } private fun navigateToBookmarkFragment(directions: NavDirections) { diff --git a/app/src/main/java/org/mozilla/fenix/library/history/HistoryController.kt b/app/src/main/java/org/mozilla/fenix/library/history/HistoryController.kt index 8d9114a43..41d734c8e 100644 --- a/app/src/main/java/org/mozilla/fenix/library/history/HistoryController.kt +++ b/app/src/main/java/org/mozilla/fenix/library/history/HistoryController.kt @@ -21,7 +21,8 @@ import org.mozilla.fenix.ext.navigateBlockingForAsyncNavGraph @Suppress("TooManyFunctions") interface HistoryController { - fun handleOpen(item: HistoryItem, mode: BrowsingMode? = null) + fun handleOpen(item: HistoryItem) + fun handleOpenInNewTab(item: HistoryItem, mode: BrowsingMode) fun handleSelect(item: HistoryItem) fun handleDeselect(item: HistoryItem) fun handleBackPressed(): Boolean @@ -42,15 +43,20 @@ class DefaultHistoryController( private val snackbar: FenixSnackbar, private val clipboardManager: ClipboardManager, private val scope: CoroutineScope, - private val openToBrowser: (item: HistoryItem, mode: BrowsingMode?) -> Unit, + private val openToBrowser: (item: HistoryItem) -> Unit, + private val openInNewTab: (item: HistoryItem, mode: BrowsingMode) -> Unit, private val displayDeleteAll: () -> Unit, private val invalidateOptionsMenu: () -> Unit, private val deleteHistoryItems: (Set) -> Unit, private val syncHistory: suspend () -> Unit, private val metrics: MetricController ) : HistoryController { - override fun handleOpen(item: HistoryItem, mode: BrowsingMode?) { - openToBrowser(item, mode) + override fun handleOpen(item: HistoryItem) { + openToBrowser(item) + } + + override fun handleOpenInNewTab(item: HistoryItem, mode: BrowsingMode) { + openInNewTab(item, mode) } override fun handleSelect(item: HistoryItem) { diff --git a/app/src/main/java/org/mozilla/fenix/library/history/HistoryFragment.kt b/app/src/main/java/org/mozilla/fenix/library/history/HistoryFragment.kt index 7d96b91b7..2fddae924 100644 --- a/app/src/main/java/org/mozilla/fenix/library/history/HistoryFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/library/history/HistoryFragment.kt @@ -80,22 +80,23 @@ class HistoryFragment : LibraryPageFragment(), UserInteractionHandl ) } val historyController: HistoryController = DefaultHistoryController( - historyStore, - findNavController(), - resources, - FenixSnackbar.make( + store = historyStore, + navController = findNavController(), + resources = resources, + snackbar = FenixSnackbar.make( view = view, duration = FenixSnackbar.LENGTH_LONG, isDisplayedWithBrowserToolbar = false ), - activity?.getSystemService(CLIPBOARD_SERVICE) as ClipboardManager, - lifecycleScope, - ::openItem, - ::displayDeleteAllDialog, - ::invalidateOptionsMenu, - ::deleteHistoryItems, - ::syncHistory, - requireComponents.analytics.metrics + clipboardManager = activity?.getSystemService(CLIPBOARD_SERVICE) as ClipboardManager, + scope = lifecycleScope, + openToBrowser = ::openItem, + openInNewTab = ::openItemAndShowTray, + displayDeleteAll = ::displayDeleteAllDialog, + invalidateOptionsMenu = ::invalidateOptionsMenu, + deleteHistoryItems = ::deleteHistoryItems, + syncHistory = ::syncHistory, + metrics = requireComponents.analytics.metrics ) historyInteractor = HistoryInteractor( historyController @@ -216,7 +217,7 @@ class HistoryFragment : LibraryPageFragment(), UserInteractionHandl invokePendingDeletion() findNavController().nav( R.id.historyFragment, - HistoryFragmentDirections.actionGlobalTabTrayDialogFragment() + HistoryFragmentDirections.actionGlobalTabsTrayFragment() ) } @@ -247,14 +248,8 @@ class HistoryFragment : LibraryPageFragment(), UserInteractionHandl _historyView = null } - private fun openItem(item: HistoryItem, mode: BrowsingMode? = null) { - when (mode?.isPrivate) { - true -> requireComponents.analytics.metrics.track(Event.HistoryOpenedInPrivateTab) - false -> requireComponents.analytics.metrics.track(Event.HistoryOpenedInNewTab) - null -> requireComponents.analytics.metrics.track(Event.HistoryItemOpened) - } - - mode?.let { (activity as HomeActivity).browsingModeManager.mode = it } + private fun openItem(item: HistoryItem) { + requireComponents.analytics.metrics.track(Event.HistoryItemOpened) (activity as HomeActivity).openToBrowserAndLoad( searchTermOrURL = item.url, @@ -263,6 +258,22 @@ class HistoryFragment : LibraryPageFragment(), UserInteractionHandl ) } + private fun openItemAndShowTray(item: HistoryItem, mode: BrowsingMode) { + when (mode.isPrivate) { + true -> requireComponents.analytics.metrics.track(Event.HistoryOpenedInPrivateTab) + false -> requireComponents.analytics.metrics.track(Event.HistoryOpenedInNewTab) + } + + val homeActivity = activity as HomeActivity + homeActivity.browsingModeManager.mode = mode + homeActivity.components.useCases.tabsUseCases.let { tabsUseCases -> + val addTab = if (mode == BrowsingMode.Private) tabsUseCases.addPrivateTab else tabsUseCases.addTab + addTab.invoke(item.url) + } + + showTabTray() + } + private fun displayDeleteAllDialog() { activity?.let { activity -> AlertDialog.Builder(activity).apply { diff --git a/app/src/main/java/org/mozilla/fenix/library/history/HistoryInteractor.kt b/app/src/main/java/org/mozilla/fenix/library/history/HistoryInteractor.kt index 2c8b9056e..e7792e827 100644 --- a/app/src/main/java/org/mozilla/fenix/library/history/HistoryInteractor.kt +++ b/app/src/main/java/org/mozilla/fenix/library/history/HistoryInteractor.kt @@ -43,11 +43,11 @@ class HistoryInteractor( } override fun onOpenInNormalTab(item: HistoryItem) { - historyController.handleOpen(item, BrowsingMode.Normal) + historyController.handleOpenInNewTab(item, BrowsingMode.Normal) } override fun onOpenInPrivateTab(item: HistoryItem) { - historyController.handleOpen(item, BrowsingMode.Private) + historyController.handleOpenInNewTab(item, BrowsingMode.Private) } override fun onDeleteAll() { diff --git a/app/src/test/java/org/mozilla/fenix/library/bookmarks/BookmarkControllerTest.kt b/app/src/test/java/org/mozilla/fenix/library/bookmarks/BookmarkControllerTest.kt index e2d6c8960..9708a253b 100644 --- a/app/src/test/java/org/mozilla/fenix/library/bookmarks/BookmarkControllerTest.kt +++ b/app/src/test/java/org/mozilla/fenix/library/bookmarks/BookmarkControllerTest.kt @@ -27,6 +27,7 @@ import kotlinx.coroutines.test.TestCoroutineScope import mozilla.appservices.places.BookmarkRoot import mozilla.components.concept.storage.BookmarkNode import mozilla.components.concept.storage.BookmarkNodeType +import mozilla.components.feature.tabs.TabsUseCases import org.junit.After import org.junit.Assert.assertEquals import org.junit.Before @@ -54,14 +55,18 @@ class BookmarkControllerTest { private val clipboardManager: ClipboardManager = mockk(relaxUnitFun = true) private val navController: NavController = mockk(relaxed = true) private val sharedViewModel: BookmarksSharedViewModel = mockk() + private val tabsUseCases: TabsUseCases = mockk() private val loadBookmarkNode: suspend (String) -> BookmarkNode? = mockk(relaxed = true) private val showSnackbar: (String) -> Unit = mockk(relaxed = true) private val deleteBookmarkNodes: (Set, Event) -> Unit = mockk(relaxed = true) private val deleteBookmarkFolder: (Set) -> Unit = mockk(relaxed = true) private val invokePendingDeletion: () -> Unit = mockk(relaxed = true) + private val showTabTray: () -> Unit = mockk(relaxed = true) private val homeActivity: HomeActivity = mockk(relaxed = true) private val services: Services = mockk(relaxed = true) + private val addNewTabUseCase: TabsUseCases.AddNewTabUseCase = mockk(relaxed = true) + private val addNewPrivateTabUseCase: TabsUseCases.AddNewPrivateTabUseCase = mockk(relaxed = true) private val item = BookmarkNode(BookmarkNodeType.ITEM, "456", "123", 0, "Mozilla", "http://mozilla.org", null) @@ -100,6 +105,8 @@ class BookmarkControllerTest { } every { bookmarkStore.dispatch(any()) } returns mockk() every { sharedViewModel.selectedFolder = any() } just runs + every { tabsUseCases.addTab } returns addNewTabUseCase + every { tabsUseCases.addPrivateTab } returns addNewPrivateTabUseCase controller = DefaultBookmarkController( activity = homeActivity, @@ -108,11 +115,13 @@ class BookmarkControllerTest { scope = scope, store = bookmarkStore, sharedViewModel = sharedViewModel, + tabsUseCases = tabsUseCases, loadBookmarkNode = loadBookmarkNode, showSnackbar = showSnackbar, deleteBookmarkNodes = deleteBookmarkNodes, deleteBookmarkFolder = deleteBookmarkFolder, - invokePendingDeletion = invokePendingDeletion + invokePendingDeletion = invokePendingDeletion, + showTabTray = showTabTray ) } @@ -267,6 +276,16 @@ class BookmarkControllerTest { } } + @Test + fun `handleBookmarkTapped should open the bookmark`() { + controller.handleBookmarkTapped(item) + + verifyOrder { + invokePendingDeletion.invoke() + homeActivity.openToBrowserAndLoad(item.url!!, true, BrowserDirection.FromBookmarks) + } + } + @Test fun `handleOpeningBookmark should open the bookmark a new 'Normal' tab`() { controller.handleOpeningBookmark(item, BrowsingMode.Normal) @@ -274,7 +293,9 @@ class BookmarkControllerTest { verifyOrder { invokePendingDeletion.invoke() homeActivity.browsingModeManager.mode = BrowsingMode.Normal - homeActivity.openToBrowserAndLoad(item.url!!, true, BrowserDirection.FromBookmarks) + tabsUseCases.addTab + addNewTabUseCase.invoke(item.url!!) + showTabTray } } @@ -285,7 +306,9 @@ class BookmarkControllerTest { verifyOrder { invokePendingDeletion.invoke() homeActivity.browsingModeManager.mode = BrowsingMode.Private - homeActivity.openToBrowserAndLoad(item.url!!, true, BrowserDirection.FromBookmarks) + tabsUseCases.addPrivateTab + addNewPrivateTabUseCase.invoke(item.url!!) + showTabTray } } diff --git a/app/src/test/java/org/mozilla/fenix/library/history/HistoryControllerTest.kt b/app/src/test/java/org/mozilla/fenix/library/history/HistoryControllerTest.kt index 601c8cc41..ea03f239d 100644 --- a/app/src/test/java/org/mozilla/fenix/library/history/HistoryControllerTest.kt +++ b/app/src/test/java/org/mozilla/fenix/library/history/HistoryControllerTest.kt @@ -41,7 +41,8 @@ class HistoryControllerTest { private val resources: Resources = mockk(relaxed = true) private val snackbar: FenixSnackbar = mockk(relaxed = true) private val clipboardManager: ClipboardManager = mockk(relaxed = true) - private val openInBrowser: (HistoryItem, BrowsingMode?) -> Unit = mockk(relaxed = true) + private val openInBrowser: (HistoryItem) -> Unit = mockk(relaxed = true) + private val openAndShowTray: (HistoryItem, BrowsingMode) -> Unit = mockk(relaxed = true) private val displayDeleteAll: () -> Unit = mockk(relaxed = true) private val invalidateOptionsMenu: () -> Unit = mockk(relaxed = true) private val deleteHistoryItems: (Set) -> Unit = mockk(relaxed = true) @@ -55,6 +56,7 @@ class HistoryControllerTest { clipboardManager, scope, openInBrowser, + openAndShowTray, displayDeleteAll, invalidateOptionsMenu, deleteHistoryItems, @@ -77,25 +79,25 @@ class HistoryControllerTest { controller.handleOpen(historyItem) verify { - openInBrowser(historyItem, null) + openInBrowser(historyItem) } } @Test fun onOpenItemInNormalMode() { - controller.handleOpen(historyItem, BrowsingMode.Normal) + controller.handleOpenInNewTab(historyItem, BrowsingMode.Normal) verify { - openInBrowser(historyItem, BrowsingMode.Normal) + openAndShowTray(historyItem, BrowsingMode.Normal) } } @Test fun onOpenItemInPrivateMode() { - controller.handleOpen(historyItem, BrowsingMode.Private) + controller.handleOpenInNewTab(historyItem, BrowsingMode.Private) verify { - openInBrowser(historyItem, BrowsingMode.Private) + openAndShowTray(historyItem, BrowsingMode.Private) } } diff --git a/app/src/test/java/org/mozilla/fenix/library/history/HistoryInteractorTest.kt b/app/src/test/java/org/mozilla/fenix/library/history/HistoryInteractorTest.kt index 05e054b3e..4d5365657 100644 --- a/app/src/test/java/org/mozilla/fenix/library/history/HistoryInteractorTest.kt +++ b/app/src/test/java/org/mozilla/fenix/library/history/HistoryInteractorTest.kt @@ -89,7 +89,7 @@ class HistoryInteractorTest { interactor.onOpenInNormalTab(historyItem) verifyAll { - controller.handleOpen(historyItem, BrowsingMode.Normal) + controller.handleOpenInNewTab(historyItem, BrowsingMode.Normal) } } @@ -98,7 +98,7 @@ class HistoryInteractorTest { interactor.onOpenInPrivateTab(historyItem) verifyAll { - controller.handleOpen(historyItem, BrowsingMode.Private) + controller.handleOpenInNewTab(historyItem, BrowsingMode.Private) } } From 3dfb89d2eba746143908905d7f9c29875a7be9d6 Mon Sep 17 00:00:00 2001 From: Mozilla L10n Automation Bot Date: Tue, 4 May 2021 00:05:38 +0000 Subject: [PATCH 066/256] Import l10n. --- app/src/main/res/values-cak/strings.xml | 49 ++++++++++++++++++++++ app/src/main/res/values-es-rMX/strings.xml | 30 ++++++------- app/src/main/res/values-kab/strings.xml | 20 +-------- app/src/main/res/values-nb-rNO/strings.xml | 20 +-------- app/src/main/res/values-tr/strings.xml | 20 +-------- 5 files changed, 67 insertions(+), 72 deletions(-) diff --git a/app/src/main/res/values-cak/strings.xml b/app/src/main/res/values-cak/strings.xml index eac749a67..9f12097e8 100644 --- a/app/src/main/res/values-cak/strings.xml +++ b/app/src/main/res/values-cak/strings.xml @@ -471,6 +471,8 @@ Marketin tzij Ke\'akomonij taq tzij chi rij ri taq samaj nawokisaj pa %1$s rik\'in Leanplum, ri ya\'öl qamarketin richin oyonib\'äl. + + Ke\'ichinäx nab\'ey taq tzij ye\'okisäx pa Adjust, ya\'öl qamarkentin richin oyonib\'äl Taq tijonïk @@ -1213,6 +1215,8 @@ Wawe\' e k\'o ri tzolin taq tzij Taxima\' Firefox pa taq awokisab\'al + + Kek\'am pe taq yaketal, natab\'äl chuqa\' ewan taq tzij pa Firefox pa re okisab\'äl re\'. @@ -1232,12 +1236,22 @@ Junelïk tzijïl ichinanem + + Junaman richin ichinanem chuqa\' rub\'eyal nisamäj. Yesamajïx ri taq ruxaq pa relik rub\'eyal. Junaman (k\'o wi) + + Junaman richin ichinanem chuqa\' rub\'eyal nisamäj. Yesamajïx ri taq ruxaq pa relik rub\'eyal. K\'atzinel (chilab\'en) Nimaläj + + Yeruq\'ät mas ojqanela\' richin anin yesamäj ri taq ruxaq, po rik\'in jub\'a\' jujun taq rusamaj re ruxaq xkesachiyaj. + + Tacha\' ri ruk\'ojlib\'al rukajtz\'ik samajib\'äl + + Taya\' pan aq\'a\' ri rukajtz\'ik samajib\'äl. Taya\' ikim o tasiloj pa jotöl. Tawichinaj ri awokem Tacha\' ri awachinel + + Takolo\' jub\'a\' ruwateriya\' chuqa\' tachajij ri runaq\' awäch, tacha\' ri q\'ëq rub\'anikil. Yonil @@ -1320,11 +1336,15 @@ Tetamäx ch\'aqa\' chik Junaman (k\'o wi) + + Junaman richin ichinanem chuqa\' rub\'eyal nisamäj. Yesamajïx ri taq ruxaq pa relik rub\'eyal. Achike ri q\'aton ruma ri relik ruchajixik ojqanem Nimaläj + + Yeruq\'ät mas ojqanela\' richin anin yesamäj ri taq ruxaq, po rik\'in jub\'a\' jujun taq rusamaj re ruxaq xkesachiyaj. Achike ri q\'aton ruma ri ruchajixik ojqanem k\'o @@ -1580,9 +1600,35 @@ Titz\'aqatisäx rutarjeta\' kre\'ito\' + + Kenuk\'samajïx yakon taq tarjeta\' + + Titz\'aqatisäx tarjeta\' + + Tinuk\' tarjeta\' Rajilab\'al Tarjeta\' + + Q\'in Nik\'is Ruq\'ijul + + B\'i\'aj pa Tarjeta\' + + Tz\'ukun Rub\'i\' Tarjeta\' + + + Tiyuj tarjeta\' + + Tiyuj tarjeta\' + + Tiyak + + Tiyak + + Tiq\'at + + Keyak tarjeta\' + Titz\'aqatisäx kanob\'äl @@ -1744,6 +1790,9 @@ Achi\'el: \nhttps://www.google.com/search?q=%s Tiq\'at + + Nub\'än kinuk\'ulem ximonel ajk\'amaya\'l taq ruxaq, taq taqoya\'l chuqa\' taq rutzijol richin yejaq pa ruyonil pa Firefox. + Tiyuj diff --git a/app/src/main/res/values-es-rMX/strings.xml b/app/src/main/res/values-es-rMX/strings.xml index e11a2a383..2c888cc74 100644 --- a/app/src/main/res/values-es-rMX/strings.xml +++ b/app/src/main/res/values-es-rMX/strings.xml @@ -175,6 +175,13 @@ Apariencia + + Personalizar vista de lectura + + Agregar + + Editar + No se puede conectar. Esquema de URL irreconocible. @@ -212,6 +219,11 @@ Saber más + + Buscar %s + + Buscar directamente desde la barra de direcciones + Abrir una nueva pestaña de Firefox @@ -430,9 +442,6 @@ Más información - - Se desactivó en general, ve a Ajustes para activarlo. - Telemetría @@ -768,8 +777,6 @@ Se eliminó %1$s Agregar carpeta - - Marcador creado. ¡Marcador guardado! @@ -1648,20 +1655,7 @@ Eliminar - - Saca el máximo provecho de %s. - Clic para más detalles - - Colecciona las cosas que te importan - - Agrupa búsquedas, sitios y pestañas similares para acceder a ellos rápidamente. - - Ya has iniciado sesión como %s en otro navegador Firefox de este teléfono. ¿Quieres iniciar sesión con esta cuenta? - - Puedes agregar fácilmente este sitio web a la página de inicio de tu teléfono para navegar más rápido con una experiencia similar a una app. - diff --git a/app/src/main/res/values-kab/strings.xml b/app/src/main/res/values-kab/strings.xml index 7d6f8adf8..0cf39c4b2 100644 --- a/app/src/main/res/values-kab/strings.xml +++ b/app/src/main/res/values-kab/strings.xml @@ -450,9 +450,6 @@ Tiktiwin tigejdanin yuzzlen ur nṣeḥḥi ara Issin ugar - - Yensa s wudem amatu, ddu ɣer yiɣewwaren akken ad yermed. - Tilisɣelt @@ -463,6 +460,8 @@ Tiktiwin tigejdanin yuzzlen ur nṣeḥḥi ara Isefka n uzenzi Bḍu isefka ɣef timahilin i tseqdaceḍ deg %1$s s Leanplum, Imzenzi-nneɣ n izirazen. + + Ibeṭṭu isefka n useqdec azadur akked Adjust, amsenzi-nneɣ n ssuq n uziraz Studies @@ -806,8 +805,6 @@ Tiktiwin tigejdanin yuzzlen ur nṣeḥḥi ara %1$s4 yettwakkes Rnu akaram - - Tacreṭ n usebter tettwarna. Tacreṭ n usebter tettwasekles! @@ -1768,20 +1765,7 @@ Tiktiwin tigejdanin yuzzlen ur nṣeḥḥi ara Kkes - - Awi %s amaynut akk. - Sit i wugar n telqayt - - Lqeḍ tiɣawsiwin i tḥemmleḍ - - Segrew akk akken inadiyen, ismal d waccaren yemṣadan akken ad yishil unekcum ɣer-sen mbeεd. - - Aql-ak teqqneḍ s %s ɣef yiminig-nniḍen Firefox s wugur-a. Tenɣiḍ ad teqqneḍ s umiḍan-a? - - Adtizmireḍ s tifses ad ternuḍ asmel-a web ɣer ugdil agejdan n tiliɣri-ik akken ad tesɛuḍ anekcum askudan daɣen ad tinigeḍ s zreb s termit icuban asnas. - diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml index fc0f352b5..78b42fac9 100644 --- a/app/src/main/res/values-nb-rNO/strings.xml +++ b/app/src/main/res/values-nb-rNO/strings.xml @@ -447,9 +447,6 @@ Les mer - - Slått av globalt, gå til Innstillinger for å slå den på. - Telemetri @@ -461,6 +458,8 @@ Markedsføringsdata Deler data om hvilke funksjoner du bruker i %1$s med Leanplum, vår mobile markedsføringsleverandør. + + Deler grunnleggende bruksdata med Adjust, vår mobile markedsføringsleverandør Undersøkelse @@ -802,8 +801,6 @@ Slettet %1$s Legg til mappe - - Bokmerke opprettet. Bokmerke lagret! @@ -1774,20 +1771,7 @@ Fjern - - Få mest mulig ut av %s. - Trykk her for mer informasjon - - Samle tingene som betyr noe for deg - - Grupper sammen lignende søk, nettsteder og faner for rask tilgang senere. - - Du er logget inn som %s på en annen Firefox-nettleser på denne telefonen. Vil du logge inn med denne kontoen? - - Du kan enkelt legge til dette nettstedet på telefonens startskjerm for å få øyeblikkelig tilgang og surfe raskere med en app-lignende opplevelse. - diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 2507c6074..35b11e8b2 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -445,9 +445,6 @@ Daha fazla bilgi al - - Tamamen kapalı. Açmak için Ayarlar’a gidin. - Telemetri @@ -458,6 +455,8 @@ Pazarlama verileri Kullandığınız %1$s özellikleri ile ilgili verileri mobil pazarlama hizmeti aldığımız Leanplum ile paylaşır. + + Temel kullanım verilerini mobil pazarlama iş ortağımız Adjust ile paylaşır Araştırmalar @@ -796,8 +795,6 @@ %1$s silindi Klasör ekle - - Yer imi oluşturuldu. Yer imi kaydedildi! @@ -1750,20 +1747,7 @@ Kaldır - - %s tarayıcınızdan en iyi şekilde yararlanın. - Ayrıntılar için tıklayın - - Sizin için önemli olan şeyleri toplayın - - Benzer aramaları, siteleri ve sekmeleri gruplandırarak daha sonra onlara hızlıca erişebilirsiniz. - - Bu telefondaki başka bir Firefox tarayıcısına %s olarak giriş yapmışsınız. Bu hesapla giriş yapmak ister misiniz? - - Bu siteyi telefonunuzun ana ekranına ekleyerek ona hızlıca erişebilir, site bir uygulamaymış gibi daha hızlı gezinti yapabilirsiniz. - From f421f82f2cae96d2c3e926a64eaa05082df85d17 Mon Sep 17 00:00:00 2001 From: Jonathan Almeida Date: Thu, 29 Apr 2021 18:15:58 -0400 Subject: [PATCH 067/256] Close #19259: Pass CoroutineContext to nav interactor constructor --- .../fenix/tabstray/NavigationInteractor.kt | 10 +++++--- .../fenix/tabstray/TabsTrayFragment.kt | 3 ++- .../tabstray/NavigationInteractorTest.kt | 25 +++++++++++++++++-- 3 files changed, 31 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/org/mozilla/fenix/tabstray/NavigationInteractor.kt b/app/src/main/java/org/mozilla/fenix/tabstray/NavigationInteractor.kt index a6f2bf6fc..ff2e371af 100644 --- a/app/src/main/java/org/mozilla/fenix/tabstray/NavigationInteractor.kt +++ b/app/src/main/java/org/mozilla/fenix/tabstray/NavigationInteractor.kt @@ -7,7 +7,6 @@ package org.mozilla.fenix.tabstray import android.content.Context import androidx.navigation.NavController import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.launch import mozilla.components.browser.state.selector.getNormalOrPrivateTabs @@ -25,6 +24,7 @@ import org.mozilla.fenix.components.metrics.MetricController import org.mozilla.fenix.ext.navigateBlockingForAsyncNavGraph import org.mozilla.fenix.home.HomeFragment import org.mozilla.fenix.tabstray.ext.getTabSessionState +import kotlin.coroutines.CoroutineContext /** * An interactor that helps with navigating to different parts of the app from the tabs tray. @@ -91,7 +91,8 @@ class DefaultNavigationInteractor( private val bookmarksUseCase: BookmarksUseCase, private val tabsTrayStore: TabsTrayStore, private val collectionStorage: TabCollectionStorage, - private val accountManager: FxaAccountManager + private val accountManager: FxaAccountManager, + private val ioDispatcher: CoroutineContext ) : NavigationInteractor { override fun onTabTrayDismissed() { @@ -181,8 +182,9 @@ class DefaultNavigationInteractor( override fun onSaveToBookmarks(tabs: Collection) { tabs.forEach { tab -> // We don't combine the context with lifecycleScope so that our jobs are not cancelled - // if we leave the fragment, i.e. we still want the bookmarks to be added. - CoroutineScope(Dispatchers.IO).launch { + // if we leave the fragment, i.e. we still want the bookmarks to be added if the + // tabs tray closes before the job is done. + CoroutineScope(ioDispatcher).launch { bookmarksUseCase.addBookmark(tab.url, tab.title) } } diff --git a/app/src/main/java/org/mozilla/fenix/tabstray/TabsTrayFragment.kt b/app/src/main/java/org/mozilla/fenix/tabstray/TabsTrayFragment.kt index f15754ecc..f71f16bd8 100644 --- a/app/src/main/java/org/mozilla/fenix/tabstray/TabsTrayFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/tabstray/TabsTrayFragment.kt @@ -119,7 +119,8 @@ class TabsTrayFragment : AppCompatDialogFragment(), TabsTrayInteractor { dismissTabTrayAndNavigateHome = ::dismissTabsTrayAndNavigateHome, bookmarksUseCase = requireComponents.useCases.bookmarksUseCases, collectionStorage = requireComponents.core.tabCollectionStorage, - accountManager = requireComponents.backgroundServices.accountManager + accountManager = requireComponents.backgroundServices.accountManager, + ioDispatcher = Dispatchers.IO ) tabsTrayController = DefaultTabsTrayController( diff --git a/app/src/test/java/org/mozilla/fenix/tabstray/NavigationInteractorTest.kt b/app/src/test/java/org/mozilla/fenix/tabstray/NavigationInteractorTest.kt index 3afb3b579..69ae45dad 100644 --- a/app/src/test/java/org/mozilla/fenix/tabstray/NavigationInteractorTest.kt +++ b/app/src/test/java/org/mozilla/fenix/tabstray/NavigationInteractorTest.kt @@ -14,6 +14,7 @@ import io.mockk.verify import io.mockk.mockkStatic import io.mockk.unmockkStatic import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.test.TestCoroutineDispatcher import kotlinx.coroutines.test.runBlockingTest import mozilla.components.browser.state.state.BrowserState import mozilla.components.browser.state.state.TabSessionState @@ -21,6 +22,7 @@ import mozilla.components.browser.state.state.createTab as createStateTab import mozilla.components.browser.state.store.BrowserStore import mozilla.components.concept.tabstray.Tab import mozilla.components.service.fxa.manager.FxaAccountManager +import mozilla.components.support.test.rule.MainCoroutineRule import org.junit.Assert.assertTrue import org.junit.Before import org.junit.Rule @@ -34,6 +36,7 @@ import org.mozilla.fenix.components.metrics.Event import org.mozilla.fenix.components.metrics.MetricController import org.mozilla.fenix.tabstray.browser.createTab as createTrayTab +@ExperimentalCoroutinesApi class NavigationInteractorTest { private lateinit var store: BrowserStore private lateinit var tabsTrayStore: TabsTrayStore @@ -48,9 +51,14 @@ class NavigationInteractorTest { private val collectionStorage: TabCollectionStorage = mockk(relaxed = true) private val accountManager: FxaAccountManager = mockk(relaxed = true) + private val testDispatcher = TestCoroutineDispatcher() + @get:Rule val disableNavGraphProviderAssertionRule = DisableNavGraphProviderAssertionRule() + @get:Rule + val coroutinesTestRule = MainCoroutineRule(testDispatcher) + @Before fun setup() { store = BrowserStore(initialState = BrowserState(tabs = listOf(testTab))) @@ -65,7 +73,8 @@ class NavigationInteractorTest { bookmarksUseCase, tabsTrayStore, collectionStorage, - accountManager + accountManager, + testDispatcher ) } @@ -206,9 +215,21 @@ class NavigationInteractorTest { unmockkStatic("org.mozilla.fenix.collections.CollectionsDialogKt") } - @OptIn(ExperimentalCoroutinesApi::class) @Test fun `onBookmarkTabs calls navigation on DefaultNavigationInteractor`() = runBlockingTest { + navigationInteractor = DefaultNavigationInteractor( + context, + store, + navController, + metrics, + dismissTabTray, + dismissTabTrayAndNavigateHome, + bookmarksUseCase, + tabsTrayStore, + collectionStorage, + accountManager, + coroutineContext + ) navigationInteractor.onSaveToBookmarks(listOf(createTrayTab())) coVerify(exactly = 1) { bookmarksUseCase.addBookmark(any(), any(), any()) } } From 0c74756d394c9d6ccd0db0972d6a4fda7459f430 Mon Sep 17 00:00:00 2001 From: "codrut.topliceanu" Date: Wed, 28 Apr 2021 12:52:08 +0300 Subject: [PATCH 068/256] For #19132 - Fix navigation on disconnect started from tabsTray - Added checks to popBackStack from the Disconnect Logged-in User Dialog, either back to settings, browserFragment or homeFragment. --- .../java/org/mozilla/fenix/settings/account/SignOutFragment.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/mozilla/fenix/settings/account/SignOutFragment.kt b/app/src/main/java/org/mozilla/fenix/settings/account/SignOutFragment.kt index fe0b30c2a..e5f960008 100644 --- a/app/src/main/java/org/mozilla/fenix/settings/account/SignOutFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/settings/account/SignOutFragment.kt @@ -66,9 +66,10 @@ class SignOutFragment : AppCompatDialogFragment() { accountManager.logout() }.invokeOnCompletion { runIfFragmentIsAttached { - if (!findNavController().popBackStack(R.id.settingsFragment, false)) { + if (this.isVisible) { dismiss() } + findNavController().popBackStack() } } } From 2bd933054f0152fbc4bc3d3f2f276d9c41e42e08 Mon Sep 17 00:00:00 2001 From: MickeyMoz Date: Tue, 4 May 2021 15:34:47 +0000 Subject: [PATCH 069/256] Update Android Components version to 90.0.20210504143147. --- buildSrc/src/main/java/AndroidComponents.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/java/AndroidComponents.kt b/buildSrc/src/main/java/AndroidComponents.kt index 0d7468423..7c39c7413 100644 --- a/buildSrc/src/main/java/AndroidComponents.kt +++ b/buildSrc/src/main/java/AndroidComponents.kt @@ -3,5 +3,5 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ object AndroidComponents { - const val VERSION = "90.0.20210503143138" + const val VERSION = "90.0.20210504143147" } From 74047cdceb16990a6a843ce2824ca5b7696fb0d3 Mon Sep 17 00:00:00 2001 From: Roger Yang Date: Wed, 5 May 2021 11:11:02 -0400 Subject: [PATCH 070/256] Closes #19147: Move startup metrics to right after Glean initialization (#19252) --- app/metrics.yaml | 60 +++--- .../org/mozilla/fenix/FenixApplication.kt | 185 ++++++++++++++++- .../org/mozilla/fenix/components/Analytics.kt | 2 +- .../components/metrics/GleanMetricsService.kt | 188 +----------------- .../org/mozilla/fenix/FenixApplicationTest.kt | 103 ++++++++++ .../metrics/GleanMetricsServiceTest.kt | 66 +----- docs/metrics.md | 30 +-- 7 files changed, 332 insertions(+), 302 deletions(-) diff --git a/app/metrics.yaml b/app/metrics.yaml index 8eb6325b8..19531db66 100644 --- a/app/metrics.yaml +++ b/app/metrics.yaml @@ -1269,8 +1269,8 @@ metrics: expires: "2021-08-11" preferences: - show_search_suggestions: - type: string_list + search_suggestions_enabled: + type: boolean description: > Whether or not the user has search suggestions enabled default: true @@ -1286,8 +1286,8 @@ preferences: notification_emails: - fenix-core@mozilla.com expires: "2021-08-01" - remote_debugging: - type: string_list + remote_debugging_enabled: + type: boolean description: > Whether or not the user has remote debugging enabled default: false @@ -1303,8 +1303,8 @@ preferences: notification_emails: - fenix-core@mozilla.com expires: "2021-08-01" - telemetry: - type: string_list + telemetry_enabled: + type: boolean description: > Whether or not the user has telemetry enabled. Note we should never receive a "false" value for this since telemetry would @@ -1322,8 +1322,8 @@ preferences: notification_emails: - fenix-core@mozilla.com expires: "2021-08-01" - tracking_protection: - type: string_list + enhanced_tracking_protection: + type: string description: > What type of enhanced tracking protection the user has enabled. "standard," "strict," "custom," or "" (if disabled) @@ -1340,8 +1340,8 @@ preferences: notification_emails: - fenix-core@mozilla.com expires: "2021-08-01" - search_bookmarks: - type: string_list + bookmarks_suggestion: + type: boolean description: > Whether or not the user has enabled bookmark search suggestions default: true @@ -1357,8 +1357,8 @@ preferences: notification_emails: - fenix-core@mozilla.com expires: "2021-08-01" - search_browsing_history: - type: string_list + browsing_history_suggestion: + type: boolean description: > Whether or not the user has enabled browsing history suggestions. default: true @@ -1374,8 +1374,8 @@ preferences: notification_emails: - fenix-core@mozilla.com expires: "2021-08-01" - show_clipboard_suggestions: - type: string_list + clipboard_suggestions_enabled: + type: boolean description: > Whether or not the user has enabled clipboard search suggestions. default: true @@ -1391,8 +1391,8 @@ preferences: notification_emails: - fenix-core@mozilla.com expires: "2021-08-01" - show_search_shortcuts: - type: string_list + search_shortcuts_enabled: + type: boolean description: > Whether or not the user has enabled search shortcuts. default: true @@ -1408,8 +1408,8 @@ preferences: notification_emails: - fenix-core@mozilla.com expires: "2021-08-01" - open_links_in_a_private_tab: - type: string_list + open_links_in_private: + type: boolean description: > Whether or not the user has enabled open links in a private tab. default: false @@ -1425,8 +1425,8 @@ preferences: notification_emails: - fenix-core@mozilla.com expires: "2021-08-01" - sync: - type: string_list + signed_in_sync: + type: boolean description: > Whether or not the user is signed into FxA default: false @@ -1461,8 +1461,8 @@ preferences: notification_emails: - fenix-core@mozilla.com expires: "2021-08-01" - show_voice_search: - type: string_list + voice_search_enabled: + type: boolean description: > Whether or not the user has enabled the voice search button. default: true @@ -1478,8 +1478,8 @@ preferences: notification_emails: - fenix-core@mozilla.com expires: "2021-08-01" - search_suggestions_private: - type: string_list + private_search_suggestions: + type: boolean description: > Whether or not the user has enabled showing search suggestions in private mode. @@ -1496,8 +1496,8 @@ preferences: notification_emails: - fenix-core@mozilla.com expires: "2021-08-01" - toolbar_position: - type: string_list + toolbar_position_setting: + type: string description: > The position of the toolbar default: bottom (defaults to top if the user has accessibility services) @@ -1531,8 +1531,8 @@ preferences: notification_emails: - fenix-core@mozilla.com expires: "2021-08-01" - open_links_in_app: - type: string_list + open_links_in_app_enabled: + type: boolean description: > Whether or not the user has the open links in apps feature enabled. default: false @@ -1548,8 +1548,8 @@ preferences: notification_emails: - fenix-core@mozilla.com expires: "2021-08-01" - theme: - type: string_list + user_theme: + type: string description: > The theme the user has enabled. "light," "dark," "system," or "battery" default: "system" for API 28+, else "light" diff --git a/app/src/main/java/org/mozilla/fenix/FenixApplication.kt b/app/src/main/java/org/mozilla/fenix/FenixApplication.kt index 212b6e92c..ef45de5b4 100644 --- a/app/src/main/java/org/mozilla/fenix/FenixApplication.kt +++ b/app/src/main/java/org/mozilla/fenix/FenixApplication.kt @@ -63,6 +63,17 @@ import org.mozilla.fenix.session.VisibilityLifecycleCallback import org.mozilla.fenix.telemetry.TelemetryLifecycleObserver import org.mozilla.fenix.utils.BrowsersCache import java.util.concurrent.TimeUnit +import mozilla.components.browser.state.store.BrowserStore +import mozilla.components.feature.search.ext.buildSearchUrl +import mozilla.components.feature.search.ext.waitForSelectedOrDefaultSearchEngine +import mozilla.components.service.fxa.manager.SyncEnginesStorage +import org.mozilla.fenix.GleanMetrics.Addons +import org.mozilla.fenix.GleanMetrics.Preferences +import org.mozilla.fenix.GleanMetrics.SearchDefaultEngine +import org.mozilla.fenix.components.metrics.Event +import org.mozilla.fenix.components.metrics.MozillaProductDetector +import org.mozilla.fenix.components.toolbar.ToolbarPosition +import org.mozilla.fenix.utils.Settings /** *The main application class for Fenix. Records data to measure initialization performance. @@ -130,13 +141,7 @@ open class FenixApplication : LocaleAwareApplication(), Provider { buildInfo = GleanBuildInfo.buildInfo ) - // Set this early to guarantee it's in every ping from here on. - Metrics.distributionId.set( - when (Config.channel.isMozillaOnline) { - true -> "MozillaOnline" - false -> "Mozilla" - } - ) + setStartupMetrics(components.core.store, settings()) } @CallSuper @@ -499,6 +504,172 @@ open class FenixApplication : LocaleAwareApplication(), Provider { } } + /** + * This function is called right after Glean is initialized. Part of this function depends on + * shared preferences to be updated so the correct value is sent with the metrics ping. + * + * The reason we're using shared preferences to track these values is due to the limitations of + * the current metrics ping design. The values set here will be sent in every metrics ping even + * if these values have not changed since the last startup. + */ + @Suppress("ComplexMethod", "LongMethod") + @VisibleForTesting + internal fun setStartupMetrics( + browserStore: BrowserStore, + settings: Settings, + browsersCache: BrowsersCache = BrowsersCache, + mozillaProductDetector: MozillaProductDetector = MozillaProductDetector + ) { + setPreferenceMetrics(settings) + with(Metrics) { + // Set this early to guarantee it's in every ping from here on. + distributionId.set( + when (Config.channel.isMozillaOnline) { + true -> "MozillaOnline" + false -> "Mozilla" + } + ) + + defaultBrowser.set(browsersCache.all(applicationContext).isDefaultBrowser) + mozillaProductDetector.getMozillaBrowserDefault(applicationContext)?.also { + defaultMozBrowser.set(it) + } + + mozillaProducts.set(mozillaProductDetector.getInstalledMozillaProducts(applicationContext)) + + adjustCampaign.set(settings.adjustCampaignId) + adjustAdGroup.set(settings.adjustAdGroup) + adjustCreative.set(settings.adjustCreative) + adjustNetwork.set(settings.adjustNetwork) + + searchWidgetInstalled.set(settings.searchWidgetInstalled) + + val openTabsCount = settings.openTabsCount + hasOpenTabs.set(openTabsCount > 0) + if (openTabsCount > 0) { + tabsOpenCount.add(openTabsCount) + } + + val topSitesSize = settings.topSitesSize + hasTopSites.set(topSitesSize > 0) + if (topSitesSize > 0) { + topSitesCount.add(topSitesSize) + } + + val installedAddonSize = settings.installedAddonsCount + Addons.hasInstalledAddons.set(installedAddonSize > 0) + if (installedAddonSize > 0) { + Addons.installedAddons.set(settings.installedAddonsList.split(',')) + } + + val enabledAddonSize = settings.enabledAddonsCount + Addons.hasEnabledAddons.set(enabledAddonSize > 0) + if (enabledAddonSize > 0) { + Addons.enabledAddons.set(settings.enabledAddonsList.split(',')) + } + + val desktopBookmarksSize = settings.desktopBookmarksSize + hasDesktopBookmarks.set(desktopBookmarksSize > 0) + if (desktopBookmarksSize > 0) { + desktopBookmarksCount.add(desktopBookmarksSize) + } + + val mobileBookmarksSize = settings.mobileBookmarksSize + hasMobileBookmarks.set(mobileBookmarksSize > 0) + if (mobileBookmarksSize > 0) { + mobileBookmarksCount.add(mobileBookmarksSize) + } + + toolbarPosition.set( + when (settings.toolbarPosition) { + ToolbarPosition.BOTTOM -> Event.ToolbarPositionChanged.Position.BOTTOM.name + ToolbarPosition.TOP -> Event.ToolbarPositionChanged.Position.TOP.name + } + ) + + tabViewSetting.set(settings.getTabViewPingString()) + closeTabSetting.set(settings.getTabTimeoutPingString()) + } + + browserStore.waitForSelectedOrDefaultSearchEngine { searchEngine -> + if (searchEngine != null) { + SearchDefaultEngine.apply { + code.set(searchEngine.id) + name.set(searchEngine.name) + submissionUrl.set(searchEngine.buildSearchUrl("")) + } + } + } + } + + @Suppress("ComplexMethod") + private fun setPreferenceMetrics( + settings: Settings + ) { + with(Preferences) { + searchSuggestionsEnabled.set(settings.shouldShowSearchSuggestions) + remoteDebuggingEnabled.set(settings.isRemoteDebuggingEnabled) + telemetryEnabled.set(settings.isTelemetryEnabled) + browsingHistorySuggestion.set(settings.shouldShowHistorySuggestions) + bookmarksSuggestion.set(settings.shouldShowBookmarkSuggestions) + clipboardSuggestionsEnabled.set(settings.shouldShowClipboardSuggestions) + searchShortcutsEnabled.set(settings.shouldShowSearchShortcuts) + openLinksInPrivate.set(settings.openLinksInAPrivateTab) + privateSearchSuggestions.set(settings.shouldShowSearchSuggestionsInPrivate) + voiceSearchEnabled.set(settings.shouldShowVoiceSearch) + openLinksInAppEnabled.set(settings.openLinksInExternalApp) + + val isLoggedIn = + components.backgroundServices.accountManager.accountProfile() != null + signedInSync.set(isLoggedIn) + + val syncedItems = SyncEnginesStorage(applicationContext).getStatus().entries.filter { + it.value + }.map { it.key.nativeName } + syncItems.set(syncedItems) + + toolbarPositionSetting.set( + when { + settings.shouldUseFixedTopToolbar -> "fixed_top" + settings.shouldUseBottomToolbar -> "bottom" + else -> "top" + } + ) + + enhancedTrackingProtection.set( + when { + !settings.shouldUseTrackingProtection -> "" + settings.useStandardTrackingProtection -> "standard" + settings.useStrictTrackingProtection -> "strict" + settings.useCustomTrackingProtection -> "custom" + else -> "" + } + ) + + val accessibilitySelection = mutableListOf() + + if (settings.switchServiceIsEnabled) { + accessibilitySelection.add("switch") + } + + if (settings.touchExplorationIsEnabled) { + accessibilitySelection.add("touch exploration") + } + + accessibilityServices.set(accessibilitySelection.toList()) + + userTheme.set( + when { + settings.shouldUseLightTheme -> "light" + settings.shouldUseDarkTheme -> "dark" + settings.shouldFollowDeviceTheme -> "system" + settings.shouldUseAutoBatteryTheme -> "battery" + else -> "" + } + ) + } + } + protected fun recordOnInit() { // This gets called by more than one process. Ideally we'd only run this in the main process // but the code to check which process we're in crashes because the Context isn't valid yet. diff --git a/app/src/main/java/org/mozilla/fenix/components/Analytics.kt b/app/src/main/java/org/mozilla/fenix/components/Analytics.kt index 31beb0fa3..d875dd63d 100644 --- a/app/src/main/java/org/mozilla/fenix/components/Analytics.kt +++ b/app/src/main/java/org/mozilla/fenix/components/Analytics.kt @@ -92,7 +92,7 @@ class Analytics( val metrics: MetricController by lazyMonitored { MetricController.create( listOf( - GleanMetricsService(context, lazy { context.components.core.store }), + GleanMetricsService(context), AdjustMetricsService(context as Application) ), isDataTelemetryEnabled = { context.settings().isTelemetryEnabled }, diff --git a/app/src/main/java/org/mozilla/fenix/components/metrics/GleanMetricsService.kt b/app/src/main/java/org/mozilla/fenix/components/metrics/GleanMetricsService.kt index 23a36fade..74f49ccfa 100644 --- a/app/src/main/java/org/mozilla/fenix/components/metrics/GleanMetricsService.kt +++ b/app/src/main/java/org/mozilla/fenix/components/metrics/GleanMetricsService.kt @@ -5,10 +5,6 @@ package org.mozilla.fenix.components.metrics import android.content.Context -import mozilla.components.browser.state.store.BrowserStore -import mozilla.components.feature.search.ext.buildSearchUrl -import mozilla.components.feature.search.ext.waitForSelectedOrDefaultSearchEngine -import mozilla.components.service.fxa.manager.SyncEnginesStorage import mozilla.components.service.glean.Glean import mozilla.components.service.glean.private.NoExtraKeys import mozilla.components.support.base.log.logger.Logger @@ -46,12 +42,10 @@ import org.mozilla.fenix.GleanMetrics.Metrics import org.mozilla.fenix.GleanMetrics.Onboarding import org.mozilla.fenix.GleanMetrics.Pings import org.mozilla.fenix.GleanMetrics.Pocket -import org.mozilla.fenix.GleanMetrics.Preferences import org.mozilla.fenix.GleanMetrics.PrivateBrowsingMode import org.mozilla.fenix.GleanMetrics.PrivateBrowsingShortcut import org.mozilla.fenix.GleanMetrics.ProgressiveWebApp import org.mozilla.fenix.GleanMetrics.ReaderMode -import org.mozilla.fenix.GleanMetrics.SearchDefaultEngine import org.mozilla.fenix.GleanMetrics.SearchShortcuts import org.mozilla.fenix.GleanMetrics.SearchSuggestions import org.mozilla.fenix.GleanMetrics.SearchWidget @@ -70,11 +64,7 @@ import org.mozilla.fenix.GleanMetrics.TopSites import org.mozilla.fenix.GleanMetrics.TrackingProtection import org.mozilla.fenix.GleanMetrics.UserSpecifiedSearchEngines import org.mozilla.fenix.GleanMetrics.VoiceSearch -import org.mozilla.fenix.components.toolbar.ToolbarPosition import org.mozilla.fenix.ext.components -import org.mozilla.fenix.ext.settings -import org.mozilla.fenix.utils.BrowsersCache -import org.mozilla.fenix.utils.Settings private class EventWrapper>( private val recorder: ((Map?) -> Unit), @@ -855,11 +845,11 @@ private val Event.wrapper: EventWrapper<*>? is Event.SyncAuthFromSharedReuse, Event.SyncAuthFromSharedCopy -> null } +/** + * Service responsible for sending the activation and installation pings. + */ class GleanMetricsService( - private val context: Context, - private val store: Lazy, - private val browsersCache: BrowsersCache = BrowsersCache, - private val mozillaProductDetector: MozillaProductDetector = MozillaProductDetector + private val context: Context ) : MetricsService { override val type = MetricServiceType.Data @@ -887,181 +877,11 @@ class GleanMetricsService( // can handle events being recorded before it's initialized. Glean.registerPings(Pings) - // setStartupMetrics is not a fast function. It does not need to be done before we can consider - // ourselves initialized. So, let's do it, well, later. - setStartupMetrics(context.settings()) - } - } - - /** - * This function is called before the metrics ping is sent. Part of this function depends on - * shared preferences to be updated so the correct value is sent with the metrics ping. - * - * The reason we're using shared preferences to track some of these values is due to the - * limitations of the metrics ping. Events are only sent in a metrics ping if the user have made - * changes between each ping. However, in some cases we want current values to be sent even if - * the user have not changed anything between pings. - */ - internal fun setStartupMetrics(settings: Settings) { - setPreferenceMetrics() - with(Metrics) { - defaultBrowser.set(browsersCache.all(context).isDefaultBrowser) - mozillaProductDetector.getMozillaBrowserDefault(context)?.also { - defaultMozBrowser.set(it) - } - - mozillaProducts.set(mozillaProductDetector.getInstalledMozillaProducts(context)) - - adjustCampaign.set(settings.adjustCampaignId) - adjustAdGroup.set(settings.adjustAdGroup) - adjustCreative.set(settings.adjustCreative) - adjustNetwork.set(settings.adjustNetwork) - - searchWidgetInstalled.set(settings.searchWidgetInstalled) - - val openTabsCount = settings.openTabsCount - hasOpenTabs.set(openTabsCount > 0) - if (openTabsCount > 0) { - tabsOpenCount.add(openTabsCount) - } - - val topSitesSize = settings.topSitesSize - hasTopSites.set(topSitesSize > 0) - if (topSitesSize > 0) { - topSitesCount.add(topSitesSize) - } - - val installedAddonSize = settings.installedAddonsCount - Addons.hasInstalledAddons.set(installedAddonSize > 0) - if (installedAddonSize > 0) { - Addons.installedAddons.set(settings.installedAddonsList.split(',')) - } - - val enabledAddonSize = settings.enabledAddonsCount - Addons.hasEnabledAddons.set(enabledAddonSize > 0) - if (enabledAddonSize > 0) { - Addons.enabledAddons.set(settings.enabledAddonsList.split(',')) - } - - val desktopBookmarksSize = settings.desktopBookmarksSize - hasDesktopBookmarks.set(desktopBookmarksSize > 0) - if (desktopBookmarksSize > 0) { - desktopBookmarksCount.add(desktopBookmarksSize) - } - - val mobileBookmarksSize = settings.mobileBookmarksSize - hasMobileBookmarks.set(mobileBookmarksSize > 0) - if (mobileBookmarksSize > 0) { - mobileBookmarksCount.add(mobileBookmarksSize) - } - - toolbarPosition.set( - when (settings.toolbarPosition) { - ToolbarPosition.BOTTOM -> Event.ToolbarPositionChanged.Position.BOTTOM.name - ToolbarPosition.TOP -> Event.ToolbarPositionChanged.Position.TOP.name - } - ) - - tabViewSetting.set(settings.getTabViewPingString()) - closeTabSetting.set(settings.getTabTimeoutPingString()) - } - - store.value.waitForSelectedOrDefaultSearchEngine { searchEngine -> - if (searchEngine != null) { - SearchDefaultEngine.apply { - code.set(searchEngine.id) - name.set(searchEngine.name) - submissionUrl.set(searchEngine.buildSearchUrl("")) - } - } - activationPing.checkAndSend() installationPing.checkAndSend() } } - private fun setPreferenceMetrics() { - // We purposefully make all of our preferences the string_list format to make data analysis - // simpler. While it makes things like booleans a bit more complicated, it means all our - // preferences can be analyzed with the same dashboard and compared. - with(Preferences) { - showSearchSuggestions.set(context.settings().shouldShowSearchSuggestions.toStringList()) - remoteDebugging.set(context.settings().isRemoteDebuggingEnabled.toStringList()) - telemetry.set(context.settings().isTelemetryEnabled.toStringList()) - searchBrowsingHistory.set(context.settings().shouldShowHistorySuggestions.toStringList()) - searchBookmarks.set(context.settings().shouldShowBookmarkSuggestions.toStringList()) - showClipboardSuggestions.set(context.settings().shouldShowClipboardSuggestions.toStringList()) - showSearchShortcuts.set(context.settings().shouldShowSearchShortcuts.toStringList()) - openLinksInAPrivateTab.set(context.settings().openLinksInAPrivateTab.toStringList()) - searchSuggestionsPrivate.set(context.settings().shouldShowSearchSuggestionsInPrivate.toStringList()) - showVoiceSearch.set(context.settings().shouldShowVoiceSearch.toStringList()) - openLinksInApp.set(context.settings().openLinksInExternalApp.toStringList()) - - val isLoggedIn = - context.components.backgroundServices.accountManager.accountProfile() != null - sync.set(isLoggedIn.toStringList()) - - val syncedItems = SyncEnginesStorage(context).getStatus().entries.filter { - it.value - }.map { it.key.nativeName } - - syncItems.set(syncedItems) - - val toolbarPositionSelection = - if (context.settings().shouldUseFixedTopToolbar) { - "fixed_top" - } else if (context.settings().shouldUseBottomToolbar) { - "bottom" - } else { - "top" - } - - toolbarPosition.set(listOf(toolbarPositionSelection)) - - val etpSelection = - if (!context.settings().shouldUseTrackingProtection) { - "" - } else if (context.settings().useStandardTrackingProtection) { - "standard" - } else if (context.settings().useStrictTrackingProtection) { - "strict" - } else if (context.settings().useCustomTrackingProtection) { - "custom" - } else { - "" - } - - trackingProtection.set(listOf(etpSelection)) - - val accessibilitySelection = mutableListOf() - - if (context.settings().switchServiceIsEnabled) { - accessibilitySelection.add("switch") - } - - if (context.settings().touchExplorationIsEnabled) { - accessibilitySelection.add("touch exploration") - } - - accessibilityServices.set(accessibilitySelection.toList()) - - val themeSelection = - if (context.settings().shouldUseLightTheme) { - "light" - } else if (context.settings().shouldUseDarkTheme) { - "dark" - } else if (context.settings().shouldFollowDeviceTheme) { - "system" - } else if (context.settings().shouldUseAutoBatteryTheme) { - "battery" - } else { - "" - } - - theme.set(listOf(themeSelection)) - } - } - override fun stop() { Glean.setUploadEnabled(false) } diff --git a/app/src/test/java/org/mozilla/fenix/FenixApplicationTest.kt b/app/src/test/java/org/mozilla/fenix/FenixApplicationTest.kt index f1c508960..492c24f14 100644 --- a/app/src/test/java/org/mozilla/fenix/FenixApplicationTest.kt +++ b/app/src/test/java/org/mozilla/fenix/FenixApplicationTest.kt @@ -8,19 +8,30 @@ import androidx.test.core.app.ApplicationProvider import io.mockk.every import io.mockk.mockk import io.mockk.verify +import mozilla.components.browser.state.store.BrowserStore import mozilla.components.concept.engine.webextension.DisabledFlags import mozilla.components.concept.engine.webextension.Metadata import mozilla.components.concept.engine.webextension.WebExtension import mozilla.components.feature.addons.migration.DefaultSupportedAddonsChecker import mozilla.components.service.glean.testing.GleanTestRule +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse import org.junit.Assert.assertTrue import org.junit.Before import org.junit.Ignore import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith +import org.mozilla.fenix.GleanMetrics.Addons +import org.mozilla.fenix.GleanMetrics.Metrics import org.mozilla.fenix.GleanMetrics.PerfStartup +import org.mozilla.fenix.GleanMetrics.Preferences +import org.mozilla.fenix.GleanMetrics.SearchDefaultEngine +import org.mozilla.fenix.components.metrics.MozillaProductDetector +import org.mozilla.fenix.components.toolbar.ToolbarPosition import org.mozilla.fenix.helpers.FenixRobolectricTestRunner +import org.mozilla.fenix.utils.BrowsersCache +import org.mozilla.fenix.utils.Settings @RunWith(FenixRobolectricTestRunner::class) class FenixApplicationTest { @@ -28,10 +39,16 @@ class FenixApplicationTest { @get:Rule val gleanTestRule = GleanTestRule(ApplicationProvider.getApplicationContext()) private lateinit var application: FenixApplication + private lateinit var browsersCache: BrowsersCache + private lateinit var mozillaProductDetector: MozillaProductDetector + private lateinit var browserStore: BrowserStore @Before fun setUp() { application = ApplicationProvider.getApplicationContext() + browsersCache = mockk(relaxed = true) + mozillaProductDetector = mockk(relaxed = true) + browserStore = BrowserStore() } @Ignore("See https://github.com/mozilla-mobile/fenix/issues/18102") @@ -69,4 +86,90 @@ class FenixApplicationTest { verify { checker.unregisterForChecks() } } + + @Test + fun `WHEN setStartupMetrics is called THEN sets some base metrics`() { + val expectedAppName = "org.mozilla.fenix" + val settings: Settings = mockk() + every { browsersCache.all(any()).isDefaultBrowser } returns true + every { mozillaProductDetector.getMozillaBrowserDefault(any()) } returns expectedAppName + every { mozillaProductDetector.getInstalledMozillaProducts(any()) } returns listOf(expectedAppName) + every { settings.adjustCampaignId } returns "ID" + every { settings.adjustAdGroup } returns "group" + every { settings.adjustCreative } returns "creative" + every { settings.adjustNetwork } returns "network" + every { settings.searchWidgetInstalled } returns true + every { settings.openTabsCount } returns 1 + every { settings.topSitesSize } returns 2 + every { settings.installedAddonsCount } returns 3 + every { settings.installedAddonsList } returns "test1,test2,test3" + every { settings.enabledAddonsCount } returns 2 + every { settings.enabledAddonsList } returns "test1,test2" + every { settings.desktopBookmarksSize } returns 4 + every { settings.mobileBookmarksSize } returns 5 + every { settings.toolbarPosition } returns ToolbarPosition.BOTTOM + every { settings.getTabViewPingString() } returns "test" + every { settings.getTabTimeoutPingString() } returns "test" + every { settings.shouldShowSearchSuggestions } returns true + every { settings.shouldUseTrackingProtection } returns true + every { settings.isRemoteDebuggingEnabled } returns true + every { settings.isTelemetryEnabled } returns true + every { settings.shouldShowHistorySuggestions } returns true + every { settings.shouldShowBookmarkSuggestions } returns true + every { settings.shouldShowClipboardSuggestions } returns true + every { settings.shouldShowSearchShortcuts } returns true + every { settings.openLinksInAPrivateTab } returns true + every { settings.shouldShowSearchSuggestionsInPrivate } returns true + every { settings.shouldShowVoiceSearch } returns true + every { settings.openLinksInExternalApp } returns true + every { settings.shouldUseFixedTopToolbar } returns true + every { settings.useStandardTrackingProtection } returns true + every { settings.switchServiceIsEnabled } returns true + every { settings.touchExplorationIsEnabled } returns true + every { settings.shouldUseLightTheme } returns true + + application.setStartupMetrics(browserStore, settings, browsersCache, mozillaProductDetector) + + // Verify that browser defaults metrics are set. + assertEquals("Mozilla", Metrics.distributionId.testGetValue()) + assertEquals(true, Metrics.defaultBrowser.testGetValue()) + assertEquals(expectedAppName, Metrics.defaultMozBrowser.testGetValue()) + assertEquals(listOf(expectedAppName), Metrics.mozillaProducts.testGetValue()) + assertEquals("ID", Metrics.adjustCampaign.testGetValue()) + assertEquals("group", Metrics.adjustAdGroup.testGetValue()) + assertEquals("creative", Metrics.adjustCreative.testGetValue()) + assertEquals("network", Metrics.adjustNetwork.testGetValue()) + assertEquals(true, Metrics.searchWidgetInstalled.testGetValue()) + assertEquals(true, Metrics.hasOpenTabs.testGetValue()) + assertEquals(1, Metrics.tabsOpenCount.testGetValue()) + assertEquals(true, Metrics.hasTopSites.testGetValue()) + assertEquals(2, Metrics.topSitesCount.testGetValue()) + assertEquals(true, Addons.hasInstalledAddons.testGetValue()) + assertEquals(listOf("test1", "test2", "test3"), Addons.installedAddons.testGetValue()) + assertEquals(true, Addons.hasEnabledAddons.testGetValue()) + assertEquals(listOf("test1", "test2"), Addons.enabledAddons.testGetValue()) + assertEquals(true, Preferences.searchSuggestionsEnabled.testGetValue()) + assertEquals(true, Preferences.remoteDebuggingEnabled.testGetValue()) + assertEquals(true, Preferences.telemetryEnabled.testGetValue()) + assertEquals(true, Preferences.browsingHistorySuggestion.testGetValue()) + assertEquals(true, Preferences.bookmarksSuggestion.testGetValue()) + assertEquals(true, Preferences.clipboardSuggestionsEnabled.testGetValue()) + assertEquals(true, Preferences.searchShortcutsEnabled.testGetValue()) + assertEquals(true, Preferences.openLinksInPrivate.testGetValue()) + assertEquals(true, Preferences.privateSearchSuggestions.testGetValue()) + assertEquals(true, Preferences.voiceSearchEnabled.testGetValue()) + assertEquals(true, Preferences.openLinksInAppEnabled.testGetValue()) + assertEquals(true, Preferences.signedInSync.testGetValue()) + assertEquals(emptyList(), Preferences.syncItems.testGetValue()) + assertEquals("fixed_top", Preferences.toolbarPositionSetting.testGetValue()) + assertEquals("standard", Preferences.enhancedTrackingProtection.testGetValue()) + assertEquals(listOf("switch", "touch exploration"), Preferences.accessibilityServices.testGetValue()) + assertEquals("light", Preferences.userTheme.testGetValue()) + + // Verify that search engine defaults are NOT set. This test does + // not mock most of the objects telemetry is collected from. + assertFalse(SearchDefaultEngine.code.testHasValue()) + assertFalse(SearchDefaultEngine.name.testHasValue()) + assertFalse(SearchDefaultEngine.submissionUrl.testHasValue()) + } } diff --git a/app/src/test/java/org/mozilla/fenix/components/metrics/GleanMetricsServiceTest.kt b/app/src/test/java/org/mozilla/fenix/components/metrics/GleanMetricsServiceTest.kt index 3ae76d2a1..be12b174a 100644 --- a/app/src/test/java/org/mozilla/fenix/components/metrics/GleanMetricsServiceTest.kt +++ b/app/src/test/java/org/mozilla/fenix/components/metrics/GleanMetricsServiceTest.kt @@ -5,10 +5,6 @@ package org.mozilla.fenix.components.metrics import io.mockk.MockKAnnotations -import io.mockk.every -import io.mockk.impl.annotations.MockK -import io.mockk.mockk -import mozilla.components.browser.state.store.BrowserStore import mozilla.components.service.glean.testing.GleanTestRule import mozilla.components.support.test.robolectric.testContext import org.junit.Assert.assertEquals @@ -23,15 +19,10 @@ import org.mozilla.fenix.GleanMetrics.Awesomebar import org.mozilla.fenix.GleanMetrics.BookmarksManagement import org.mozilla.fenix.GleanMetrics.Events import org.mozilla.fenix.GleanMetrics.History -import org.mozilla.fenix.GleanMetrics.Metrics -import org.mozilla.fenix.GleanMetrics.SearchDefaultEngine import org.mozilla.fenix.GleanMetrics.SyncedTabs import org.mozilla.fenix.GleanMetrics.TabsTray import org.mozilla.fenix.GleanMetrics.TabsTrayCfr -import org.mozilla.fenix.components.toolbar.ToolbarPosition import org.mozilla.fenix.helpers.FenixRobolectricTestRunner -import org.mozilla.fenix.utils.BrowsersCache -import org.mozilla.fenix.utils.Settings @RunWith(FenixRobolectricTestRunner::class) class GleanMetricsServiceTest { @@ -40,66 +31,11 @@ class GleanMetricsServiceTest { private lateinit var gleanService: GleanMetricsService - @MockK private lateinit var browsersCache: BrowsersCache - @MockK private lateinit var mozillaProductDetector: MozillaProductDetector - @Before fun setup() { MockKAnnotations.init(this) - val store = BrowserStore() - gleanService = GleanMetricsService(testContext, lazy { store }, browsersCache, mozillaProductDetector) - } - - @Test - fun `setStartupMetrics sets some base metrics`() { - val expectedAppName = "org.mozilla.fenix" - val settings: Settings = mockk() - every { browsersCache.all(any()).isDefaultBrowser } returns true - every { mozillaProductDetector.getMozillaBrowserDefault(any()) } returns expectedAppName - every { mozillaProductDetector.getInstalledMozillaProducts(any()) } returns listOf(expectedAppName) - every { settings.adjustCampaignId } returns "ID" - every { settings.adjustAdGroup } returns "group" - every { settings.adjustCreative } returns "creative" - every { settings.adjustNetwork } returns "network" - every { settings.searchWidgetInstalled } returns true - every { settings.openTabsCount } returns 1 - every { settings.topSitesSize } returns 2 - every { settings.installedAddonsCount } returns 3 - every { settings.installedAddonsList } returns "test1,test2,test3" - every { settings.enabledAddonsCount } returns 2 - every { settings.enabledAddonsList } returns "test1,test2" - every { settings.desktopBookmarksSize } returns 4 - every { settings.mobileBookmarksSize } returns 5 - every { settings.toolbarPosition } returns ToolbarPosition.BOTTOM - every { settings.getTabViewPingString() } returns "test" - every { settings.getTabTimeoutPingString() } returns "test" - - gleanService.setStartupMetrics(settings) - - // Verify that browser defaults metrics are set. - assertEquals(true, Metrics.defaultBrowser.testGetValue()) - assertEquals(expectedAppName, Metrics.defaultMozBrowser.testGetValue()) - assertEquals(listOf(expectedAppName), Metrics.mozillaProducts.testGetValue()) - assertEquals("ID", Metrics.adjustCampaign.testGetValue()) - assertEquals("group", Metrics.adjustAdGroup.testGetValue()) - assertEquals("creative", Metrics.adjustCreative.testGetValue()) - assertEquals("network", Metrics.adjustNetwork.testGetValue()) - assertEquals(true, Metrics.searchWidgetInstalled.testGetValue()) - assertEquals(true, Metrics.hasOpenTabs.testGetValue()) - assertEquals(1, Metrics.tabsOpenCount.testGetValue()) - assertEquals(true, Metrics.hasTopSites.testGetValue()) - assertEquals(2, Metrics.topSitesCount.testGetValue()) - assertEquals(true, Addons.hasInstalledAddons.testGetValue()) - assertEquals(listOf("test1", "test2", "test3"), Addons.installedAddons.testGetValue()) - assertEquals(true, Addons.hasEnabledAddons.testGetValue()) - assertEquals(listOf("test1", "test2"), Addons.enabledAddons.testGetValue()) - - // Verify that search engine defaults are NOT set. This test does - // not mock most of the objects telemetry is collected from. - assertFalse(SearchDefaultEngine.code.testHasValue()) - assertFalse(SearchDefaultEngine.name.testHasValue()) - assertFalse(SearchDefaultEngine.submissionUrl.testHasValue()) + gleanService = GleanMetricsService(testContext) } @Test diff --git a/docs/metrics.md b/docs/metrics.md index 98a127f15..86d867098 100644 --- a/docs/metrics.md +++ b/docs/metrics.md @@ -369,22 +369,22 @@ In addition to those built-in metrics, the following metrics are added to the pi | perf.startup.home_fragment_on_view_created |[timing_distribution](https://mozilla.github.io/glean/book/user/metrics/timing_distribution.html) |The duration of `HomeFragment.onViewCreated`. |[mozilla-mobile/fenix#18558](https://github.com/mozilla-mobile/fenix/pull/18558#issue-596791848)||2021-08-11 |1 | | perf.startup.startup_type |[labeled_counter](https://mozilla.github.io/glean/book/user/metrics/labeled_counters.html) |Indicates how the browser was started. The label is divided into two variables. `state` is how cached the browser is when started. `path` is what code path we are expected to take. Together, they create a combined label: `state_path`. For brevity, the specific states are documented in the [Fenix perf glossary](https://wiki.mozilla.org/index.php?title=Performance/Fenix/Glossary).

This implementation is intended to be simple, not comprehensive. We list the implications below.

These ways of opening the app undesirably adds events to our primary buckets (non-`unknown` cases):
- App switcher cold/warm: `cold/warm_` + duplicates path from previous launch
- Home screen shortcuts: `*_view`
- An Intent is sent internally that's uses `ACTION_MAIN` or `ACTION_VIEW` could be: `*_main/view` (unknown if this ever happens)
- A command-line launch uses `ACTION_MAIN` or `ACTION_VIEW` could be: `*_main/view`

These ways of opening the app undesirably do not add their events to our primary buckets:
- Close and reopen the app very quickly: no event is recorded.

These ways of opening the app don't affect our primary buckets:
- App switcher hot: `hot_unknown`
- PWA (all states): `unknown_unknown`
- Custom tab: `unknown_view`
- Cold start where a service or other non-activity starts the process (not manually tested) - this seems to happen if you have the homescreen widget: `unknown_*`
- Another activity is drawn before HomeActivity (e.g. widget voice search): `unknown_*`
- Widget text search: `*_unknown`

In addition to the events above, the `unknown` state may be chosen when we were unable to determine a cause due to implementation details or the API was used incorrectly. We may be able to record the events listed above into different buckets but we kept the implementation simple for now.

N.B.: for implementation simplicity, we duplicate the logic in app that determines `path` so it's not perfectly accurate. In one way, we record we is intended to happen rather than what actually happened (e.g. the user may click a link so we record VIEW but the app does a MAIN by going to the homescreen because the link was invalid). |[mozilla-mobile/fenix#19028](https://github.com/mozilla-mobile/fenix/pull/19028)|
  • cold_main
  • cold_view
  • cold_unknown
  • warm_main
  • warm_view
  • warm_unknown
  • hot_main
  • hot_view
  • hot_unknown
  • unknown_main
  • unknown_view
  • unknown_unknown
|2021-10-09 |2 | | preferences.accessibility_services |[string_list](https://mozilla.github.io/glean/book/user/metrics/string_list.html) |Whether or not the user has touch exploration or switch services enabled. These are built into the Android OS, not Fenix prefs. default: "" |[mozilla-mobile/fenix#11211](https://github.com/mozilla-mobile/fenix/pull/11211), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | -| preferences.open_links_in_a_private_tab |[string_list](https://mozilla.github.io/glean/book/user/metrics/string_list.html) |Whether or not the user has enabled open links in a private tab. default: false |[mozilla-mobile/fenix#11211](https://github.com/mozilla-mobile/fenix/pull/11211), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | -| preferences.open_links_in_app |[string_list](https://mozilla.github.io/glean/book/user/metrics/string_list.html) |Whether or not the user has the open links in apps feature enabled. default: false |[mozilla-mobile/fenix#11446](https://github.com/mozilla-mobile/fenix/pull/11446), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | -| preferences.remote_debugging |[string_list](https://mozilla.github.io/glean/book/user/metrics/string_list.html) |Whether or not the user has remote debugging enabled default: false |[mozilla-mobile/fenix#11211](https://github.com/mozilla-mobile/fenix/pull/11211), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | -| preferences.search_bookmarks |[string_list](https://mozilla.github.io/glean/book/user/metrics/string_list.html) |Whether or not the user has enabled bookmark search suggestions default: true |[mozilla-mobile/fenix#11211](https://github.com/mozilla-mobile/fenix/pull/11211), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | -| preferences.search_browsing_history |[string_list](https://mozilla.github.io/glean/book/user/metrics/string_list.html) |Whether or not the user has enabled browsing history suggestions. default: true |[mozilla-mobile/fenix#11211](https://github.com/mozilla-mobile/fenix/pull/11211), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | -| preferences.search_suggestions_private |[string_list](https://mozilla.github.io/glean/book/user/metrics/string_list.html) |Whether or not the user has enabled showing search suggestions in private mode. default: false (we prompt the user, asking them to make a selection) |[mozilla-mobile/fenix#11211](https://github.com/mozilla-mobile/fenix/pull/11211), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | -| preferences.show_clipboard_suggestions |[string_list](https://mozilla.github.io/glean/book/user/metrics/string_list.html) |Whether or not the user has enabled clipboard search suggestions. default: true |[mozilla-mobile/fenix#11211](https://github.com/mozilla-mobile/fenix/pull/11211), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | -| preferences.show_search_shortcuts |[string_list](https://mozilla.github.io/glean/book/user/metrics/string_list.html) |Whether or not the user has enabled search shortcuts. default: true |[mozilla-mobile/fenix#11211](https://github.com/mozilla-mobile/fenix/pull/11211), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | -| preferences.show_search_suggestions |[string_list](https://mozilla.github.io/glean/book/user/metrics/string_list.html) |Whether or not the user has search suggestions enabled default: true |[mozilla-mobile/fenix#11211](https://github.com/mozilla-mobile/fenix/pull/11211), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | -| preferences.show_voice_search |[string_list](https://mozilla.github.io/glean/book/user/metrics/string_list.html) |Whether or not the user has enabled the voice search button. default: true |[mozilla-mobile/fenix#11211](https://github.com/mozilla-mobile/fenix/pull/11211), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | -| preferences.sync |[string_list](https://mozilla.github.io/glean/book/user/metrics/string_list.html) |Whether or not the user is signed into FxA default: false |[mozilla-mobile/fenix#11211](https://github.com/mozilla-mobile/fenix/pull/11211), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | +| preferences.bookmarks_suggestion |[boolean](https://mozilla.github.io/glean/book/user/metrics/boolean.html) |Whether or not the user has enabled bookmark search suggestions default: true |[mozilla-mobile/fenix#11211](https://github.com/mozilla-mobile/fenix/pull/11211), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | +| preferences.browsing_history_suggestion |[boolean](https://mozilla.github.io/glean/book/user/metrics/boolean.html) |Whether or not the user has enabled browsing history suggestions. default: true |[mozilla-mobile/fenix#11211](https://github.com/mozilla-mobile/fenix/pull/11211), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | +| preferences.clipboard_suggestions_enabled |[boolean](https://mozilla.github.io/glean/book/user/metrics/boolean.html) |Whether or not the user has enabled clipboard search suggestions. default: true |[mozilla-mobile/fenix#11211](https://github.com/mozilla-mobile/fenix/pull/11211), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | +| preferences.enhanced_tracking_protection |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |What type of enhanced tracking protection the user has enabled. "standard," "strict," "custom," or "" (if disabled) default: "standard" |[mozilla-mobile/fenix#11211](https://github.com/mozilla-mobile/fenix/pull/11211), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | +| preferences.open_links_in_app_enabled |[boolean](https://mozilla.github.io/glean/book/user/metrics/boolean.html) |Whether or not the user has the open links in apps feature enabled. default: false |[mozilla-mobile/fenix#11446](https://github.com/mozilla-mobile/fenix/pull/11446), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | +| preferences.open_links_in_private |[boolean](https://mozilla.github.io/glean/book/user/metrics/boolean.html) |Whether or not the user has enabled open links in a private tab. default: false |[mozilla-mobile/fenix#11211](https://github.com/mozilla-mobile/fenix/pull/11211), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | +| preferences.private_search_suggestions |[boolean](https://mozilla.github.io/glean/book/user/metrics/boolean.html) |Whether or not the user has enabled showing search suggestions in private mode. default: false (we prompt the user, asking them to make a selection) |[mozilla-mobile/fenix#11211](https://github.com/mozilla-mobile/fenix/pull/11211), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | +| preferences.remote_debugging_enabled |[boolean](https://mozilla.github.io/glean/book/user/metrics/boolean.html) |Whether or not the user has remote debugging enabled default: false |[mozilla-mobile/fenix#11211](https://github.com/mozilla-mobile/fenix/pull/11211), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | +| preferences.search_shortcuts_enabled |[boolean](https://mozilla.github.io/glean/book/user/metrics/boolean.html) |Whether or not the user has enabled search shortcuts. default: true |[mozilla-mobile/fenix#11211](https://github.com/mozilla-mobile/fenix/pull/11211), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | +| preferences.search_suggestions_enabled |[boolean](https://mozilla.github.io/glean/book/user/metrics/boolean.html) |Whether or not the user has search suggestions enabled default: true |[mozilla-mobile/fenix#11211](https://github.com/mozilla-mobile/fenix/pull/11211), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | +| preferences.signed_in_sync |[boolean](https://mozilla.github.io/glean/book/user/metrics/boolean.html) |Whether or not the user is signed into FxA default: false |[mozilla-mobile/fenix#11211](https://github.com/mozilla-mobile/fenix/pull/11211), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | | preferences.sync_items |[string_list](https://mozilla.github.io/glean/book/user/metrics/string_list.html) |The list of items the user has chosen to sync with FxA. default: "" if the user is signed out. Otherwise defaults to whatever is set in their FxA account. New accounts set: [bookmarks, history, passwords, tabs] |[mozilla-mobile/fenix#11211](https://github.com/mozilla-mobile/fenix/pull/11211), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | -| preferences.telemetry |[string_list](https://mozilla.github.io/glean/book/user/metrics/string_list.html) |Whether or not the user has telemetry enabled. Note we should never receive a "false" value for this since telemetry would not send in that case. default: true |[mozilla-mobile/fenix#11211](https://github.com/mozilla-mobile/fenix/pull/11211), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | -| preferences.theme |[string_list](https://mozilla.github.io/glean/book/user/metrics/string_list.html) |The theme the user has enabled. "light," "dark," "system," or "battery" default: "system" for API 28+, else "light" |[mozilla-mobile/fenix#11446](https://github.com/mozilla-mobile/fenix/pull/11446), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | -| preferences.toolbar_position |[string_list](https://mozilla.github.io/glean/book/user/metrics/string_list.html) |The position of the toolbar default: bottom (defaults to top if the user has accessibility services) |[mozilla-mobile/fenix#11211](https://github.com/mozilla-mobile/fenix/pull/11211), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | -| preferences.tracking_protection |[string_list](https://mozilla.github.io/glean/book/user/metrics/string_list.html) |What type of enhanced tracking protection the user has enabled. "standard," "strict," "custom," or "" (if disabled) default: "standard" |[mozilla-mobile/fenix#11211](https://github.com/mozilla-mobile/fenix/pull/11211), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | +| preferences.telemetry_enabled |[boolean](https://mozilla.github.io/glean/book/user/metrics/boolean.html) |Whether or not the user has telemetry enabled. Note we should never receive a "false" value for this since telemetry would not send in that case. default: true |[mozilla-mobile/fenix#11211](https://github.com/mozilla-mobile/fenix/pull/11211), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | +| preferences.toolbar_position_setting |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |The position of the toolbar default: bottom (defaults to top if the user has accessibility services) |[mozilla-mobile/fenix#11211](https://github.com/mozilla-mobile/fenix/pull/11211), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | +| preferences.user_theme |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |The theme the user has enabled. "light," "dark," "system," or "battery" default: "system" for API 28+, else "light" |[mozilla-mobile/fenix#11446](https://github.com/mozilla-mobile/fenix/pull/11446), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | +| preferences.voice_search_enabled |[boolean](https://mozilla.github.io/glean/book/user/metrics/boolean.html) |Whether or not the user has enabled the voice search button. default: true |[mozilla-mobile/fenix#11211](https://github.com/mozilla-mobile/fenix/pull/11211), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 | | search.default_engine.code |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |If the search engine is pre-loaded with Fenix this value will be the search engine identifier. If it's a custom search engine (defined: https://github.com/mozilla-mobile/fenix/issues/1607) the value will be "custom" |[mozilla-mobile/fenix#1606](https://github.com/mozilla-mobile/fenix/pull/1606), [mozilla-mobile/fenix#5216](https://github.com/mozilla-mobile/fenix/pull/5216), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |1, 2 | | search.default_engine.name |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |If the search engine is pre-loaded with Fenix this value will be the search engine name. If it's a custom search engine (defined: https://github.com/mozilla-mobile/fenix/issues/1607) the value will be "custom" |[mozilla-mobile/fenix#1606](https://github.com/mozilla-mobile/fenix/pull/1606), [mozilla-mobile/fenix#5216](https://github.com/mozilla-mobile/fenix/pull/5216), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |1, 2 | | search.default_engine.submission_url |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |If the search engine is pre-loaded with Fenix this value will be he base URL we use to build the search query for the search engine. For example: https://mysearchengine.com/?query=%s. If it's a custom search engine (defined: https://github.com/mozilla-mobile/fenix/issues/1607) the value will be "custom" |[mozilla-mobile/fenix#1606](https://github.com/mozilla-mobile/fenix/pull/1606), [mozilla-mobile/fenix#5216](https://github.com/mozilla-mobile/fenix/pull/5216), [mozilla-mobile/fenix#15713](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |1, 2 | From 4578621ffedd3fa0baca4064f75252fe2de4d0dd Mon Sep 17 00:00:00 2001 From: Mozilla L10n Automation Bot Date: Wed, 5 May 2021 00:03:36 +0000 Subject: [PATCH 071/256] Import l10n. --- app/src/main/res/values-ia/strings.xml | 21 +++------------------ app/src/main/res/values-tt/strings.xml | 15 ++++++++++----- 2 files changed, 13 insertions(+), 23 deletions(-) diff --git a/app/src/main/res/values-ia/strings.xml b/app/src/main/res/values-ia/strings.xml index 7d3f87146..a9515f18a 100644 --- a/app/src/main/res/values-ia/strings.xml +++ b/app/src/main/res/values-ia/strings.xml @@ -451,9 +451,6 @@ Saper plus - - Disactivate globalmente, vade a parametros pro activar lo. - Telemetria @@ -468,6 +465,8 @@ Comparti datos re le functionalitates que tu usa in %1$s con Leanplum, nostre venditor de mercato mobile. + + Comparti le datos de uso basic con Adjust, nostre fornitor de marketing mobile Studios @@ -822,8 +821,6 @@ Delite %1$s Adder plica - - Marcapagina create. Marcapagina salvate! @@ -1799,19 +1796,7 @@ Remover - - Obtene le maximo de %s. - Clicca pro altere detalios - - Collige le objectos que te interessa - - Gruppa insimul recercas simile, sitos e schedas pro acceder rapidemente plus tarde. - - Tu es authenticate como %s sur un altere navigator Firefox sur iste telephono. Vole tu acceder con iste conto? - - Tu pote facilemente adder iste sito web al pagina initial de tu telephono pro acceder instantaneemente e navigar plus velocemente, como in un app. - + diff --git a/app/src/main/res/values-tt/strings.xml b/app/src/main/res/values-tt/strings.xml index 8762652bb..b49301d52 100644 --- a/app/src/main/res/values-tt/strings.xml +++ b/app/src/main/res/values-tt/strings.xml @@ -408,9 +408,6 @@ Күбрәк белү - - Тулысынча сүндерелгән, аны кабызу өчен көйләүләргә керегез. - Телеметрия @@ -736,8 +733,6 @@ %1$s бетерелде Папка өстәү - - Кыстыргыч ясалды. Кыстыргыч cакланды! @@ -986,6 +981,9 @@ Кире алу Раслау + + %1$s кушымтасына %2$s сылтамасын ачарга рөхсәт бирү РӨXCӘT ИТҮ @@ -1087,6 +1085,8 @@ Керү... Теркәлү + + Кермичә генә тору Синхронлау кабызылган @@ -1097,6 +1097,11 @@ Катгый (киңәш ителә) Катгый + + Хосусый режимда гизү + + Бер тапкыр гына хосусый таб ачу өчен %s тамгачыгына басыгыз. Көйләүләрне ачу From d0db5091a7be52ba5f36e594229155e9c7ee1b3f Mon Sep 17 00:00:00 2001 From: MickeyMoz Date: Wed, 5 May 2021 15:34:58 +0000 Subject: [PATCH 072/256] Update Android Components version to 90.0.20210504190127. --- buildSrc/src/main/java/AndroidComponents.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/java/AndroidComponents.kt b/buildSrc/src/main/java/AndroidComponents.kt index 7c39c7413..56f07bcf9 100644 --- a/buildSrc/src/main/java/AndroidComponents.kt +++ b/buildSrc/src/main/java/AndroidComponents.kt @@ -3,5 +3,5 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ object AndroidComponents { - const val VERSION = "90.0.20210504143147" + const val VERSION = "90.0.20210504190127" } From 008c523ed1ebdbe198cc29c462c2988a8cef06f1 Mon Sep 17 00:00:00 2001 From: kglazko Date: Wed, 5 May 2021 12:43:09 -0700 Subject: [PATCH 073/256] For #19055 - Add a ScrollView to the Credit Card Editor Fragment (#19117) --- .../layout/fragment_credit_card_editor.xml | 337 +++++++++--------- 1 file changed, 171 insertions(+), 166 deletions(-) diff --git a/app/src/main/res/layout/fragment_credit_card_editor.xml b/app/src/main/res/layout/fragment_credit_card_editor.xml index 697d32c6d..a8aa0dd7c 100644 --- a/app/src/main/res/layout/fragment_credit_card_editor.xml +++ b/app/src/main/res/layout/fragment_credit_card_editor.xml @@ -2,198 +2,203 @@ - - - - - - + + + android:orientation="vertical"> - + - - - - - - - + android:textSize="12sp" + app:fontFamily="@font/metropolis_semibold" /> - + app:errorEnabled="true" + app:hintEnabled="false"> - + + + + + + - - + - + + + + + + + android:baselineAligned="false" + android:orientation="horizontal"> - + android:layout_marginEnd="24dp" + android:layout_weight="1" + android:orientation="vertical"> - + - + - + - + android:layout_weight="1" + android:orientation="vertical"> - + - - + - - - - - - - + + - + + + + + + + + + - + + From 32d7b78e941cffd31c1b315b6a1471f0ddc146b6 Mon Sep 17 00:00:00 2001 From: mcarare Date: Wed, 5 May 2021 16:32:23 +0300 Subject: [PATCH 074/256] For #19281: Add border radius for top sites favicons. --- .../res/drawable/top_sites_background.xml | 17 ------------- app/src/main/res/layout/top_site_item.xml | 18 ++++++++------ app/src/main/res/values/dimens.xml | 11 +++++++-- app/src/main/res/values/styles.xml | 24 +++++++++++++++---- 4 files changed, 40 insertions(+), 30 deletions(-) delete mode 100644 app/src/main/res/drawable/top_sites_background.xml diff --git a/app/src/main/res/drawable/top_sites_background.xml b/app/src/main/res/drawable/top_sites_background.xml deleted file mode 100644 index 897429366..000000000 --- a/app/src/main/res/drawable/top_sites_background.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - diff --git a/app/src/main/res/layout/top_site_item.xml b/app/src/main/res/layout/top_site_item.xml index 65675bb34..97f178960 100644 --- a/app/src/main/res/layout/top_site_item.xml +++ b/app/src/main/res/layout/top_site_item.xml @@ -12,14 +12,18 @@ android:layout_marginBottom="@dimen/top_sites_item_margin_bottom" android:orientation="vertical"> - + app:layout_constraintTop_toTopOf="parent"> + + + diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index 88cf1973d..f559289ab 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -206,12 +206,19 @@ 48dp - 60dp - 12dp 84dp 8dp 12dp 8dp + 36dp + 0dp + 4dp + + 60dp + 12dp + 6dp + 8dp + 1dp 16dp diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 143fd6b7a..e5c2d31f2 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -600,13 +600,29 @@ 0.001 - + + + + + +