Commit Graph

102 Commits (eb14532c3cea6874f3ddd087964b426e830b9704)

Author SHA1 Message Date
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
Arturo Mejia 823eea44ed No issue: Add serverConfig param to FxaWebChannelFeature 4 years ago
ekager 31cc7d9166 For #8897 - Don't remove all external sessions on back press 4 years ago
Grisha Kruglov e6e2dd94c7 Closes #7344: Login storage refactor
The a-c side of this work is in https://github.com/mozilla-mobile/android-components/pull/6128

This switches Fenix to use `SyncableLoginsStorage`, which caches a connection internally
on first access, and doesn't expose any lock/unlock APIs at the public boundary.
4 years ago
Sawyer Blatz 8e06933e8d For #167: Adds browser -> home animation 4 years ago
Sawyer Blatz e96732604b For #167: Improves home to browser animation 4 years ago
ekager a6b07afa95 No issue: Fix LeakCanary detected memory leaks
Co-authored-by: Emily Kager <emilykager@gmail.com>
Co-authored-by: Pierre-Yves Ricau <py@squareup.com>
4 years ago
mcarare 5a6fc02976 For #8773: Set proper anchor and padding for Snackbars on browser screen 4 years ago
Sawyer Blatz 13c9c39658 For #4383: Add feature flag 4 years ago
Sawyer Blatz 009a7f3020 For #4383: Enable dynamic bottom toolbar 4 years ago
Sawyer Blatz 82979afb48 For #8743: Fix baseBrowserFragment crash 4 years ago
ekager 511c36e191 Removes FragmentPreDrawManager changes in BrowserFragment 4 years ago
Sawyer Blatz dcc1e9fc65 No issue: Fixes swipeRefresh UI test crash 4 years ago
Jeff Boek 541bcf072a Reverts all BrowsingModeManager changes 4 years ago
ekager 0d398f7d44 For #8580 - Don't change theme in initialize UI 4 years ago
Roger Yang 60d38057bb
Closes #8654: Fix breakage from customTabId rename (#8656) 4 years ago
Sawyer Blatz d918cfdf38 For #1901: Screenshot engineView to remove GV flash
Co-authored-by: ekager <ekager@mozilla.com>
4 years ago
Roger Yang 0630e2482f
Closes #8544: Activity should be reused when opening intents from other apps (#8547) 4 years ago
ekager 35bf4fbda9 No issue: Fix login for BaseBrowserFragment FragmentPreDrawManager 4 years ago
Emily Kager 9bac7ef47b For #8403: Don't postpone transition for view intents 4 years ago
Simon Chae 2c01022c4b For #8153: Allow web-ext to open new tabs in correct browsing mode 4 years ago
Emily Kager 5839f5891c No issue: Update androidx dependencies 02.08.20 4 years ago
Gabriel Luong e1863dd3c2 For #6758 - Part 4: Implement "Add to Firefox Home" browser menu item
- The "Add to Firefox Home" browser menu item adds a top site to the top site storage.
- Refactors the FenixSnackbar from BaseBrowserFragment into BrowserToolbarController
since there are multiple menu items that need to show a FenixSnackbar.
- Adds metrics for the new browser menu item.
4 years ago
Kate Glazko dbf711e112 For #4904: Pressing back external link doesn't go back 4 years ago
ekager 0777fb3bbe For #5545 For #5542 Closes #6696 Integrate logins API, adds Settings for Autofilling/Saving Logins 4 years ago
Colin Lee cf220427d7
Fix #7649: Fix missing NOT in asFeatureWebChannelsDisabled check (#7650) 4 years ago
Colin Lee 7baf54f566
For #5182: Loading experiments on startup is slow, remove Fretboard (#7510)
This removes Fretboard. The goal is to reduce cold startup costs associated with loading the experiments on the main thread. We currently have two experiments frameworks in use and should only require one.
4 years ago
ekager 47c13136f7 No issue: Fix dynamic theming to accommodate lazily inflated readerview 4 years ago
mawen7 a2e0af3194 Only close tab on back press if it has a parent tab 5 years ago
Sawyer Blatz c7c4ad051a
For #6413: Adds more snackbar positioning logic (#7444)
* For #6413: Adds more snackbar positioning logic

* Refactor
5 years ago
Roger Yang f6e286fd9c
Closes #7346: Enable dynamic app links in Fenix (#7361) 5 years ago
Sawyer Blatz 3fb060f682
For #6413: Fixes snackbar positionining for bottom toolbar (#7415)
* For #6413: Fixes snackbar positionining for bottom toolbar

