We only instrument onCreate because it's the only one with an
implementation.
While declaring this as a function that accepts a lambda is less
fragile, we've previously had issues with it such as suspected memory
leaks when used for telemetry. Therefore, we go with the simpler
approach.
This is a speculative fix for the intermittent issue. Typically, these
intermittents are caused by mocked lambdas but there is no mocked lambda
here. If this doesn't work, one `any()` argument fills in for a lambda:
it's possible that's causing the failure.
Unfortunately, I can't verify this fix easily because the "run test until
failure" option was removed from Android Studio.
See b3f5c87585 for a prior attempt to
address the intermittents in this class.
This is a bug we noticed after landing search term grouping.
An adapter can submit an empty list of items to the `ConcatAdapter`
early. This has the side-effect of triggering our `observeFirstInsert`
too soon and therefore updating the visibility to show the empty tray
placeholder and never switches back.
Our solution is to keep a constant observer on the adapter so we can
perform the visibility check on every insert/remove.
Co-authored-by: Roger Yang <royang@mozilla.com>
* For #21236: Separate tabs with the same search term into a different section in tabs tray
* Issue #21236: Scroll to selected tab + various tab fixes for groupings
* Issue #21236: Fix failing test
Co-authored-by: Jonathan Almeida <jalmeida@mozilla.com>
The test as it exists relies on the robolectric lifecycle, which is hard
to predict, so it doesn't seem worth fixing the test. Writing the test
any other way would require excessive mocking, which also seems
impractical.
We've noticed that geckoview_example is ~300ms faster than fenix in cold page
load tests on arewefastyet for the Pixel 2. We suspect the main
difference is because geckoview_example runs with conditioned profiles
and fenix does not.
This PR is foremost an experiment to see if that's true because, after bug
1587542, we cannot run get results for fenix perftest PRs (i.e. it needs to be
merged into main). If we find that the results are not noisy, however, we
could end up leaving this in the tree. We've previously seen excessive
noise with fenix start up tests with conditioned profiles which is why
conditioned profiles are not currently enabled.
The Glean core native code is now shipped through GeckoView directly
(through its `-omni` packages).
For local tests we need a library matching the host-platform, which is
available in the glean-native package.