Commit Graph

29 Commits

Author SHA1 Message Date
Brais Gabín 1f633edd7d For #23046 - Align detekt config between Fenix and Android Components
Co-authored-by: Gabriel Luong <gabriel.luong@gmail.com>
2022-03-29 00:03:06 +00:00
Gabriel Luong 6d1d4bea93 For #21776 - Remove redundant qualifier name 2021-10-26 18:26:50 +00:00
Sebastian Kaspari 170fa9705e Update Kotlin and Jetpack Compose versions. 2021-10-25 17:59:17 +02:00
mcarare cca7892e91 For #17917: Use View binding in settings screens. 2021-07-30 08:20:58 +00:00
Sebastian Kaspari 8b5aef7def Update Kotlin to 1.5.10 (and Coroutines to 1.5.0). 2021-07-19 09:20:50 +00:00
Roger Yang 74c1cc82fb Closes #19921: Update appcompat and fragment dependencies to 1.3.x 2021-06-22 01:39:52 +00:00
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>
2021-04-13 20:48:45 -04:00
Kate Glazko ae528e5ab2 For #15181: Remove All Downloads From Settings 2021-01-19 14:21:44 -08:00
Grisha Kruglov 51dab196c4 Closes #15443: Use fragment's lifecycleScope for AlertDialog actions 2020-09-30 17:42:40 -07:00
ekager 09fbb43f80 For #2486 - Adds Recently Closed Tabs 2020-09-11 12:02:30 -07:00
Jeff Boek 66ecc15b40 For #14543 - Prevents IllegalStateException by not moving to another thread 2020-09-09 13:21:49 -07:00
Mugurell acdef76b71 For #12980 - Clear icons when deleting browsing data 2020-08-28 10:28:48 +03:00
mcarare 4b74ff186b For #12565: Remove context from DeleteBrowsingDataController constructor 2020-07-29 17:46:43 +03:00
mcarare 4bebc56c50 For #9229: Remember options for delete browsing data. 2020-06-19 09:32:37 +03:00
Tiger Oakes a7e74e308b
Migrate some SessionManager usage to BrowserStore (#10789) 2020-06-03 11:18:44 -07:00
Simon Chae a851b76ea3
Update Android Components version to 41.0.20200506130132 (#10443) 2020-05-06 13:17:17 -04:00
Jeff Boek 4cbb9aebaf
Cleans up nav_graph.xml (#9829)
* For #9751 - Cleans up homeFragment directions

* For #9751 - Uses global actions for fragments not owned by homeFragment

* For #9751 - Cleans up SearchFragment directions

* For #9751 - Removes settings action from DeleteBrowsingDataFragment

* For #9751 - Removes browser action from SettingsFragment

* For #9751 - Adds ManagePhoneFeature global action

* For #9751 - Clean up unused deletebrowsingfragment actions

* For #9751 - Cleans Up HistoryFragment actions

* For #9751 - Removes Home -> Search action

* For #9751 - Removes the Bookmark -> Browser action

* For #9751 - Cleans up bookmark fragment actions

* For #9751 - Cleans up actions from ShareController

* For #9751 - Removes defaultBrowserFragment to browserFragment action

* For #9751 - Removes about -> browser action

* For #9751 - Adds global action to TrackingProtectionFragment

* For #9751 - Removes exception -> browser action

* For #9751 - Removes login -> browser action

* For #9751 - Fixes LoginFragment directions

* For #9751 - Removes ExternalAppBrowser directions

* for #9751 - Cleans up actions

* For #9751 - Fixes unit tests

* For #9751 - Addresses nits in PR
2020-04-13 21:43:45 -07:00
ekager b8fba63be4 For #9890 - Do not display full screen snackbar with toolbar padding 2020-04-13 14:56:51 -07:00
Sawyer Blatz e3ed7ed268
Issue #9128 & #9222 & #9499: Refactors snackbar creation and fixes placement (#9628) 2020-04-02 12:30:13 -07:00
Jeff Boek 5c6e6ddfb7 For #4807 - Always navigate to settings after deleting data 2020-02-18 13:30:32 -08:00
Kaaira Gupta 08cce8cf58 for #7421 :removed collection from clear browsing history 2020-01-21 19:00:59 -08:00
kglazko 8ed14ac062
Issue 5736 Improve pop behavior after deleting tabs in settings (#7478) 2020-01-08 10:27:14 -08:00
Sawyer Blatz c7c4ad051a
For #6413: Adds more snackbar positioning logic (#7444)
* For #6413: Adds more snackbar positioning logic

* Refactor
2020-01-02 14:31:52 -08:00
Mihai Adrian 6e9769a81b For #7031 - Hide progress bar when leaving DeleteBrowsingDataFragment (#7056) 2019-12-10 11:17:45 -05:00
Tiger Oakes 422faaf7c0 Add toolbar helpers (#6531) 2019-11-25 15:36:47 -05:00
Shangeeth Sivan d223a0bd35 Closes #5465: Added OnCheckListener to all checkboxes ,when there are no items checked delete button will be disabled (#6098) 2019-10-21 09:57:29 -07:00
Tiger Oakes d5c3433041 Use the new fragment constructor 2019-10-07 11:07:48 -07:00
Sawyer Blatz eb3c9f86e2
No issue: Removes feature flags for delete data (#5738) 2019-10-02 10:43:37 -07:00
Tiger Oakes 6c30a94081 Move settings classes to packages 2019-09-20 12:36:15 -07:00