1
0
Fork 0
fenix/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).
2020-03-19 15:46:50 -07:00
..
addons Remove @UseExperimental for usages of the flow api 2020-03-18 17:25:51 -07:00
browser Closes #7450: Lazy storage initialization 2020-03-19 15:46:50 -07:00
collections fix #8135 - remove getColorFromAttr 2020-03-02 15:48:33 -07:00
components Closes #7450: Lazy storage initialization 2020-03-19 15:46:50 -07:00
crashes For #7753: Increases touch target of crash page 2020-02-10 10:36:46 -08:00
customtabs Update IntentProcessor implementation to comply with new interface. 2020-03-04 09:40:00 -08:00
downloads For #7219 - Polish Download Notification Dialog. (#7224) 2019-12-18 12:26:41 -05:00
exceptions No Issue: Add support for deleting individual tracking protection 2020-01-22 11:47:51 -08:00
ext For #8296 - Adds user account avatar to Account Preference 2020-03-10 11:19:22 -07:00
home For #9140: Remove drawable from title in empty state panes 2020-03-19 14:32:40 +02:00
lib Remove redundant super calls 2019-07-29 10:22:53 -07:00
library For #8773: Fixes issue with snackbar placement on ContextMenu (#8942) 2020-03-12 09:54:13 -07:00
migration Remove @UseExperimental for usages of the flow api 2020-03-18 17:25:51 -07:00
onboarding fix #8135 - remove getColorFromAttr 2020-03-02 15:48:33 -07:00
perf No issue: remove unused HotStartPerformanceMonitor. 2020-03-11 11:28:38 -07:00
push For #9059: Add WebPush engine integration 2020-03-09 16:50:29 -04:00
search For #7158: Improves home to search animation (#9008) 2020-03-05 13:54:54 -08:00
session For #8034: Create a post-visual completeness executor 2020-02-28 09:15:06 -08:00
settings For #3086: Adds settings animations (#9187) 2020-03-17 12:35:00 -07:00
share For #8975: Separate title from url with line break when sharing links 2020-03-05 21:17:36 -08:00
shortcut Update IntentProcessor implementation to comply with new interface. 2020-03-04 09:40:00 -08:00
test For #5574 - Migrate SessionControl to LibState (#6651) 2019-12-04 22:06:05 -05:00
theme fix #8135 - remove getColorFromAttr 2020-03-02 15:48:33 -07:00
trackingprotection For #8594: Show correct info in Etp settings info (#8687) 2020-02-25 09:18:27 -08:00
utils For #8800: clear menu highlights on use 2020-03-11 19:05:55 +02:00
whatsnew For #5656: Fixes nightly major version number crash 2019-09-27 15:06:57 -07:00
widget Feature/#220 language menu (#7070) 2020-01-03 18:15:35 -08:00
AppRequestInterceptor.kt No issue: Remove unneeded logic to adjust TP 2020-03-13 14:08:49 -04:00
BrowserDirection.kt For #7272: Show info when saved logins list is empty. (#7891) 2020-01-24 18:13:44 -08:00
Config.kt Closes #7762: Initialize Glean later in Fennec builds. 2020-01-26 11:53:26 +01:00
FeatureFlags.kt Add nightly-only feature flag for WebPush integration 2020-03-12 18:39:32 -07:00
FenixApplication.kt Add nightly-only feature flag for WebPush integration 2020-03-12 18:39:32 -07:00
GlobalDirections.kt For issue #8908 Notify users when previously unsupported add-ons 2020-03-11 11:24:01 -04:00
HomeActivity.kt No issue: remove unused HotStartPerformanceMonitor. 2020-03-11 11:28:38 -07:00
IntentReceiverActivity.kt For #7781: instrument visual completeness for top sites. 2020-02-28 13:37:06 -08:00