Commit Graph

232 Commits (9654b4dfb122b54b04369fe80a2f9c95811478e8)

Author SHA1 Message Date
Noah Bond 826249497a
MR2 Inactive tabs telemetry (#21908)
* For #21903 - Added telemetry for interacting with inactive tabs

* For #21903 - Added missing inactive tab delete count event to delete all event

* For #21903 - Added PR numbers to metrics

* For #21903 - Updated broken unit tests. Resolved critical lint warning.

* For #21903 - Fixed inactive tabs setting toggle metric

* For #21903 - Updated FenixApp unit test

* For #21903 - Updated newline character in Metrics. Set inactive tab metrics' lifetime to default. Updated expiration to Nov 2022. Refactored inactive tabs metric to be a single metric.

* PR: addendum for last commit that missed a file

* For #21903 - Changed logic check for reporting inactive tab count

* PR: fixed merge conflict

* For #21903 - Removed tab close tracking when the user closes ALL inactive tabs

* For #21903 - Removed individual tab close metric verify from CLOSE ALL test

* For #21903 - Updated inactive tabs toggle setting expiration to match the expiration of the other events

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
3 years ago
Christian Sadilek c3ef16de61 Closes #21944: Top sites rendered slowly on first load of HomeFragment 3 years ago
Arturo Mejia 2b363b9868 For #21618: Integrate Nimbus with MR2 Home Page to enable experimentation 3 years ago
Arturo Mejia 3272de1364 For #21239 add telemetry for Allow users to customize their home screen 3 years ago
Michael Comella f8a4113271 For #21299: add markers for all activity lifecycle callbacks.
We implement these all in the same track because between it'd create a
lot noise between this and fragment lifecycle callbacks.
3 years ago
Elise Richards fa811cb244 Remove enable private search suggestions telemetry 3 years ago
Elise Richards de992994de Remove open links in private tab telemetry 3 years ago
Grisha Kruglov 6161dc6e8d Closes 20975: Run metadata cleanup after Megazord.init()
This ensures that we do not attempt places initialization before
Megazord.init() finishes, and that touching BrowserStore does not
kick-off places initialization (due to the `cleanup` call being a
side-effect of creating metadata middleware, used as part of the
BrowserStore).

Glean initialization happens before initialize megazord, and it touches
core.store BrowserStore instance, kicking-off places initialization on
an IO thread (due to the cleanup call), which raced megazord
initialization on the main thread.

App init sequence is a bit of a mine-field, so this patch takes the easy
way out and doesn't attempt to re-order initialization sequence. Also,
initializing places as a side-effect of touching BrowserStore was also,
clearly, a bug.
3 years ago
Rohan Maity c45703db07 For #20596 remove perf.startup probes 3 years ago
Roger Yang 2ed4115a6c Revert "For #18711 - Refactor credit card telemetry under the Metrics ping (#19733)"
This reverts commit 172a118a51.
3 years ago
Sebastian Kaspari 971b419d77 Run ktlintFormat to adapt to latest formatting rules. 3 years ago
Sebastian Kaspari 24e9f64cff Add telemetry for Android Autofill feature. 3 years ago
Sebastian Kaspari 8b5aef7def Update Kotlin to 1.5.10 (and Coroutines to 1.5.0). 3 years ago
Michael Comella be64ee4159 For #20127: remove app_opened_all_startup integration. 3 years ago
Sebastian Kaspari 4753a1d494 Complete browser-state migration and remove browser-session dependency.
Co-authored-by: Christian Sadilek <christian.sadilek@gmail.com>
3 years ago
Gabriel Luong 172a118a51
For #18711 - Refactor credit card telemetry under the Metrics ping (#19733) 3 years ago
mcarare 9400f58e2a For #17538: Perform autofill storage warm-up after visual completeness. 3 years ago
Roger Yang f13560ae52 Issue #19147: Move set startup metrics off main thread 3 years ago
Elise Richards cf9a84eed5
Move locale restoration on startup to the visual completeness queue to prevent perf impact (#19315) 3 years ago
Roger Yang 74047cdceb
Closes #19147: Move startup metrics to right after Glean initialization (#19252) 3 years ago
Michael Comella 000bef020a For #18836: replace StartupActivityStateProvider with StartupStateProvider.
The StartupActivityStateProvider uses an imperative implementation,
driven by callbacks, to set the state of the application. This is hard
to follow as you need to understand which callbacks will be called in
which order. For example, to make sense of an implementation like this,
COLD, WARM, AND HOT would likely need to be implemented in separate
ActivityLifecycleCallbacks.

I feel the StartupStateProvider is an improvement because it leverages
the StartupActivityLog to query a linear state for a more understandable
implementation. Furthermore, it seems accessible to write COLD, WARM,
and HOT in the same class because they can all be approached the same
way.
3 years ago
Michael Comella cde954f3a7 For #18836: add StartupActivityLog, tests. 3 years ago
Sebastian Kaspari dfb3c4c9bf Introduce process lifecycle observer to collect metrics about tabs when app goes to foreground/background. 3 years ago
Michael Comella 2be9fb61d0 For #18426: add StartupActivityStateProvider.
This will be used to filter conditions for the start up telemetry we're
adding.
3 years ago
Michael Comella edd49b286d For #18426: add ApplicationStartReasonProvider.
We need to know this state to add a correct COLD MAIN probe.
3 years ago
Elise Richards 559cf54798
For #17190: notifications are updated when locale is changed (#18179)
* Add intent processor for locale changes

* Recreate notification and notify in the service

* Use locale use cases to update notification

* Use notification id instead of tag

* Add locale use cases and restore locale in application

* Send locale to service instead of string

* Controller tests for locale

* Update Android Components version to 74.0.20210323143308

Co-authored-by: Arturo Mejia <arturomejiamarmol@gmail.com>
3 years ago
Michael Comella 9024eca01e For #18426: add telemetry for app.onCreate subsections.
Hopefully this will help us understand behavior of the
`application_on_create` probe, specifically that it seems to take longer
in telemetry than in does locally compared to `home_activity_on_create`
(comparing the medians to local runs)..
3 years ago
Mugurell ec0176275b For #17869 - Start the Android Keystore experiment
Only on API 23+ (minimum Android version needed for SecureAbove22Preferences)
and only if enabled by a Nimbus experiment.

The Nimbus experiment will have the key `fenix-android-keystore` and use the
default branches - "control" and "treatment".
3 years ago
Arturo Mejia 8f43acc903 Closes #18367 run SupportedAddonsChecker only for users with unsupported extensions 3 years ago
Jan-Erik Rediger c47f43608d Set `distributionId` right after initializing Glean
Previously setting it might have been arbitrarily delayed, resulting in
this metrics missing from pings that get submitted earlier.
Setting it early should prevent that.
The performance impact is negligible, Glean dispatches recording that
data off-main-thread anyway.
3 years ago
Jan-Erik Rediger 8b7279ebe4
Pass auto-generated build info (version code and name) to Glean (#18230)
This also re-generated the Glean docs due to an update of the bundled
glean-parser.
3 years ago
Michael Comella 993428cd0f For #17969: add duration probes for App.onCreate and HomeActivity.onCreate. 3 years ago
Michael Comella 2e45483eb0 For #17816: add ProfilerFactProcessor and register it, tests. 3 years ago
jhugman 1ef4102e13
Fixes #17738 - Early initialization of Nimbus (#17834) r=christian 3 years ago
Christian Sadilek 50e66b469d Remove SessionManager reference from FenixApplication 3 years ago
Michael Comella d48bb2a4cc Revert "For #17447: add intentional delay to cold start up in debug and nightly."
This reverts commit 093470a8b3. This
intentional regression was only intended to be temporary so now we're
removing it.
3 years ago
Christian Sadilek 810200f2ab Switch to use case when selecting tab for extensions 3 years ago
Michael Comella 093470a8b3 For #17447: add intentional delay to cold start up in debug and nightly.
I validated:
- that the log statement appeared in Nightly but not in Beta.
- that the local runtimes of our perftest increased (the median diff is 124ms)
3 years ago
Sebastian Kaspari 051988ecff Migrate some "selected tab" reads from SessionManager to BrowserStore. 3 years ago
Christian Sadilek 9a53054b28 Use new RestoreUseCase in A-C to handle tab timeouts 3 years ago
Sebastian Kaspari 1b6cebf4d4 Switch to new SessionStorage / session restore API. 3 years ago
Sebastian Kaspari 055c76b7ba FenixApplication: Remove unused kinto endpoint. 4 years ago
Sebastian Kaspari d84b8ebdc6 Issue #12731: Log and record breadcrumb when onTrimMemory() gets invoked. 4 years ago
jhugman 9cdfb6db4a
Nimbus Global Opt Out (#16543) r=gl 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
Mihai Adrian Carare 0ee7e1c28d
For # 15929: Remove the search widget discoverability experiment. (#16081)
* For #15929: Remove SearchWidgetCFR telemetry.

* For #15929: Remove SearchWidgetCFR and search widget experiment.

* For #15929: Remove unit tests references to search widget experiment.
4 years ago
Christian Sadilek c330426bb7 No issue: Fix onConfigurationChange crashes in Debug build 4 years ago
Mihai Adrian Carare 0e2657e262
For #14735: Remove debug logs from release build. (#15747) 4 years ago
Michael Comella f19c9920f9 For #13959: move resetAfter into StrictModeManager.
In a followup PR, we need to add state to strictModeManager (the
number of suppressions). This is much simpler to do when this is defined
as a class rather than an object. However, when this is defined as a
class, `resetAfter` needs access to the strictModeManager. Instead of
passing it in as an argument, it made sense to move this function onto
the strictModeManager instead.

Since folks are used to calling:
```
StrictMode.ThreadPolicy.allowThreadDiskReads().resetAfter
```

We're going to have to add a lint check to prevent them from doing that.
4 years ago
Michael Comella 6abeb2d9e7 For #13959: change StrictModeManager to class from object.
I originally tried to create this PR leaving this as an object to keep
the change simple but it wasn't worth it - once the object started to
keep state, we'd need to manually reset the state between runs. Also,
the tests were already getting hacky with static mocking so it was
easier to address some of those issues this way too.
4 years ago
Arturo Mejia 6f5e9bad26
Pin AC TO 57.0.0 and remove feature flag for view downloads (#14592)
* Update Android Components version to 57.0.0.

* Remove feature flag for "View Downloads".

* Update search enginer list from changes by #13452

Co-authored-by: Chenxia Liu <liuche@mozilla.com>
4 years ago
Arturo Mejia c63fd3f9ac Add support for restoring downloads 4 years ago
Sachin 316b70940f
for #12573, added startup type and hasSavedInstance keys to app_startup_type telemetry (#13494) 4 years ago
Jeff Boek c73870b794 For #13507 - Performance fixes for the ReviewPromptController 4 years ago
Christian Sadilek 8b9c3e0108 Fixes for A-C 57.0.20200826190111: Move EngineSession to BrowserState 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
sraturi 5ccbca25c0 for #13479, added a VisualCompletenessQueue.kt class to handle all the functionality related to visual completeness 4 years ago
Tiger Oakes c9f8986d2b
Don't init glean in unit tests (#13100) 4 years ago
Michael Comella 5d8c900391 For #12802: add StorageStats glean metrics. 4 years ago
Sachin 6a618aa318
for #11698 added on demand workmanager initialization (#12739) 4 years ago
Michael Comella 2ae88aec81 No issue: add missing newline. 4 years ago
Michael Comella 6e06c7fda1 No issue: clean up initVisualCompletenessQueue... method.
A no-op clean up.
4 years ago
Michael Comella 633bc4f2f2 No issue: extract initVisualCompletenessQueueAndQueueTasks.
This refactor, done entirely by IDE, is a no-op cleanup.
4 years ago
Michael Comella 169071ac61 No issue: extract startMetricsIfEnabled function.
This refactor, done entirely by IDE, is a no-op clean-up of this file.
4 years ago
Tiger Oakes c08d375c18
Move settings in components (#12675) 4 years ago
Tiger Oakes d0e9f1f165
Update Kotlin dependency (#10806) 4 years ago
Sawyer Blatz 61b1b5a895
No issue: update experiments when experiments updated (#12032) 4 years ago
Sawyer Blatz c5034fa770 No issue: Allow us to run experiments on nightly if needed 4 years ago
Mihai Branescu 49b617c999
For #9100 - Private browsing notification fixes
Co-authored-by: Seef <Saif Dara>
4 years ago
Sachin 9269a53b21
for #11615 allowed strictMode disk read for violations made by the OS. (#11658) 4 years ago
MarcLeclair b52091ed34
For #11660: added prefetch for topsites and update in onCreateView() (#11668)
* For #11660:added prefetch for topsites

TopSites will be prefetched with observerOnce (wrapper around observerForever).
Also, the SessionControlView.update() is called right away instead of waiting from consumeFrom
in the HomeFragment.onCreateView() which will allow the UI to render all at once on its first
perform traversal

* Removed the submitList(null) since it retriggered a drawing on lower end device
4 years ago
Hakkı Kaan Çalışkan 87a65d2445 For #9782: Clean up unused FeatureFlags
I've currently found out this ones unused.
webPushIntegration removed because looks like all fatal bugs solved as it said from note.
4 years ago
Sachin 36b1c710e7
for #11617 added a resetPoliciesAfter ext function for StrictMode, and replaced all existing calls to "resetAfter" with "resetPoliciesAfter" (#11619) 4 years ago
Grisha Kruglov 8769d98e71 Pass crashReporter instance to RustLog 4 years ago
Sachin 74948cb3f1
for #7225, Changed strictMode thread penalty to dialog on startup and back to logs after startup is done. (#10831)
for #7225, refactored and cleanup the branch.

for #7225, change strict mode policy only on main process.

for #7225, setting thread policy inside a seperate thread to keep it from getting overridden in activities.

for #7225 removed Handler().postAtFrontOfQueue as a solution due to unknown side effects. moved the enableStrictMode function to be static so we can reuse it.

for #7225 lint check

for #7225 created strict mode manager and moved enabledStrictMode function inside it.

for #7225 removed penalty death on network

for #7225 added allow disk access on thread for already existing violation


strict mode running in main process to see if it passes the gitlab check, will revert it if it doesnt

allowed diskread for super.onCreate for home activity

added comments for disk violation oncreate homeactivity

added fragment manager inside strictmode manager

allowed disk read for onboarding

allowed disk read for cachedTopSites
4 years ago
Sawyer Blatz 1be2ec2cbf For #9488: Init widgetExperiment after Experimenter init 4 years ago
Sawyer Blatz 42f58a1984 For #9488: Add experimentation support 4 years ago
Tiger Oakes a7e74e308b
Migrate some SessionManager usage to BrowserStore (#10789) 4 years ago
sraturi 372bb421cc created kotlin doc for FenixApplication 4 years ago
ekager 70755adf6e For #10036 - Workaround for System Theme changes with config change 4 years ago
Michael Comella f3ed207bdb For #8803 - review: Add clarifying comments to onAppInit capture methods. 4 years ago
Michael Comella f49fc6dad2 For #8803: hook up frameworkStart metric. 4 years ago
Christian Sadilek 7f1ef17d8b No issue: Re-use existing usecases for addons 4 years ago
Grisha Kruglov 6c38b77315 Part 6: Kick-off account manager initialization after visual completeness
In order to hide the time it takes for the account manager to be initialized
(which always involves disk IO, and often network IO), let's kick it off
after "visual completeness".
This makes sure that for most users, by the time they interact with the account
manager-related functionality (e.g. in Settings), it's ready to go.

Also, for signed-in users, this will establish background sync workers.
4 years ago
Grisha Kruglov be1fa8df7d Pre: introduce a RunWhenReadyQueue
This replaces the StartupTaskManager we had with a more general class.
New implementation is a thread-safe "gated task executor", which either
runs the task right away if it's marked as 'ready', or queries it to be
executed later on.

This ability to either execute or queue a task will be useful later on in the
commit series.
4 years ago
Grisha Kruglov 9e324fa02a Perform storage warm-up after visual completeness 4 years ago
Grisha Kruglov e541e10427 Initialize storage after visual completeness
In order to eat the perceived performance costs, we initialize storage
once we're visually complete. This way, we're reducing chances of user performing
a UI action which will trigger storage init and delay said action.
4 years ago
Jonathan Almeida 3d387e2dde Add nightly-only feature flag for WebPush integration 4 years ago
Arturo Mejia ce4293c8c8 For issue #8908 Notify users when previously unsupported add-ons
become available
4 years ago
Jonathan Almeida ef42becbf9 For #9059: Add WebPush engine integration 4 years ago
Sebastian 89a260ecd9 Use new MemoryConsumer.onTrimMemory() API. 4 years ago
Jonathan Almeida 4bbf87d272 Closes #6730: Lazily initialize account manager on new push message 4 years ago
Arturo Mejia 4cf34b47ee
Show a notification when add-on update requires new permissions 4 years ago
Arturo Mejia 30f351910a
Make sure all installed extensions are registered for updates 4 years ago
Will Hawkins f9b716286a For #8034: Create a post-visual completeness executor
Create an object that will execute its enqued tasks
when Fenix is visually complete.
4 years ago
Arturo Mejia cfa6f0cc7a No issue: Submit exceptions while updating add-ons to the crashReporter 4 years ago
Grisha Kruglov fddf77280c Remove direct A-S dependency; switch to using 'full' megazord
As far as I can tell, we never actually exercise the a-s libraries in Fenix tests currently (this was one of the presumed reasons for having a direct dependency).
In a different branch I've started work on adding end-to-end tests, but currently that's blocked on trying to figure out to load native libraries in tests (somehow, fenix's setup is different than what we have in A-C, not yet clear to me in what way).

Another reason for a direct dependency (i think) is that we needed it to configure a `fenix` megazord. This could be solved via a `support-megazord-fenix` a-c component that provides the correct transient dependencies,
but we can also just switch to use the `full` megazord instead, which is essentially what fenix megazord is at this point. A-S team wants to remove the fenix megazord, so this will help. This is what this patch does.
4 years ago
Arturo Mejia 959e438ff3
Initializes GlobalAddonDependencyProvider 4 years ago