Use Mozilla Android Components 10.0.0
parent
aa4ed36e46
commit
71a2478f4d
|
@ -89,7 +89,7 @@ open class HomeActivity : AppCompatActivity(), ShareFragment.TabsSharedCallback
|
||||||
// If we're authenticated, kick-off a sync and a device state refresh.
|
// If we're authenticated, kick-off a sync and a device state refresh.
|
||||||
accountManager.authenticatedAccount()?.let {
|
accountManager.authenticatedAccount()?.let {
|
||||||
accountManager.syncNowAsync(startup = true)
|
accountManager.syncNowAsync(startup = true)
|
||||||
it.deviceConstellation().refreshDeviceStateAsync().await()
|
it.deviceConstellation().pollForEventsAsync().await()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -161,11 +161,12 @@ class AccountSettingsFragment : PreferenceFragmentCompat() {
|
||||||
requireComponents.analytics.metrics.track(Event.SyncAccountSyncNow)
|
requireComponents.analytics.metrics.track(Event.SyncAccountSyncNow)
|
||||||
// Trigger a sync.
|
// Trigger a sync.
|
||||||
requireComponents.backgroundServices.accountManager.syncNowAsync().await()
|
requireComponents.backgroundServices.accountManager.syncNowAsync().await()
|
||||||
// Poll for device events.
|
// Poll for device events & update devices.
|
||||||
accountManager.authenticatedAccount()
|
accountManager.authenticatedAccount()
|
||||||
?.deviceConstellation()
|
?.deviceConstellation()?.run {
|
||||||
?.refreshDeviceStateAsync()
|
refreshDevicesAsync().await()
|
||||||
?.await()
|
pollForEventsAsync().await()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ object Versions {
|
||||||
const val androidx_work = "2.0.1"
|
const val androidx_work = "2.0.1"
|
||||||
const val google_material = "1.1.0-alpha07"
|
const val google_material = "1.1.0-alpha07"
|
||||||
|
|
||||||
const val mozilla_android_components = "9.0.0-SNAPSHOT"
|
const val mozilla_android_components = "10.0.0-SNAPSHOT"
|
||||||
// Note that android-components also depends on application-services,
|
// Note that android-components also depends on application-services,
|
||||||
// and in fact is our main source of appservices-related functionality.
|
// and in fact is our main source of appservices-related functionality.
|
||||||
// The version number below tracks the application-services version
|
// The version number below tracks the application-services version
|
||||||
|
|
Loading…
Reference in New Issue