Commit Graph

116 Commits (990bfa7e6dd5894d61473a41da6129e6947974e2)

Author SHA1 Message Date
MarcLeclair 990bfa7e6d
16900 make navgraph inflation asynchronous (#18889)
* For #16900: implement async navgraph inflation

For #16900: removed nav graph from xml

For #16900: inflate navGraph programatically

For #16900: Made NavGraph inflation asynchronous

For #16900: Changed to block with runBlocking

For #16900: Refactored blocking call into a function

For 16900: NavGraph inflation is now async

We now attach the nav graph (or check if its attached) on every nav call ( an extension function for NavController).
This is done by checking the value of the job stored in PerfNavController.map which keeps track of the job with the NavController as a Key.
If the job hasn't been completed, it will block the main thread until the job is done. The job itself is responsible for attaching the navgraph
to the navcontroller (and the inflation of the latter too)

For 16900: rebased upstream master

For 16900: Rebase on master

For #16900: Fixed Async Navgraph navigation per review comments.

1)The Asynchronous method is now found in NavGraphProvider.kt. It creates a job on the IO dispatcher
2)The Job is tracked through a WeakHashMap from Controller --> NavGraph
3)The Coroutine scope doesn't use MainScope() anymore
4)The Coroutine is cancelled if the Activity is destroyed
5)The tests mockk the blockForNavGraphInflation method through the FenixReoboelectricTestApplication instead of calling the mock every setup()

For #16900: inflateNavGraphAsync now takes navController

For #16900: Pass lifecycleScope to NavGraphProvider

For #16900: removed unused mock

For #16900: Added linter rules for navigate calls

We need linting rules to make sure no one calls the NavController.navigate() methods

For #16900: Added TestRule to help abstract the mocks in the code

For 16900: Fix linting problems

For #16900: Cleaned duplicated code in tests

For #16900: cleaned up NavGraphTestRule for finished test

For #16900: had to revert an accidentally edited file

For #16900: rebased master

* For #16900: Review nits for async navgraph

This is composed of squash commits, the original messages can be found below:

-> DisableNavGraphProviderAssertionRule + kdoc.

Use test rule in RobolectricApplication.

Fix failing CrashReporterControllerTest

Fix blame by -> navigate in tests.

This commit was generated by the following commands only:
```
find app/src/test -type f -exec sed -i '' "/import org.mozilla.fenix.ext.navigateBlockingForAsyncNavGraph/d" {} \;
find app/src/test -type f -exec sed -i "" "s/navigateBlockingForAsyncNavGraph/navigate/g" {} \;
git checkout app/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker
```

Fix various blame

This is expected to be squashed into the first commit so, if so, it'd
fix the blame.

Move test rule to helpers pkg.

add missing license header

Add import change I missed

fix unused imports

Replace robolectricTestrunner with test rule.

Improve navGraphProvider docs

Remove unnecessary rule as defined by robolectric.

add clarifying comment to robolectric

remove unnecessary space

* For #16900: nit fixes for MozillaNavigateCheck and lint fixes

3 squash commits:
 *Changed violation message and fixed the lint rule for MozillaNavigateCheck
 *Added suppression to NavController.kt
 *Fixed detekt violations

* For 16900: Fixed failing tests

Co-authored-by: Michael Comella <michael.l.comella@gmail.com>
3 years ago
Gabriel Luong 37b6079d83
For #18268, #18269 - [Saved cards] Display a list of Saved cards fetched from the credit card storage (#18808) 3 years ago
Arturo Mejia 8ca9f94abb For issue #16557 set autoplay block audio only
by default
3 years ago
Gabriel Luong 1008ca2b4a
For #18265 - [Add card] Integrate the credit card storage and handle adding a new credit card (#18719) 3 years ago
mcarare 90fea8ba5e For #17790: Remove app from recents screen on quit. 3 years ago
Elise Richards 559cf54798
For #17190: notifications are updated when locale is changed (#18179)
* Add intent processor for locale changes

* Recreate notification and notify in the service

* Use locale use cases to update notification

* Use notification id instead of tag

* Add locale use cases and restore locale in application

* Send locale to service instead of string

* Controller tests for locale

* Update Android Components version to 74.0.20210323143308

Co-authored-by: Arturo Mejia <arturomejiamarmol@gmail.com>
3 years ago
mcarare 1f96887f96 For #12528: Provide fallback values for locale display name. 3 years ago
Gabriel Luong a31ce9bf67
For #18241 - Refactor SyncLoginsPreferenceView to SyncPreferenceView for reusability (#18383)
This refactors SyncLoginsPreferenceView to SyncPreferenceView so that it be can be used in the
Credit cards preference for the equivalent "Sync cards across devices" preference.
3 years ago
Gabriel Luong ccbca2cf78 For #18202 - Refactor BiometricPromptFeature out of logins into settings 3 years ago
Sebastian Kaspari 0c41316c31 Revert "For #17044: Explicitly set a new default engine when default is deleted."
This reverts commit 633bf384e2.
3 years ago
mcarare 633bf384e2 For #17044: Explicitly set a new default engine when default is deleted. 3 years ago
Kate Glazko ae528e5ab2 For #15181: Remove All Downloads From Settings 3 years ago
Christian Sadilek 54da078bd3 Refactor QuickSettingsDialog to use browser store 3 years ago
Arturo Mejia b9bdc288cb For issue: #16846 Add ui for controlling exceptions for auto play 3 years ago
Arturo Mejia a6495347fd For issue #17457: Prevent page refresh when tapping the security icon 3 years ago
Arturo Mejia 00d971e9d3 For #16847: Allow autoplay to controlled via the toolbar. 3 years ago
Mihai Adrian Carare 3bb074b133
For #13522: Also remove history entries from tab history. (#17392)
* For #13522: Also remove history entries from tab history.

