iceraven
fenix/125.3.0
fenix/125.0
fenix/124.0
fenix/124.1.0
fenix/124.2.0
fenix/123.1.0
fenix/123.0
fenix/122.1.0
fenix/122.0
fenix/121.1.0
fenix/121.0
fenix/120.0
fenix/120.1.0
fenix/119.0.2
fenix/119.1.0
fenix/119.1.1
fenix/119.0
fenix/118.2.0
fenix/118.1.1
fenix/118.1.0
fenix/118.0
fenix/117.1.0
fenix/117.0.1
fenix/117.0
fenix/116.3.0
fenix/116.2.0
fenix/116.0
fenix/115.2.0
fenix/114.1.0
fenix/114.0
fenix/113.1.0
fenix/113.0
fenix/112.2.0
fenix/112.1.0
fenix/112.0
fork
upstream-sync
fork-history
drag-tabs-2
drag-tabs
fix-addon-search
beta-sync
describe-install
hide-myths
issues/166-allow-fallback-location
issues/115-die-for-your-ram
issues/131-accept-version-name
issues/111-change-appid
issues/125-camera-permissions-stuck-off
issues/111-temp-icon
issues/111-fix-weasels
issues/111-rebrand-strings
issues/82-fix-tests
issues/74-fix-whats-new
master
patch-1
releases/v80.0.0
longTapDelay
releases/v79.0.0
releases/v79.1.0
fennec/production
fennec/beta
innovation-week
fennec/nightly
staging
nightly-build-test
fork-0
fork-1
fork-10
fork-2
fork-3
fork-4
fork-5
fork-6
fork-7
fork-8
fork-9
iceraven-1.0.0
iceraven-1.1.0
iceraven-1.10.0
iceraven-1.11.0
iceraven-1.11.1
iceraven-1.12.0
iceraven-1.13.0
iceraven-1.14.0
iceraven-1.15.0
iceraven-1.16.0
iceraven-1.16.1
iceraven-1.17.0
iceraven-1.18.0
iceraven-1.18.1
iceraven-1.18.2
iceraven-1.18.3
iceraven-1.18.4
iceraven-1.19.0
iceraven-1.2.0
iceraven-1.2.1
iceraven-1.20.0
iceraven-1.21.0
iceraven-1.21.1
iceraven-1.21.2
iceraven-1.3.0
iceraven-1.4.0
iceraven-1.5.0
iceraven-1.6.0
iceraven-1.7.0
iceraven-1.7.1
iceraven-1.8.0
iceraven-1.9.0
iceraven-2.0.0
iceraven-2.0.1
iceraven-2.0.2
iceraven-2.0.3
iceraven-2.1.0
iceraven-2.10.0
iceraven-2.10.1
iceraven-2.10.2
iceraven-2.10.3
iceraven-2.10.4
iceraven-2.10.5
iceraven-2.10.6
iceraven-2.11.0
iceraven-2.11.1
iceraven-2.12.0
iceraven-2.12.1
iceraven-2.13.0
iceraven-2.13.1
iceraven-2.13.2
iceraven-2.13.3
iceraven-2.13.4
iceraven-2.14.0
iceraven-2.14.1
iceraven-2.14.2
iceraven-2.15.0
iceraven-2.15.1
iceraven-2.15.2
iceraven-2.16.0
iceraven-2.16.1
iceraven-2.17.0
iceraven-2.17.1
iceraven-2.17.2
iceraven-2.18.0
iceraven-2.18.1
iceraven-2.18.2
iceraven-2.18.3
iceraven-2.18.4
iceraven-2.19.0
iceraven-2.19.1
iceraven-2.2.0
iceraven-2.2.1
iceraven-2.20.0
iceraven-2.20.1
iceraven-2.20.2
iceraven-2.20.3
iceraven-2.3.0
iceraven-2.4.0
iceraven-2.4.1
iceraven-2.5.0
iceraven-2.5.1
iceraven-2.6.1
iceraven-2.7.0
iceraven-2.8.0
iceraven-2.8.1
iceraven-2.8.2
iceraven-2.8.3
iceraven-2.8.4
iceraven-2.8.5
iceraven-2.9.0
iceraven-2.9.1
iceraven-2.9.2
${ noResults }
3 Commits (c906818d6531575073e6dca8cd64f46976e48432)
Author | SHA1 | Message | Date |
---|---|---|---|
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 |
MarcLeclair |
24bce64e0b
|
16373 Count the # of inflations done on startup (#16778)
* For #16373: Added performance Inflater to counter # of inflations This class is quite straight forward. The only thing that I have to point out is the onCreateView method. It usually calls its super if you don't override it. The problem with that is that the super.onCreateView actually uses android.view. as a prefix for the XML element it tries to inflate. So if we have an element that isn't part of that package, it'll crash. As I said in the code, a good example is ImageButton. Calling android.view.ImageButton will make the app crash. The method is implemented the same way that PhoneLayoutInflater does (Another example is the AsyncLayoutInflater) * For #16373: Added test for PerformanceInflater This test got quite awkward / complicated fast. I wanted to test the to make sure we don't break *any* of our layouts and to do so, I decided to just retrieve all our XML in our /res/layout folder. However, this gets quite a bit outside of a unit test scope. The point was to get every layouts and get their LayoutID through the resources using the testContext we have. It gets even weirder, since some of the XML tags have special implementation in android. One of them is the <fragment> tag. That tag actually is inflated by the OS using the Factory2 that the Activity.java implements. In order to get around the fragment issue, we just return a basic FrameLayout since the system LayoutInflater doesn't deal won't ever get a <fragment> tag to inflate. Another issue was the <merge> tag. In order to inflate those, you need 1) a root view and 2) attach your view to it. In order to be able to test those layouts file, I had to create an empty FrameLayout and use it as the root view for testing. Again, I know this is beyond the spirit of a unit test but if we use this inflater, I think it should make sure that no layouts are broken by it. * For #16373: Overrode getSystemService to return PerformanceInflater This allows PerformanceInflater to be called in every inflation to keep track of the number of inflations we do. * For #16373: Added UI test for # of inflations * For #16373: Lint fix * For #167373: Changed the LayoutInflater cloneInContext to take this instead of inflater The inflater parameter is set on the first call from the OS from the Window object. However, the activity itself sets multiple factories on the inflater during its creation (usually through AppCompatDelegateImpl.java). This means that, once we initially set the inflater with a null check, we pass an inflater that has no factory initially. However, since we keep a reference to it, when cloneInContext was called, it cloned the inflater with the original inflater which didn't have any factories set up. This meant that the app would crash on either browserFragment creation or any thing that required appCompat (such as ImageView and ImageButton). Now, passing itself with a cloneInContext means we keep all the factories initially set by the activity or the fragment. * For #16373: Fixed code issues for PR. No behavior change * For #16373: fixed some code nits |
4 years ago |
Michael Comella | 72ab058551 |
For #16376: move Startup*Test to perf pkg under code owners.
Instead of listing many different files here, we should just put them in /perf/ packages and code owner them. |
4 years ago |