Commit Graph

164 Commits (2380d518081c7e003b8737bfd18af40d414ef8ee)

Author SHA1 Message Date
Christian Sadilek e89f7008a6 Suppress TooGenericExceptionCaught for NimbusApi.withExperiment
(cherry picked from commit 68a761388a)
3 years ago
James Hugman 3a8763d3ff Re-instate catch-all to withExperiment
(cherry picked from commit 5981a92148)
3 years ago
Christian Sadilek 3a57188c35 Fix lint/detekt issues 3 years ago
James Hugman ab678a21ff Add an experiment to demontrate the Feature API
This is not visible in production, but only debug. It shows three variables
being used to change the settings screen (title, icon and title-punctuation).
3 years ago
Elise Richards 279d59897c
For #18264 - Add biometric prompt to credit card settings (#19505) 3 years ago
Mihai Adrian Carare 11efbaacc4
For #18507 - Prevent screenshots on credit card screens. (#19560) 3 years ago
mcarare 4dd4e35982 For #19258: Replace default Android back button with a custom icon. 3 years ago
Gabriel Luong 6eb528f912
For #18272 - [Edit card] Display a saved card information in the Edit card screen (#18884) 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
Gabriel Luong 15fc01c7f9 Update app/src/main/java/org/mozilla/fenix/ext/Activity.kt 3 years ago
Arturo Mejia be7318f608 For #18608 made set a default browser functionality publicly available. 3 years ago
Arturo Mejia 54db8f3fde Revert "For #17805 - Fix adjustResize deprecation (#18252)"
This reverts commit 38f906a6
3 years ago
Michael Comella 5c0f30fd5c For #18426: add TimingDistributionMetricType.measureNoInline.
This addresses an issue I found in my follow-up PR.
3 years ago
Codrut Topliceanu 38f906a685
For #17805 - Fix adjustResize deprecation (#18252)
* For #17805 - Fix adjustResize deprecation