* For #13522: Test that deleting history also removes it from tab history.
3 years ago
mcarare e24ec1c941 For #16068: Update SUMO links. 4 years ago
Emilio Cobos Álvarez 9d5afd501e Add support for EME permission.
This accompanies the changes in mozilla-mobile/android-components#9121.

Closes #1175
4 years ago
Jonathan Almeida 78715c3020
For #13477 - Move BiometricPrompt to a separate feature (#16498)
Instead of simply fixing the memory leak for this issue by directly
removing references, it makes more sense to move the whole
BiometricPrompt out of the fragment and into it's own feature to be
re-usable.
4 years ago
ekager 9bb3440fce No issue: Make sure we are cleaning up test coroutines 4 years ago
ekager d5cb9c599c
For #15910 - Adds back automatic toggle, disables slider when enabled (#16070) 4 years ago
Gabriel Luong 412b412d5f
For #15796 - show device language under follow device language (#15966) 4 years ago
ekager 881e3d6ccd For #14923 - Removes auto size preference toggle 4 years ago
Jonathan Almeida 666781aa62 Fix lint warnings and test in site permissions 4 years ago
Grisha Kruglov 51dab196c4 Closes #15443: Use fragment's lifecycleScope for AlertDialog actions 4 years ago
Christian Sadilek ced92d69d1 Issue #15555: Set channel to Nightly explicitly for SettingsFragmentTest 4 years ago
Christian Sadilek 4a06e40e70 Closes #15555: Intermittent failures in SettingsFragmentTest 4 years ago
Tiger Oakes acbad66f45 Add test for initial logins list state 4 years ago
Christian Sadilek d4ab728cff For #14034: Add debug preference to override AMO collection in Nightly 4 years ago
Elise Richards 1adf467248
For #14280, #14743: Remove old search fragment (#15169)
* Remove search fragment

* Use new folder to search dialog

* Rebase and lint

* Update tests with search dialog nav directions

* Rename interactor to match naming convention. Remove old controller and point everything to the dialog controller.
4 years ago
Elise Richards 9afe9679d8
For #15079: handle QR permissions when changed in Android settings (#15097)
* Define intent data for activity

* Search dialog shows permissions for allow and deny camera

* Check camera permissions for fxa pairing

* Check camera permissions for old search

* Tests for pairing sync interactor and controller.

* Cleanup

* Use bool pref for setting. Use interfaces and default implementations for the sync interactor and controller.

* Lint
4 years ago
ekager 09fbb43f80 For #2486 - Adds Recently Closed Tabs 4 years ago
Tiger Oakes 113241e8ce
Enforce IO thread inside of components (#14704)
* Automatically run PermissionStorage on IO thread

* Run TabCollectionStorage on dedicated scope + IO

* Update findSitePermissionsBy calls
4 years ago
Mugurell acdef76b71 For #12980 - Clear icons when deleting browsing data 4 years ago
Mugurell 75c496f237 For #13037 - Cleanup - have the camera check in just one place
This patch reverts a previous commit for the issue which added the camera check
in two places.
With a new solution to check if the device has camera only in
TurnOnSyncFragment we need to cleanup the previous checks.
4 years ago
Gilbert Gilb's 9430546d12 for #7584 - fix about libraries toolbar theme
fixes #7584 #13970
4 years ago
Gilbert Gilb's 2743c37b40 Add custom Activity to show libraries licenses.
As Google's library for showing licences isn't open-source, this commit
reimplements its main Activity. This is in prevision to having an OSS
flavor of fenix.

We chose to not introduce dependencies to third-party libraries
such as AboutLibraries for now, and we'll stick to using Google's gradle
plugin for the dependencies extraction.

Fixes #7584

See also #162
4 years ago
Tiger Oakes f3f470a977
For #13140: Use concept-menu for saved logins menu (#13143) 4 years ago
Mugurell ab2ea8e682 For #13037 - Use email to sign in to fxa if device has no camera
App can be installed on devices with no camera modules. Like Android TV boxes.
Will skip presenting the option to sign in by scanning a qr code in this case
and default to login with email and password.
4 years ago
Tiger Oakes 1a51b7f874 For #13084 - Use runBlockingTest 4 years ago
ekager 1497e4886e For #13084 - Update SavedLoginsStorageControllerTest 4 years ago
mcarare 048f6a49fe For #12565: Pass passwordsStorage instead of context in constructor. 4 years ago
mcarare 4b74ff186b For #12565: Remove context from DeleteBrowsingDataController constructor 4 years ago
Tiger Oakes d3a07e95c9 For #12565: Don't pass contest to SortingStrategy 4 years ago
Arturo Mejia 6530a45eb9
For issue #11676: Features phone that doesn't a site permission exception shouldn't be shown (#12855)
exception shouldn't be shown
4 years ago
Tiger Oakes d9357f1e32 For #12801 - Extra debug menu trigger, disable if already triggered 4 years ago
Tiger Oakes c08d375c18
Move settings in components (#12675) 4 years ago
Tiger Oakes 51937e73fc
Closes #10924 - Cleanup SavedLoginsAuthFragment (#10930) 4 years ago
Tiger Oakes eed20b43b9
Test session control controller (#12652) 4 years ago