Commit Graph

41 Commits (74c1cc82fb4975f63c20a718f09367149bcc3c70)

Author SHA1 Message Date
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
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
Arturo Mejia 8ca9f94abb For issue #16557 set autoplay block audio only
by default
3 years ago
Arturo Mejia 0e8dc6164d Target Android 11 3 years ago
Christian Sadilek 3dc638700f Refactor tryReloadTabBy 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 f263b7333a For issue #16847 Show the autoplay icon in the toolbar 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 666781aa62 Fix lint warnings and test in site permissions 4 years ago
Arturo Mejia de521192e0 Add support for local storage permission 4 years ago
Grisha Kruglov 51dab196c4 Closes #15443: Use fragment's lifecycleScope for AlertDialog actions 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
Tiger Oakes a8291bf641
Remove un-needed nullables (#13816) 4 years ago
Jeff Boek 12b95b4902 For #11579 - Adds telemetry for autoplay settings in Site Permissions 4 years ago
Tiger Oakes 1ab5fe3eb9
Add method to test fragments in roboletric (#12261) 4 years ago
ekager 06e6cfa696 For #5636 - Unregisters wifiConnectedListener when setting changes, sets default blocked 4 years ago
Tiger Oakes c503798cd6 Replace PhoneFeature.getPreferenceKey 4 years ago
Tiger Oakes 45ef88f6b9 Replace requireNotNull(findPreference()) 4 years ago
Tiger Oakes 1a19b06227
Simplify `PhoneFeature` code (#10810) 4 years ago
ekager 7fe6f68e00 For #10485 - Restore block video/audio on cellular data radio button 4 years ago
Simon Chae a851b76ea3
Update Android Components version to 41.0.20200506130132 (#10443) 4 years ago
Arturo Mejia 956bf01cd5 For issue #9493: Reload after cleaning individual site permissions exceptions 4 years ago
ekager c4e83367f6 For #6832 - Fix various fragment not attached to a context crashes 4 years ago
Arturo Mejia 995da59fa8 For issue #9493: Reload after cleaning all site permissions exceptions 4 years ago
Arturo Mejia f9cc2ccfe2 For issue #8017 enable SitePermissionsWifiIntegration 4 years ago
Arturo Mejia fa9dae0d72 For issue #9364 Crash when blocking app permissions and returning to
the app
4 years ago
Severin Rudie 35a132d7ff
8017 advanced autoplay controls. (#8978)
* For #8017: add advanced autoplay controls
4 years ago
Severin Rudie 69c6de7cd4
For #8411: integrate AC permissions changes (#8618) 4 years ago
Sebastian Kaspari f0af6d6f6e Update Mozilla Android Components to 32.0.0-SNAPSHOT. 4 years ago
Sawyer Blatz 0a6881d470
For #255: Removes autoplay media feature flag (#8198) 4 years ago
Tiger Oakes c0d7bc5bd5 Use navArgs helper in fragments 4 years ago
Emma Malysz 5e9b753acb For #7473, delay inflation of toolbar
Improve performance of HomeActivity.onCreate by delaying this inflation.
We use a ViewStub and inflate the first time the actionbar is accessed.
4 years ago
Tiger Oakes b85673acac Clean up settings fragments 5 years ago
Tiger Oakes 422faaf7c0 Add toolbar helpers (#6531) 5 years ago
ValentinTimisica ef42d3e4dc Fixes #5030: Modified Dialog to match the others. (#6022)
I changed the Dialog from permissions exceptions and used AlertDialog
instead of Context.alert extension function.
5 years ago
Tiger Oakes d5c3433041 Use the new fragment constructor 5 years ago
Sawyer Blatz c8af16bd47
For #5679: Hides autoplay behind feature flag (#5685) 5 years ago
Tiger Oakes 8c30200ced Only use Context.settings() function (not getter) (#5335)
Remove unused String extensions
5 years ago
Tiger Oakes 6c30a94081 Move settings classes to packages 5 years ago