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
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
..
addons Remove @UseExperimental for usages of the flow api 4 years ago
browser Closes #7450: Lazy storage initialization 4 years ago
collections fix #8135 - remove getColorFromAttr 4 years ago
components Closes #7450: Lazy storage initialization 4 years ago
crashes For #7753: Increases touch target of crash page 4 years ago
customtabs Update IntentProcessor implementation to comply with new interface. 4 years ago
downloads For #7219 - Polish Download Notification Dialog. (#7224) 5 years ago
exceptions No Issue: Add support for deleting individual tracking protection 4 years ago
ext For #8296 - Adds user account avatar to Account Preference 4 years ago
home For #9140: Remove drawable from title in empty state panes 4 years ago
lib Remove redundant super calls 5 years ago
library For #8773: Fixes issue with snackbar placement on ContextMenu (#8942) 4 years ago
migration Remove @UseExperimental for usages of the flow api 4 years ago
onboarding fix #8135 - remove getColorFromAttr 4 years ago
perf No issue: remove unused HotStartPerformanceMonitor. 4 years ago
push For #9059: Add WebPush engine integration 4 years ago
search For #7158: Improves home to search animation (#9008) 4 years ago
session For #8034: Create a post-visual completeness executor 4 years ago
settings For #3086: Adds settings animations (#9187) 4 years ago
share For #8975: Separate title from url with line break when sharing links 4 years ago
shortcut Update IntentProcessor implementation to comply with new interface. 4 years ago
test For #5574 - Migrate SessionControl to LibState (#6651) 5 years ago
theme fix #8135 - remove getColorFromAttr 4 years ago
trackingprotection For #8594: Show correct info in Etp settings info (#8687) 4 years ago
utils For #8800: clear menu highlights on use 4 years ago
whatsnew For #5656: Fixes nightly major version number crash 5 years ago
widget Feature/#220 language menu (#7070) 5 years ago
AppRequestInterceptor.kt No issue: Remove unneeded logic to adjust TP 4 years ago
BrowserDirection.kt For #7272: Show info when saved logins list is empty. (#7891) 4 years ago
Config.kt Closes #7762: Initialize Glean later in Fennec builds. 4 years ago
FeatureFlags.kt Add nightly-only feature flag for WebPush integration 4 years ago
FenixApplication.kt Add nightly-only feature flag for WebPush integration 4 years ago
GlobalDirections.kt For issue #8908 Notify users when previously unsupported add-ons 4 years ago
HomeActivity.kt No issue: remove unused HotStartPerformanceMonitor. 4 years ago
IntentReceiverActivity.kt For #7781: instrument visual completeness for top sites. 4 years ago