Commit Graph

30 Commits (1f633edd7d4436f20ead4ba657b1284b94cca0c6)

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>
2 years ago
mcarare 74eb9b9c1b For #24148: Remove wrapper from tracking protection metrics. 2 years ago
mcarare 305b527b05 For #23256: Close quick settings sheet when displaying clear dialog. 2 years ago
mcarare 0496249fe4 For #23256: Pass navController instance instead of lambda. 2 years ago
aime Soriano Pastor 9bfc94b793 For #9294: Add option to clear current site data in quick settings dialog. 2 years ago
Arturo Mejia 512475df9e For #19886 integrate view binding. 3 years ago
Gabriel Luong d1b9744069 For #19886 - Add a back navigation to the Global Quick Settings from the Tracking Protection dialog 3 years ago
Arturo Mejia 34d99f89ac For #19886 - Improve quick setting dialogs navigation 3 years ago
Arturo Mejia 07bb1113f8 For #19886 - Add connection sub-menu. 3 years ago
Gabriel Luong 61dfb40339 For #19886 - Handle toggling tracking protection in quick settings 3 years ago
Gabriel Luong cad0e110dd For #19886 - Add navigation from quick settings to tracking protection panel 3 years ago
Roger Yang 74c1cc82fb Closes #19921: Update appcompat and fragment dependencies to 1.3.x 3 years ago
Arturo Mejia 251bfc7fe9 Improvements to site permissions 3 years ago
Arturo Mejia 2f879f8e9d Fix site permissions breaking changes 3 years ago
Sebastian Kaspari 4753a1d494 Complete browser-state migration and remove browser-session dependency.
Co-authored-by: Christian Sadilek <christian.sadilek@gmail.com>
3 years ago
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
Christian Sadilek 54da078bd3 Refactor QuickSettingsDialog to use browser store 3 years ago
Arturo Mejia 00d971e9d3 For #16847: Allow autoplay to controlled via the toolbar. 3 years ago
Tiger Oakes 9a8b800a76 For #8621 - fix intermittent test failures 4 years ago
Tiger Oakes 1a19b06227
Simplify `PhoneFeature` code (#10810) 4 years ago
Dennis Schubert d046d908fc Bug 1643132 - Remove native "Report site issue" functionality.
This will be replaced by the WebCompat team's system extension that ships as an android-component.
4 years ago
Arturo Mejia 56bb3e38ec For issue #10142 Update sitePermissions state when toggling its value 4 years ago
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
4 years ago
Severin Rudie 69c6de7cd4
For #8411: integrate AC permissions changes (#8618) 4 years ago
Rushab Kumar e6791b5c08 For #7154 - Fix crash when tapping on "Blocked" in the site info panel (#7404) 4 years ago
Emily Kager d9615108ee For #6354 - Removes ETP Experiment, Removes Feature Flags, Sets Strict Default 5 years ago
ekager 18c0525ff6 Use new API for ETP Exceptions 5 years ago
Mugurell c5739df969 For #4126 - Add tests for the new classes resulting from refactoring
Used runBlocking to ensure we wait for the code using coroutines to execute
instead of runBlockingTest and join() since this last option led to failed
tests in CI because of
"java.lang.IllegalStateException: This job has not completed yet".
5 years ago
Mugurell 9f56624788 For #4126 - Document the newly introduced public APIs
Now that the code should be in a ready-to-ship form it would be nice to have
all the major functionalities properly documented.
5 years ago
Mugurell d70afcaa90 For #4126 - Handle all business logic with Interactors and a Controller
Combined all Stores into one for all Views shown in on Fragment.
Used a static `createStore()` which will build the initial state residing
inside the Store and not in the Fragment as to decouple the Fragment from the
business logic needed to build all the needed initial States.
Added Interactors that handle a MVI View's business logic for
TrackingProtectionView and WebsitePermissionsView.
WebsiteInfoView doesn't register any user input events and does not have any
reason to change while it is displayed so it does not have an Interactor.
The two Interactors will delegate Fragment's QuickSettingsController for
complex Android interactions, communication with other app features or for
Store updates.
Also refactored the stubs from the previous commit so that with this commit the
the quicksettings feature should all be working now based on lib-state.
5 years ago