To handle the deprecation of `adjustResize` I've moved it from `styles.xml` and `AndroidManifest.xml` to `Activity.kt` as a fallback for devices with Android < 11. For Android 11 and up `setDecorFitsSystemWindows(false)` and `OnApplyWindowInsetsListener` will be used to handle app insets. Normal use activities should call `enableSystemInsetsHandling` in `onCreate` as to properly display system bars and for proper keyboard handling.
3 years ago
Jonathan Almeida fbe73cfc1d For #17804: Use enterToImmersiveMode from support-ktx component 3 years ago
mcarare 8c519994f0 For #18312: Do not update secure flag on pausing logins fragments.
The flags are already properly set for activity and thus for other fragments.
3 years ago
Arturo Mejia 0e8dc6164d Target Android 11 3 years ago
Sebastian Kaspari f4f5e4b663 Issue #17174: Remove usage of old media APIs. 3 years ago
ekager f5b068a453 For #17785 - Use screenshots setting when adding secure flag 3 years ago
Grisha Kruglov ebca575e26 Reuse helper functions in bookmark tests 3 years ago
Hakkı Kaan Çalışkan e41cc5a414 For #17303: Move ext fun runIfFragmentIsAttached to utils
move to ext
3 years ago
jhugman 9a984f10f1
Add withExperiment extension method to Nimbus (#16926) r=christian, sebastian
* Fixes #16925 Add withExperiment extension method to Nimbus
* Don't call Nimbus at all if not enabled by FeatureFlag
4 years ago
Sebastian Kaspari 2b759e9d6f Integrate new search code from Android Components into Fenix. 4 years ago
Mihai Adrian Carare 85dd2f8313
For #16511 - Change a11y parent of button without breaking the tab list. (#16555) 4 years ago
mcarare d45bdfb0f4 For #16477: Switch to using an extension to update a11y collection info. 4 years ago
mcarare e2322a18f9 For #16477: Migrate updateAccessibilityCollectionItemInfo to extension. 4 years ago
mcarare c427ebf8d5 For #16416: Remove save to collection button from tab a11y list. 4 years ago
MarcLeclair 7b1af41b40
15278 detekt rule runblocking (#15942)
* For #15278: added CoroutineManager to count runBlocking calls

* For #15278: Added actual detekt rule for runblocking and its config to the yaml

* For #15278: Added unit test for RunblockingCounter

* For #15278: renamed StrictModeStartupSuppressionCountTest.kt to PerformanceStartupTest.kt and added runBlockingCount test

* Lint fix

* For #15278: made runblocking a Long to prevent overflow

* For #15278: fixed MozRunblocking name, description and moved RunBlockingCounter to perf package

* For #15278:Renamed MozillaRunblockingCheck to MozillaRunBlockingCheck

* For #15278: Added setup for unit test, since it failed without restting counter

* For #15278: Fixed naming for RunBlocking lint check

* For #15278: removed changes made to test to use runBlockingIncrement

* For #15728: added test exclusion for runBlocking check

* For #15278: changed null check and added Synchronized to count setter

* For #15278: fix for nits

* For #15278: added StartupExcessiveResourceUseTest to CODEOWNERS

* For #15278: fixed for nits

* For #15278: Moved increment function to extension function and fixed indentation

* For #15278: Added tests for Atomic Integer extension and nit fix
4 years ago
Sebastian Kaspari 2da24cd91d
Update Android Components, Kotlin, Gradle plugin (#16021)
* Closes #13262: Update AGP to 4

* Update to Mozilla Android Components 63.0.20201019090011.

* Update Kotlin to 1.4.10 and Coroutines to 1.3.9.

* Fix new compiler warnings.

* Fix compilation of lint rules module.

* Pin JNA version.

* Fix new lint errors.

Co-authored-by: Tiger Oakes <toakes@mozilla.com>
4 years ago
Michael Comella 42cca072e2 For #13959: remove resetAfter & port tests to StrictModeManager. 4 years ago
Michael Comella a92356fe00 For #13959: comment about duplication in logic in StrictMode.
I had to drop a commit that addressed the issue because it was too hard
to fix.
4 years ago
Michael Comella e1bd6191c7 For #13959: add comment to explain why we only resetAfter in certain build modes. 4 years ago
Michael Comella 3bf71ef655 For #13959: use ac StrictMode.resetAfter rather than duplicating functionality. 4 years ago
Kate Glazko e8855c09e6 For #15320: Ensure Mimetype Other PDF Shows PDF Icon 4 years ago
Tiger Oakes b563576335
Closes #14131: Move constants to dimens.xml (#14135)
Co-authored-by: Elise Richards <erichards@mozilla.com>
4 years ago
mcarare 81985f4179 For #12829: Update addUnderline extension function to accept parameters. 4 years ago
ekager b986730031 No issue - Updates AC to 58.0.20200910190642 and fixes imports 4 years ago
mcarare 91a9200fe3 For #13911: Fix resolving color attribute for title and description.
For SDK < 23 color attr cannot be resolved in selectors.
4 years ago
mcarare 410980fe27 For #11425: Improve editing bookmarks flow. 4 years ago
Gabriel Luong 7d9274e990 For #10342 - Part 1: Remove top sites prefetch and observation of live data 4 years ago
Christian Sadilek 0162fd68a9 Revert "For 11660: fixing nits for previous #11668 (#11821)"
This reverts commit bd7a5375f2.
4 years ago
MarcLeclair bd7a5375f2
For 11660: fixing nits for previous #11668 (#11821) 4 years ago
Sebastian Kaspari 4782705af9 Add diagnostic breadcrumbs for debugging "Display already aquired" crashes.
For:
https://github.com/mozilla-mobile/android-components/issues/7960
4 years ago
kglazko 5ecab0f48a
For #13935: Enhanced File Type List Icons (#14036)
* For #13935: Enhanced File Type List Icons

* For #13935 - Pulls out and tests logic for getting the icon for a DownloadItem

Co-authored-by: Kate Glazko <kglazko@Kates-MacBook-Pro.local>
Co-authored-by: Jeff Boek <jeff@jeffboek.com>
4 years ago
Kate Glazko 7f9e2255f7 For #13979: Deleted Download Files Shouldnt Show 4 years ago
Mihai Adrian Carare ea688cce09
For #13938: Implement nav to notification settings for all OS versions. (#13972) 4 years ago
Kainalu Hagiwara d9ffac0c89 For #13405 - Use toolbar location relative to the whole screen instead of window. 4 years ago
Kainalu Hagiwara 57c7955637 For #12865, #12990 - Disable swipe to switch tabs gesture when the keyboard is visible. 4 years ago
Tiger Oakes eab9660146 For #1146: Extract AccountUiView from settings 4 years ago
ekager 46511d6f8e For #10163 - Adds tab multiselect mode 4 years ago