* For #6413: Cleans up snackbar usage
5 years ago
Roger Yang dd1433733a
Closes #7156: Update app links feature usage to include app links interceptor (#7275) 5 years ago
Severin Rudie cd53e9778a For 6795: expands toolbar whenever a new session is selected
This ensures that the bar is expanded when opening a link in a new tab
5 years ago
Emily Kager 686facffc6 For #6946 - Get engine margins without assuming top/bottom toolbar 5 years ago
Emily Kager dcb39b0a44 For #7124 - Match toolbar location for ETP/security panel gravity 5 years ago
Tiger Oakes fe034226a3
For #5783 - Web Share with Fenix share sheet (#6883) 5 years ago
ekager 1647e07481 For #5771 - Don't force landscape mode on fullscreen 5 years ago
Emily Kager d1b134c2ff For #6908 - Set null anchors for snackbars with top toolbar (#6911) 5 years ago
Jeff Boek e8972bb47d For #6795 - Auto shows toolbar when loading a new URL (#6955)
Co-authored-by: Severin <Baron-Severin@users.noreply.github.com>
5 years ago
Jeff Boek 1b1f9348dc No Issue - Fixes warnings / compiler errors with A-C update 5 years ago
Sawyer Blatz 769c1e422d For #5694 & #6054: Allows users to change toolbar position (#6608)
* For #5694 & #6054: Adds preference screen for toolbar

* For #5694: Adds changing toolbar position functionality

* No issue: Updates telemetry links to actually work lol 😬

* For #6054: Adds toolbar position to core ping
5 years ago
Tiger Oakes 422faaf7c0 Add toolbar helpers (#6531) 5 years ago
Christian Sadilek 8271f0f55a Fix for A-C 23.0.0: onDownloadCompleted renamed to onDownloadStopped 5 years ago
Sawyer Blatz bcf80d0e0b
For #6436: Adds snackbar for failed download (#6648) 5 years ago
mawen7 1e813a9609 Jump to tab overview if closed tab has no parent session 5 years ago
Sawyer Blatz 6f4de48428 For #6434: Fixes downloadCompleted for paused downloads 5 years ago
Tiger Oakes ee4e1c8f39
Fixes #5085 - Use CustomTabWindowFeature (#6603)
Opens _blank links in new custom tab
5 years ago
Severin Rudie 6909a76bcb
4281 remove qab (#6310)
* For #4281: small ToolbarMenu refactor

This makes it easier to see how items are ordered in the menuItems list

* For 4281: add QAB buttons to menu

* For 4281: removed menu back button per mocks

I double checked with UX, and we'll be relying on the hardware back button for its functionality

* For 4281: add content descriptions for bookmarking

* For 4281: updated BrowserToolbarController for new functionality

* For 4281: provided simple dependencies to browser controller

More complex changes will be in a following commit, for review readability

* For 4281: move toolbar controller dependencies up to BaseBrowserFragment

The functionality they control is being moved into the toolbar menu, which is shared by both normal tabs and custom ones

* For 4281: removed (now unused) code related to QAB

* For 4281: fix test compilation after QAB removal

Tests still need to be expanded to include added functionality

* For 4281: updated menu to show if url is bookmarked

This sloppy workaround is required because TwoStateButton requires that `isInPrimaryState` be a synchronous call, and checking whether or not the current site is bookmarked is quite slow (10-50 MS, in my tests).  After days of work and many attempted solutions, this was the least abhorrent among them.

https://github.com/mozilla-mobile/android-components/issues/4915 was opened against AC to evaluate potentially supporting async `isInPrimaryState` functions.
https://github.com/mozilla-mobile/fenix/issues/6370 was opened against Fenix to investigate the unexpectedly slow call to `BookmarkStorage`.

* For 4281: update reader mode switch

* For 4281: selectively show/hide menu items

* For 4281: add reader mode appearance

* For 4281: update bookmark button when it is clicked

* For 4281: removed unused QAB code

* For 4281: removed QAB robot, updated UI tests

* For 4281: removed QuickActionSheet metrics

Since this behavior now lives in the toolbar, it is tracked via Event.BrowserMenuItemTapped

* For 4281: fixed lint errors

* For 4281: add new strings for buttons added to menu

This is necessary because the location change (from QAB to toolbar menu) could affect the grammar in some languages

* For 4281: remove outdated TODOs

* For 4281: removed QAB container

* For 4281: removed back button reference from UI test

This button no longer exists

* For 4821: Fixes a visual defect (extra padding on top of toolbar)

* For 4281: update copy on reader mode

* For 4281: fixed review nits
5 years ago
mcarare 11ad1010a9 For #6323 Creating 1st collection from tab shows Name collection screen
Added a check for existence of at least a collection to select from.
5 years ago