Commit Graph

50 Commits

Author SHA1 Message Date
Gabriel Luong 331dc3a8ec For #24252 - Rename secondaryText attribute to textSecondary 2022-03-14 22:08:08 +00:00
Alexandru2909 7e1edc828e For #23719 - Replace preference framework strings with string resources 2022-03-14 07:12:57 +00:00
Geordan Neukum 23036680c2 For #16395 - Use Secondary Text for the Site Permissions subtext 2022-02-05 20:10:25 +00:00
Arturo Mejia 277e94881b For #22995: Address crash when switching languages. 2022-01-04 21:13:00 +00:00
Mugurell 34c0a17b4d For #22852 - Add a new "Storage access" permission 2021-12-21 17:45:19 +00:00
Gabriel Luong 76c746b982 For #21776 - Remove unnecessary type argument 2021-10-26 18:26:50 +00:00
Gabriel Luong 1039a92281 For #21776 - Remove reductant SAM constructor 2021-10-26 18:26:50 +00:00
Sebastian Kaspari 971b419d77 Run ktlintFormat to adapt to latest formatting rules. 2021-07-30 11:58:02 +00:00
mcarare cca7892e91 For #17917: Use View binding in settings screens. 2021-07-30 08:20:58 +00:00
Roger Yang 74c1cc82fb Closes #19921: Update appcompat and fragment dependencies to 1.3.x 2021-06-22 01:39:52 +00:00
Arturo Mejia 251bfc7fe9 Improvements to site permissions 2021-06-21 17:21:16 +00:00
Arturo Mejia 2f879f8e9d Fix site permissions breaking changes 2021-06-09 16:34:42 -04: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
Arturo Mejia 8ca9f94abb For issue #16557 set autoplay block audio only
by default
2021-04-07 07:04:59 -04:00
Arturo Mejia 0e8dc6164d Target Android 11 2021-02-24 14:26:08 -05:00
Christian Sadilek 3dc638700f Refactor tryReloadTabBy to use browser store 2021-02-02 17:13:13 -05:00
Arturo Mejia b9bdc288cb For issue: #16846 Add ui for controlling exceptions for auto play 2021-01-15 15:51:31 -05:00
Arturo Mejia f263b7333a For issue #16847 Show the autoplay icon in the toolbar 2020-12-13 19:03:01 -05:00
Emilio Cobos Álvarez 9d5afd501e Add support for EME permission.
This accompanies the changes in mozilla-mobile/android-components#9121.

Closes #1175
2020-12-08 14:19:01 -05:00
Jonathan Almeida 666781aa62 Fix lint warnings and test in site permissions 2020-10-08 19:37:56 -04:00
Arturo Mejia de521192e0 Add support for local storage permission 2020-10-08 19:37:56 -04:00
Grisha Kruglov 51dab196c4 Closes #15443: Use fragment's lifecycleScope for AlertDialog actions 2020-09-30 17:42:40 -07:00
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
2020-09-08 13:55:01 -07:00
Tiger Oakes a8291bf641
Remove un-needed nullables (#13816) 2020-08-28 13:28:08 -07:00
Jeff Boek 12b95b4902 For #11579 - Adds telemetry for autoplay settings in Site Permissions 2020-07-29 15:10:25 -07:00
Tiger Oakes 1ab5fe3eb9
Add method to test fragments in roboletric (#12261) 2020-07-06 13:04:43 -07:00
ekager 06e6cfa696 For #5636 - Unregisters wifiConnectedListener when setting changes, sets default blocked 2020-06-23 12:28:52 -04:00
Tiger Oakes c503798cd6 Replace PhoneFeature.getPreferenceKey 2020-06-18 09:02:58 -04:00
Tiger Oakes 45ef88f6b9 Replace requireNotNull(findPreference()) 2020-06-18 09:02:58 -04:00
Tiger Oakes 1a19b06227
Simplify `PhoneFeature` code (#10810) 2020-06-08 13:02:42 -07:00
ekager 7fe6f68e00 For #10485 - Restore block video/audio on cellular data radio button 2020-05-08 14:00:09 +03:00
Simon Chae a851b76ea3
Update Android Components version to 41.0.20200506130132 (#10443) 2020-05-06 13:17:17 -04:00
Arturo Mejia 956bf01cd5 For issue #9493: Reload after cleaning individual site permissions exceptions 2020-04-24 06:16:32 -04:00
ekager c4e83367f6 For #6832 - Fix various fragment not attached to a context crashes 2020-04-22 20:56:35 -07:00
Arturo Mejia 995da59fa8 For issue #9493: Reload after cleaning all site permissions exceptions 2020-04-22 08:53:07 -04:00
Arturo Mejia f9cc2ccfe2 For issue #8017 enable SitePermissionsWifiIntegration 2020-03-27 20:44:16 -04:00
Arturo Mejia fa9dae0d72 For issue #9364 Crash when blocking app permissions and returning to
the app
2020-03-24 13:44:54 -07:00
Severin Rudie 35a132d7ff
8017 advanced autoplay controls. (#8978)
* For #8017: add advanced autoplay controls
2020-03-20 12:10:42 -07:00
Severin Rudie 69c6de7cd4
For #8411: integrate AC permissions changes (#8618) 2020-02-25 07:36:19 -08:00
Sebastian Kaspari f0af6d6f6e Update Mozilla Android Components to 32.0.0-SNAPSHOT. 2020-02-10 17:13:58 +01:00
Sawyer Blatz 0a6881d470
For #255: Removes autoplay media feature flag (#8198) 2020-02-07 10:22:37 -05:00
Tiger Oakes c0d7bc5bd5 Use navArgs helper in fragments 2020-02-05 16:37:45 -08:00
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.
2020-01-24 15:21:42 -08:00
Tiger Oakes b85673acac Clean up settings fragments 2019-12-19 14:29:28 -08:00
Tiger Oakes 422faaf7c0 Add toolbar helpers (#6531) 2019-11-25 15:36:47 -05:00
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.
2019-10-21 09:59:04 -07:00
Tiger Oakes d5c3433041 Use the new fragment constructor 2019-10-07 11:07:48 -07:00
Sawyer Blatz c8af16bd47
For #5679: Hides autoplay behind feature flag (#5685) 2019-09-30 12:01:04 -07:00
Tiger Oakes 8c30200ced Only use Context.settings() function (not getter) (#5335)
Remove unused String extensions
2019-09-24 10:33:46 -07:00
Tiger Oakes 6c30a94081 Move settings classes to packages 2019-09-20 12:36:15 -07:00