|
|
|
@ -28,6 +28,7 @@ import kotlinx.coroutines.GlobalScope
|
|
|
|
|
import kotlinx.coroutines.async
|
|
|
|
|
import kotlinx.coroutines.launch
|
|
|
|
|
import mozilla.appservices.Megazord
|
|
|
|
|
import mozilla.appservices.autofill.AutofillApiException
|
|
|
|
|
import mozilla.components.browser.state.action.SystemAction
|
|
|
|
|
import mozilla.components.browser.state.selector.selectedTab
|
|
|
|
|
import mozilla.components.browser.state.state.searchEngines
|
|
|
|
@ -837,9 +838,13 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
|
|
|
|
|
|
|
|
|
|
@OptIn(DelicateCoroutinesApi::class)
|
|
|
|
|
GlobalScope.launch(IO) {
|
|
|
|
|
try {
|
|
|
|
|
val autoFillStorage = applicationContext.components.core.autofillStorage
|
|
|
|
|
Addresses.savedAll.set(autoFillStorage.getAllAddresses().size.toLong())
|
|
|
|
|
CreditCards.savedAll.set(autoFillStorage.getAllCreditCards().size.toLong())
|
|
|
|
|
} catch (e: AutofillApiException) {
|
|
|
|
|
logger.error("Failed to fetch autofill data", e)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
val passwordsStorage = applicationContext.components.core.passwordsStorage
|
|
|
|
|