When using talkback, the focus keeps jumping between the dismiss
button and the "Find in page" edit text. Seems like giving up
the view stub fixes this issue. Considering that the view inflation
performance wins are rather small for such added complexity,
we have given up the view stub.
* Bug 1820211 - Adds `tabKilled` event to track when a tab was killed with form data.
- Also includes if the tab was the active tab and whether the app was in the foreground.
* Bug 1820211 - Adds tests for TelemetryMiddleware and StoreLifecycleObserver
* Bug 1820211 - Renames CheckFormDataAction to UpdateHasFormData
- Removes @property hasFormData comment from sessionState
- Moves checking formdata from TabContentMiddleware to SessionPrioritizationMiddleware
---------
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Bug 1817245 - new Nimbus feature for controlling client-deduplication ping
This feature will enable/disable the sending of the `client-deduplication`
ping that will be added in a later PR.
* Bug 1817029 - Add the client-deduplication ping
The `client-deduplication` ping will be used to determine if
client IDs are being regenerated erroneously. This ping uses
the lifecycle observers to (almost) replicate the same scheduling
as the baseline ping.
* Bug 1817029 - Suggested changes
changelog
- add `reason` for new ping
- update the unit test for the new ping
- add new metrics
- allow for custom salt when hashing the Ad ID
- move the Nimbus check to the lifecycle observer
- record the new metrics
* Bug 1817029 - Update fenix/.experimenter.yaml
Co-authored-by: Alessio Placitelli <alessio.placitelli@gmail.com>
* Bug 1817029 - remove unnecessary pass-through function
* Bug 1817029 - add the GleanTestRule for tests
* Bug 1817029 - Update fenix/app/src/test/java/org/mozilla/fenix/components/metrics/clientdeduplication/ClientDeduplicationPingTest.kt
Co-authored-by: Travis Long <tlong@mozilla.com>
* Bug 1817029 - remove unnecessary call to main thread
* Bug 1817029 - update comment about hashing
---------
Co-authored-by: Alessio Placitelli <alessio.placitelli@gmail.com>
Co-authored-by: Travis Long <tlong@mozilla.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This also upgrades to use the large android worker since unit tests
take over 60mins to run otherwise.
Two tests in BrowserFragmentTest relied on FeatureFlags that are
dependent on the environment. Refactored those in line with our
other tests e.g., the SettingsFragmentTest.
BrowsersCacheTest will need some more work and is covered by a ticket.
AppRequestInterceptorTest just needed an additional mock.
* Bug 1810631 - Display name instead of e-mail in menu.
* Bug 1810631 - Display name instead of e-mail in menu
---------
Co-authored-by: gitstart <gitstart@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Change IntentReceiverActivity so that if the incoming intent has the private_browsing_mode extra set to true, it overrides the openLinksInAPrivateTab setting. This allows external apps to set this flag for sites they want opened in a private app explicitly.
External apps cannot force the link to open in a non-private tab if openLinksInAPrivateTab is enabled, in that case the extra will be ignored.
This is similar to an old fennec feature ( https://bugzilla.mozilla.org/show_bug.cgi?id=1347583 ), however I used the "private_browsing_mode" extra name since it already appears in the code, instead of the "private_tab" extra that fennec used.
Bugzilla bug is 1807531, GitHub bug is #26158
Restore showing a different description of the Tracking Protection feature in
application's onboarding if the Total Cookie Protection feature is not yet
public.
The new description mentioning Total Cookie Protection will only be shown if
the Total Cookie Protection CFR is to also be shown.
While debugging a UI test, we found that the messaging feature was being
queried during the storage initialization and acting on the cached value
alone. This could lead us to no longer receiving new messages during the
app lifetime.
For the unit tests, we switched from mocking the entire feature to
mocking just the `FeaturesInterface` as the test was providing
false-positive results. It's better to create a real feature in any case
for the other testing needs.
Co-authored-by: Benjamin Forehand Jr <bennyjr169@gmail.com>
* For 1811851: Change MessageNotificationWorker.kt to handle when a user clicks or dismisses a Notification.
* For 1811851: Re-work based on review
---------
Co-authored-by: t-p-white <t-p-white>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This comes to solve the issue seen in the error logs by adding the anchor
change done for the snackbar to the operation queue on thread Main thread.
Should allow to avoid chaning the snackbar's anchor in between onMeasure and
onLayout.
* For https://github.com/mozilla-mobile/fenix/issues/25588, hide password in android 13 clipboard preview
This patch hide passwords copied from "Saved logins" in android 13 clipboard preview
Closes https://github.com/mozilla-mobile/fenix/issues/25588
* fix: show a toast for android 12 and lower
* For mozilla-mobilehttps://github.com/mozilla-mobile/fenix/issues/25588, hide password in android 13 clipboard preview
* fix: move metrics to new listeners
* fix: actually move metrics to new listeners
---------
Co-authored-by: cschanaj <cschanaj@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Everywhere the toolbar which needs to show autocomplete suggestions is used we
show a `ToolbarView`. So instead of having this configurable in 2 or more
places as it happened before the autocomplete functionality is configured only
from the `ToolbarView` class.
It will contain a `ToolbarAutocompleteFeature` that will be immediately updated
with the appropriate autocomplete providers or remove all such providers to
immediately update the current autocomplete or remove it entirely depending on
the new search engine selected.
Depending on the selected search engine:
- if it is a topic specific one show bookmarks and tabs from just the it's host
domain
- if it is a general one then don't show bookmarks and tabs at all
- if it is the default search engine then show all bookmarks and tabs.
Previously the check for the "Search -> Show search suggestions" user setting
was only used in the default SearchFragmentState but not again if users change
the current search engine as part of the unified search feature.
This comes to ensure that that check is always made when needing to configure
new search engine results.
For all search engines minus the application added ones we will also show past
search terms used for previous searches with the currently selected search
engine.
If the current search engine is not one added by the application and not the
default one then:
- if it is a topic specific one show history from just the it's host domain
- if it is a general one then don't show history at all
- if it is the default search engine then show all history.
This uses the same direction as the before patch - inflating a new View that
can then serve as an anchor for the Snackbar.
Here we could use directly the AC layout as it needed no special customization.
Tried to mimic the UX of a modal dialog while using Android Views.
This meant including a scrim that would consume all touches and theming the
navigation bar and status bar.
Avoiding a dialog and a separate window will allow the snackbar to see the
new "dialog" as a sibling in a CoordinatorLayout parent and so be able to
position itself based on the new "dialog".
This patch also added "start_download_dialog_layout" from A-C as it leads to
simpler and less code needed to style the layout - colors / shapes with
everything happening in XML versus calculating the values then setting them
programatically.
Previously Android-Components - BrowserToolbarBehavior would be responsible
for positioning the snackbar above the toolbar.
With that responsibility removed we can handle in Fenix positioning the
snackbar depending on the toolbar and many more cases - like positioning it
depending on the download dialogs.
* For 1809444: Added a MessageNotificationWorker to poll Nimbus for new messages and create a notification configured using the highest priority new message (if available).
* For 1809444: Changes from PR review
Co-authored-by: t-p-white <t-p-white>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Since the crash was caused by having the current tab set as inactive
while the user was still able to see it, now we ignore the current
tab if it is selected to be set as inactive.
* Move messaging fml to a separate file
* Add surface property to message data
* Get messages for just a single surface
* Add surface to messaging middleware
* ktlint
* Add tests for filtering by surface
* Add homescreen to default-browser message
* Move surface param to MessageActions instead of MessagingMiddleware
* Added computed property for surface to message
* ktlint
* Address reviewer comment
* Fixup tests
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
The engine icon was set after the screen was visible leading to a delay.
With this solution, the icon will be set before the screen is visible
eliminating any visible artefacts.