From 6942767dfe057cfd1403f5504f20585533e2aa10 Mon Sep 17 00:00:00 2001 From: Sebastian Kaspari Date: Thu, 16 May 2019 18:18:41 -0400 Subject: [PATCH] Remove feature-session-bundling component. --- app/build.gradle | 1 - .../mozilla/fenix/ext/SessionBundleStorage.kt | 23 ------------------- buildSrc/src/main/java/Dependencies.kt | 1 - 3 files changed, 25 deletions(-) delete mode 100644 app/src/main/java/org/mozilla/fenix/ext/SessionBundleStorage.kt diff --git a/app/build.gradle b/app/build.gradle index 96f2a3b3d..edfb537f2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -306,7 +306,6 @@ dependencies { implementation Deps.mozilla_feature_toolbar implementation Deps.mozilla_feature_tabs implementation Deps.mozilla_feature_findinpage - implementation Deps.mozilla_feature_session_bundling implementation Deps.mozilla_feature_site_permissions implementation Deps.mozilla_feature_readerview implementation Deps.mozilla_feature_tab_collections diff --git a/app/src/main/java/org/mozilla/fenix/ext/SessionBundleStorage.kt b/app/src/main/java/org/mozilla/fenix/ext/SessionBundleStorage.kt deleted file mode 100644 index f13b10987..000000000 --- a/app/src/main/java/org/mozilla/fenix/ext/SessionBundleStorage.kt +++ /dev/null @@ -1,23 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.fenix.ext - -import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.launch -import kotlinx.coroutines.withContext -import mozilla.components.browser.session.SessionManager -import mozilla.components.feature.session.bundling.SessionBundleStorage - -suspend fun SessionBundleStorage.archive(sessionManager: SessionManager) { - withContext(Dispatchers.IO) { - save(sessionManager.createSnapshot()) - launch(Dispatchers.Main) { - sessionManager.sessions.filter { !it.private }.forEach { - sessionManager.remove(it) - } - } - new() - } -} diff --git a/buildSrc/src/main/java/Dependencies.kt b/buildSrc/src/main/java/Dependencies.kt index a83b4c009..1eff7dae0 100644 --- a/buildSrc/src/main/java/Dependencies.kt +++ b/buildSrc/src/main/java/Dependencies.kt @@ -106,7 +106,6 @@ object Deps { const val mozilla_feature_prompts = "org.mozilla.components:feature-prompts:${Versions.mozilla_android_components}" const val mozilla_feature_toolbar = "org.mozilla.components:feature-toolbar:${Versions.mozilla_android_components}" const val mozilla_feature_findinpage = "org.mozilla.components:feature-findinpage:${Versions.mozilla_android_components}" - const val mozilla_feature_session_bundling = "org.mozilla.components:feature-session-bundling:${Versions.mozilla_android_components}" const val mozilla_feature_site_permissions = "org.mozilla.components:feature-sitepermissions:${Versions.mozilla_android_components}" const val mozilla_feature_readerview = "org.mozilla.components:feature-readerview:${Versions.mozilla_android_components}" const val mozilla_feature_tab_collections = "org.mozilla.components:feature-tab-collections:${Versions.mozilla_android_components}"