Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Application services 93.0.1 #12044

Merged
merged 3 commits into from
May 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion buildSrc/src/main/java/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ object Versions {
const val disklrucache = "2.0.2"
const val leakcanary = "2.8.1"

const val mozilla_appservices = "91.1.2"
const val mozilla_appservices = "93.0.1"

const val mozilla_glean = "44.1.1"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

package mozilla.components.browser.storage.sync

import android.content.Context
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.cancelChildren
Expand All @@ -15,16 +16,20 @@ import mozilla.components.concept.sync.Device
import mozilla.components.concept.sync.SyncableStore
import mozilla.components.support.base.log.logger.Logger
import mozilla.components.support.utils.logElapsedTime
import java.io.File
import mozilla.appservices.remotetabs.InternalException as RemoteTabProviderException
import mozilla.appservices.remotetabs.TabsStore as RemoteTabsProvider

private const val TABS_DB_NAME = "tabs.sqlite"

/**
* An interface which defines read/write methods for remote tabs data.
*/
open class RemoteTabsStorage(
private val context: Context,
private val crashReporter: CrashReporting? = null
) : Storage, SyncableStore {
internal val api by lazy { RemoteTabsProvider() }
internal val api by lazy { RemoteTabsProvider(File(context.filesDir, TABS_DB_NAME).canonicalPath) }
private val scope by lazy { CoroutineScope(Dispatchers.IO) }
internal val logger = Logger("RemoteTabsStorage")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import mozilla.appservices.remotetabs.RemoteTab
import mozilla.components.concept.base.crash.CrashReporting
import mozilla.components.support.test.any
import mozilla.components.support.test.mock
import mozilla.components.support.test.robolectric.testContext
import org.junit.After
import org.junit.Assert.assertEquals
import org.junit.Before
Expand All @@ -36,7 +37,7 @@ class RemoteTabsStorageTest {
@Before
fun setup() {
crashReporter = mock()
remoteTabs = spy(RemoteTabsStorage(crashReporter))
remoteTabs = spy(RemoteTabsStorage(testContext, crashReporter))
apiMock = mock(RemoteTabsProvider::class.java)
`when`(remoteTabs.api).thenReturn(apiMock)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import mozilla.components.support.ktx.kotlinx.coroutines.flow.ifChanged
class SyncedTabsStorage(
private val accountManager: FxaAccountManager,
private val store: BrowserStore,
private val tabsStorage: RemoteTabsStorage = RemoteTabsStorage(),
private val tabsStorage: RemoteTabsStorage,
private val debounceMillis: Long = 1000L,
) : SyncedTabsProvider {
private var scope: CoroutineScope? = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ class NimbusPlugin implements Plugin<Project> {
// a) this plugin is going to live in the AS repo (eventually)
// See https://github.com/mozilla-mobile/android-components/issues/11422 for tying this
// to a version that is specified in buildSrc/src/main/java/Dependencies.kt
return "92.0.0"
return "93.0.1"
}

// Try one or more hosts to download the given file.
Expand Down
10 changes: 8 additions & 2 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,19 @@ permalink: /changelog/

* **lib-crash-sentry**
* 🌟️️ Add `sendCaughtExceptions` config flag to `SentryService`, allowing consumers to disable submitting caught exceptions. By default it's enabled, maintaining prior behaviour. Useful in projects with high volumes of caught exceptions and multiple release channels.

* **site-permission-feature**
* 🆕 New Add to SitePermissionsFeature a property to set visibility for NotAskAgainCheckBox

* **feature-search**
* 🆕 Update search Engines and Search Engine Icons


* **browser-storage-sync**
* ⚠️ **This is a breaking change**: When constructing a `RemoteTabsStorage` object you must now a `Context` which is used to determine the location of the sqlite database which is used to persist the remote tabs [#11799](https://github.com/mozilla-mobile/android-components/pull/11799).

* **feature-syncedtabs**
* ⚠️ **This is a breaking change**: When constructing a `SyncedTabsStorage`, the `tabsStorage: RemoteTabsStorage` parameter is no longer optional so must be supplied [#11799](https://github.com/mozilla-mobile/android-components/pull/11799).

# 99.0.0
* [Commits](https://github.com/mozilla-mobile/android-components/compare/v98.0.0...v99.0.0)
* [Milestone](https://github.com/mozilla-mobile/android-components/milestone/146?closed=1)
Expand Down