You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
iceraven-browser/app/src/main/java/org/mozilla/fenix/components
Grisha Kruglov eb14532c3c Closes #7450: Lazy storage initialization
Make sure that we actually lazily initialize our storage layers.

With this patch applied, storage layers (history, logins, bookmarks) will be initialized when first
accessed. We will no longer block GeckoEngine init, for example, on waiting for the logins storage
to initialize (which needs to access the costly securePrefStorage).
Similarly, BackgroundServices init will no longer require initialized instances of the storage
components - references to their "lazy wrappers" will suffice.

In practice, this change changes when our storage layers are initialized in the following ways.
Currently, we will initialize everything on startup. This includes loading our megazord, as well.

With this change, init path depends on if the user is signed-into FxA or not.

If user is not an FxA user:
- on startup, none of the storage layers are initialized
- history storage will be initialized once, whenever:
  - first non-customTab page is loaded (access to the HistoryDelegate)
  - first interaction with the awesomebar
  - history UI is accessed
- bookmarks storage will be initialized once, whenever:
  - something is bookmarked, or we need to figure out if something's bookmarked
  - bookmarks UI is accessed
- logins storage will be initialized once, whenever:
  - first page is loaded with a login/password fields that can be autofilled
  - (or some other interaction by GV with the autofill/loginStorage delegates)
  - logins UI is accessed
- all of these storages will be initialized if the user logs into FxA and starts syncing data
  - except, if a storage is not chosen to be synced, it will not be initialized

If user is an FxA user:
- on startup, none of the storage layers are initialized
- sometime shortly after startup is complete, when a sync worker runs in the background, all storage
layers that are enabled to sync will be initialized.

This change also means that we delay loading the megazord until first access (as described above).
4 years ago
..
history For #4137 - Adds pagination to the history view 5 years ago
metrics For #7847: Improve startup performance of the Fenix wrapper around Glean 4 years ago
searchengine fix #8135 - remove getColorFromAttr 4 years ago
toolbar For #9200: Remove star icon from empty state icon in toolbar 4 years ago
AccountAbnormalities.kt fix #8135 - remove getColorFromAttr 4 years ago
Analytics.kt Closes #9104: Pass release channel information to Socorro service (#9130) 4 years ago
BackgroundServices.kt Closes #7450: Lazy storage initialization 4 years ago
Components.kt Closes #7450: Lazy storage initialization 4 years ago
Core.kt Closes #7450: Lazy storage initialization 4 years ago
FenixSnackbar.kt For #8773: Fixes issue with snackbar placement on ContextMenu (#8942) 4 years ago
FindInPageIntegration.kt For #6992 Always hide toolbar when showing find in page bar (#7567) 4 years ago
FirebasePushService.kt fix #8135 - remove getColorFromAttr 4 years ago
FxaServer.kt Prepare for a-c a-s upgrade 4 years ago
InflationAwareFeature.kt fix #8135 - remove getColorFromAttr 4 years ago
IntentProcessorType.kt fix #8135 - remove getColorFromAttr 4 years ago
IntentProcessors.kt FennecWebAppIntentProcessor: Handle manifest file not existing. 4 years ago
NotificationManager.kt No issue: Use SendTabFeature and FxaPushSupportFeature 5 years ago
PendingSessionDeletionManager.kt For #5843 - Ensure tabs pending deletion are removed 4 years ago
PerformanceComponent.kt For #8034: Create a post-visual completeness executor 4 years ago
PermissionStorage.kt No issue: Normalize license header comment (#3909) 5 years ago
PrivateShortcutCreateManager.kt For #7730 - always show "Add private browsing shortcut" in sett… (#7943) 4 years ago
Push.kt Log push crashes to CrashReporter 4 years ago
Search.kt Adds custom search engines (#6551) 5 years ago
Services.kt For #5182: Loading experiments on startup is slow, remove Fretboard (#7510) 4 years ago
StoreProvider.kt No issue: Removes deprecated usage of ViewModelProviders 5 years ago
TabCollectionStorage.kt For #8016 - Prevent duplicate domains from displaying inthe collection description on the home screen 4 years ago
TopSiteStorage.kt For #8126 - Adds default top sites 4 years ago
TrackingProtectionPolicyFactory.kt For #8540: Fix ETP options not being correctly applied (#8688) 4 years ago
UseCases.kt Use ManifestUpdateFeature 5 years ago