No Issue - Fixes warnings / compiler errors with A-C update
parent
c5f18e0f96
commit
1b1f9348dc
|
@ -79,6 +79,7 @@ class AppRequestInterceptor(private val context: Context) : RequestInterceptor {
|
|||
ErrorType.ERROR_FILE_ACCESS_DENIED,
|
||||
ErrorType.ERROR_PROXY_CONNECTION_REFUSED,
|
||||
ErrorType.ERROR_UNKNOWN_PROXY_HOST,
|
||||
ErrorType.ERROR_NO_INTERNET,
|
||||
ErrorType.ERROR_UNKNOWN_PROTOCOL -> RiskLevel.Low
|
||||
|
||||
ErrorType.ERROR_SECURITY_BAD_CERT,
|
||||
|
|
|
@ -27,7 +27,7 @@ import mozilla.components.browser.session.Session
|
|||
import mozilla.components.browser.session.SessionManager
|
||||
import mozilla.components.concept.engine.EngineView
|
||||
import mozilla.components.service.fxa.sync.SyncReason
|
||||
import mozilla.components.support.base.feature.BackHandler
|
||||
import mozilla.components.support.base.feature.UserInteractionHandler
|
||||
import mozilla.components.support.ktx.kotlin.isUrl
|
||||
import mozilla.components.support.ktx.kotlin.toNormalizedUrl
|
||||
import mozilla.components.support.utils.Browsers
|
||||
|
@ -167,7 +167,7 @@ open class HomeActivity : AppCompatActivity() {
|
|||
|
||||
final override fun onBackPressed() {
|
||||
supportFragmentManager.primaryNavigationFragment?.childFragmentManager?.fragments?.forEach {
|
||||
if (it is BackHandler && it.onBackPressed()) {
|
||||
if (it is UserInteractionHandler && it.onBackPressed()) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ import mozilla.components.feature.session.SwipeRefreshFeature
|
|||
import mozilla.components.feature.sitepermissions.SitePermissions
|
||||
import mozilla.components.feature.sitepermissions.SitePermissionsFeature
|
||||
import mozilla.components.feature.sitepermissions.SitePermissionsRules
|
||||
import mozilla.components.support.base.feature.BackHandler
|
||||
import mozilla.components.support.base.feature.UserInteractionHandler
|
||||
import mozilla.components.support.base.feature.PermissionsFeature
|
||||
import mozilla.components.support.base.feature.ViewBoundFeatureWrapper
|
||||
import mozilla.components.support.ktx.android.view.exitImmersiveModeIfNeeded
|
||||
|
@ -93,7 +93,7 @@ import org.mozilla.fenix.theme.ThemeManager
|
|||
* UI code specific to the app or to custom tabs can be found in the subclasses.
|
||||
*/
|
||||
@Suppress("TooManyFunctions", "LargeClass")
|
||||
abstract class BaseBrowserFragment : Fragment(), BackHandler, SessionManager.Observer {
|
||||
abstract class BaseBrowserFragment : Fragment(), UserInteractionHandler, SessionManager.Observer {
|
||||
protected lateinit var browserFragmentStore: BrowserFragmentStore
|
||||
protected lateinit var browserInteractor: BrowserToolbarViewInteractor
|
||||
protected lateinit var browserToolbarView: BrowserToolbarView
|
||||
|
|
|
@ -27,7 +27,7 @@ import mozilla.components.feature.session.TrackingProtectionUseCases
|
|||
import mozilla.components.feature.sitepermissions.SitePermissions
|
||||
import mozilla.components.feature.tabs.WindowFeature
|
||||
import mozilla.components.lib.state.ext.consumeFrom
|
||||
import mozilla.components.support.base.feature.BackHandler
|
||||
import mozilla.components.support.base.feature.UserInteractionHandler
|
||||
import mozilla.components.support.base.feature.ViewBoundFeatureWrapper
|
||||
import org.jetbrains.anko.dimen
|
||||
import org.mozilla.fenix.HomeActivity
|
||||
|
@ -49,7 +49,7 @@ import org.mozilla.fenix.trackingprotection.TrackingProtectionOverlay
|
|||
*/
|
||||
@ExperimentalCoroutinesApi
|
||||
@Suppress("TooManyFunctions", "LargeClass")
|
||||
class BrowserFragment : BaseBrowserFragment(), BackHandler {
|
||||
class BrowserFragment : BaseBrowserFragment(), UserInteractionHandler {
|
||||
|
||||
private val windowFeature = ViewBoundFeatureWrapper<WindowFeature>()
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package org.mozilla.fenix.components
|
|||
import android.view.View
|
||||
import android.view.ViewStub
|
||||
import androidx.annotation.UiThread
|
||||
import mozilla.components.support.base.feature.BackHandler
|
||||
import mozilla.components.support.base.feature.UserInteractionHandler
|
||||
import mozilla.components.support.base.feature.LifecycleAwareFeature
|
||||
import java.lang.ref.WeakReference
|
||||
|
||||
|
@ -16,7 +16,7 @@ import java.lang.ref.WeakReference
|
|||
*/
|
||||
abstract class InflationAwareFeature(
|
||||
private val stub: ViewStub
|
||||
) : LifecycleAwareFeature, BackHandler {
|
||||
) : LifecycleAwareFeature, UserInteractionHandler {
|
||||
|
||||
internal lateinit var view: WeakReference<View>
|
||||
internal var feature: LifecycleAwareFeature? = null
|
||||
|
@ -62,7 +62,7 @@ abstract class InflationAwareFeature(
|
|||
* @return true if the feature also implements [BackHandler] and the feature has been initiated.
|
||||
*/
|
||||
override fun onBackPressed(): Boolean {
|
||||
return (feature as? BackHandler)?.onBackPressed() ?: false
|
||||
return (feature as? UserInteractionHandler)?.onBackPressed() ?: false
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -14,7 +14,7 @@ import mozilla.components.browser.session.SessionManager
|
|||
import mozilla.components.browser.toolbar.BrowserToolbar
|
||||
import mozilla.components.browser.toolbar.display.DisplayToolbar
|
||||
import mozilla.components.feature.customtabs.CustomTabsToolbarFeature
|
||||
import mozilla.components.support.base.feature.BackHandler
|
||||
import mozilla.components.support.base.feature.UserInteractionHandler
|
||||
import mozilla.components.support.base.feature.LifecycleAwareFeature
|
||||
import org.mozilla.fenix.R
|
||||
import org.mozilla.fenix.components.toolbar.ToolbarMenu
|
||||
|
@ -28,7 +28,7 @@ class CustomTabsIntegration(
|
|||
activity: Activity,
|
||||
engineLayout: View,
|
||||
onItemTapped: (ToolbarMenu.Item) -> Unit = {}
|
||||
) : LifecycleAwareFeature, BackHandler {
|
||||
) : LifecycleAwareFeature, UserInteractionHandler {
|
||||
|
||||
init {
|
||||
// Remove toolbar shadow
|
||||
|
|
|
@ -25,7 +25,7 @@ import mozilla.components.feature.pwa.feature.WebAppSiteControlsFeature
|
|||
import mozilla.components.feature.session.TrackingProtectionUseCases
|
||||
import mozilla.components.feature.sitepermissions.SitePermissions
|
||||
import mozilla.components.lib.state.ext.consumeFrom
|
||||
import mozilla.components.support.base.feature.BackHandler
|
||||
import mozilla.components.support.base.feature.UserInteractionHandler
|
||||
import mozilla.components.support.base.feature.ViewBoundFeatureWrapper
|
||||
import mozilla.components.support.ktx.android.arch.lifecycle.addObservers
|
||||
import org.mozilla.fenix.R
|
||||
|
@ -40,7 +40,7 @@ import org.mozilla.fenix.ext.requireComponents
|
|||
* Fragment used for browsing the web within external apps.
|
||||
*/
|
||||
@ExperimentalCoroutinesApi
|
||||
class ExternalAppBrowserFragment : BaseBrowserFragment(), BackHandler {
|
||||
class ExternalAppBrowserFragment : BaseBrowserFragment(), UserInteractionHandler {
|
||||
|
||||
private val args by navArgs<ExternalAppBrowserFragmentArgs>()
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ import mozilla.components.concept.sync.AccountObserver
|
|||
import mozilla.components.concept.sync.AuthType
|
||||
import mozilla.components.concept.sync.OAuthAccount
|
||||
import mozilla.components.lib.state.ext.consumeFrom
|
||||
import mozilla.components.support.base.feature.BackHandler
|
||||
import mozilla.components.support.base.feature.UserInteractionHandler
|
||||
import org.mozilla.fenix.R
|
||||
import org.mozilla.fenix.components.FenixSnackbarPresenter
|
||||
import org.mozilla.fenix.components.StoreProvider
|
||||
|
@ -50,7 +50,7 @@ import org.mozilla.fenix.library.LibraryPageFragment
|
|||
import org.mozilla.fenix.utils.allowUndo
|
||||
|
||||
@Suppress("TooManyFunctions", "LargeClass")
|
||||
class BookmarkFragment : LibraryPageFragment<BookmarkNode>(), BackHandler {
|
||||
class BookmarkFragment : LibraryPageFragment<BookmarkNode>(), UserInteractionHandler {
|
||||
|
||||
private lateinit var bookmarkStore: BookmarkFragmentStore
|
||||
private lateinit var bookmarkView: BookmarkView
|
||||
|
|
|
@ -11,7 +11,7 @@ import androidx.core.view.isVisible
|
|||
import kotlinx.android.synthetic.main.component_bookmark.view.*
|
||||
import mozilla.appservices.places.BookmarkRoot
|
||||
import mozilla.components.concept.storage.BookmarkNode
|
||||
import mozilla.components.support.base.feature.BackHandler
|
||||
import mozilla.components.support.base.feature.UserInteractionHandler
|
||||
import org.mozilla.fenix.R
|
||||
import org.mozilla.fenix.library.LibraryPageView
|
||||
import org.mozilla.fenix.library.SelectionInteractor
|
||||
|
@ -95,7 +95,7 @@ interface BookmarkViewInteractor : SelectionInteractor<BookmarkNode> {
|
|||
class BookmarkView(
|
||||
container: ViewGroup,
|
||||
val interactor: BookmarkViewInteractor
|
||||
) : LibraryPageView(container), BackHandler {
|
||||
) : LibraryPageView(container), UserInteractionHandler {
|
||||
|
||||
val view: View = LayoutInflater.from(container.context)
|
||||
.inflate(R.layout.component_bookmark, container, true)
|
||||
|
|
|
@ -22,7 +22,7 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi
|
|||
import kotlinx.coroutines.launch
|
||||
import mozilla.components.concept.engine.prompt.ShareData
|
||||
import mozilla.components.lib.state.ext.consumeFrom
|
||||
import mozilla.components.support.base.feature.BackHandler
|
||||
import mozilla.components.support.base.feature.UserInteractionHandler
|
||||
import org.mozilla.fenix.BrowserDirection
|
||||
import org.mozilla.fenix.HomeActivity
|
||||
import org.mozilla.fenix.R
|
||||
|
@ -38,7 +38,7 @@ import org.mozilla.fenix.ext.showToolbar
|
|||
import org.mozilla.fenix.library.LibraryPageFragment
|
||||
|
||||
@SuppressWarnings("TooManyFunctions", "LargeClass")
|
||||
class HistoryFragment : LibraryPageFragment<HistoryItem>(), BackHandler {
|
||||
class HistoryFragment : LibraryPageFragment<HistoryItem>(), UserInteractionHandler {
|
||||
private lateinit var historyStore: HistoryFragmentStore
|
||||
private lateinit var historyView: HistoryView
|
||||
private lateinit var historyInteractor: HistoryInteractor
|
||||
|
|
|
@ -12,7 +12,7 @@ import androidx.recyclerview.widget.LinearLayoutManager
|
|||
import androidx.recyclerview.widget.SimpleItemAnimator
|
||||
import kotlinx.android.synthetic.main.component_history.*
|
||||
import kotlinx.android.synthetic.main.component_history.view.*
|
||||
import mozilla.components.support.base.feature.BackHandler
|
||||
import mozilla.components.support.base.feature.UserInteractionHandler
|
||||
import org.mozilla.fenix.R
|
||||
import org.mozilla.fenix.library.LibraryPageView
|
||||
import org.mozilla.fenix.library.SelectionInteractor
|
||||
|
@ -51,7 +51,7 @@ interface HistoryViewInteractor : SelectionInteractor<HistoryItem> {
|
|||
class HistoryView(
|
||||
container: ViewGroup,
|
||||
val interactor: HistoryInteractor
|
||||
) : LibraryPageView(container), BackHandler {
|
||||
) : LibraryPageView(container), UserInteractionHandler {
|
||||
|
||||
val view: View = LayoutInflater.from(container.context)
|
||||
.inflate(R.layout.component_history, container, true)
|
||||
|
|
|
@ -27,7 +27,7 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi
|
|||
import mozilla.components.concept.storage.HistoryStorage
|
||||
import mozilla.components.feature.qr.QrFeature
|
||||
import mozilla.components.lib.state.ext.consumeFrom
|
||||
import mozilla.components.support.base.feature.BackHandler
|
||||
import mozilla.components.support.base.feature.UserInteractionHandler
|
||||
import mozilla.components.support.base.feature.ViewBoundFeatureWrapper
|
||||
import mozilla.components.support.ktx.android.content.hasCamera
|
||||
import mozilla.components.support.ktx.android.content.isPermissionGranted
|
||||
|
@ -47,7 +47,7 @@ import org.mozilla.fenix.ext.components
|
|||
import org.mozilla.fenix.ext.settings
|
||||
|
||||
@Suppress("TooManyFunctions", "LargeClass")
|
||||
class SearchFragment : Fragment(), BackHandler {
|
||||
class SearchFragment : Fragment(), UserInteractionHandler {
|
||||
private lateinit var toolbarView: ToolbarView
|
||||
private lateinit var awesomeBarView: AwesomeBarView
|
||||
private val qrFeature = ViewBoundFeatureWrapper<QrFeature>()
|
||||
|
|
|
@ -16,13 +16,13 @@ import androidx.navigation.fragment.NavHostFragment.findNavController
|
|||
import androidx.navigation.fragment.findNavController
|
||||
import kotlinx.android.synthetic.main.fragment_pair.*
|
||||
import mozilla.components.feature.qr.QrFeature
|
||||
import mozilla.components.support.base.feature.BackHandler
|
||||
import mozilla.components.support.base.feature.UserInteractionHandler
|
||||
import mozilla.components.support.base.feature.ViewBoundFeatureWrapper
|
||||
import org.mozilla.fenix.R
|
||||
import org.mozilla.fenix.ext.requireComponents
|
||||
import org.mozilla.fenix.ext.showToolbar
|
||||
|
||||
class PairFragment : Fragment(R.layout.fragment_pair), BackHandler {
|
||||
class PairFragment : Fragment(R.layout.fragment_pair), UserInteractionHandler {
|
||||
|
||||
private val qrFeature = ViewBoundFeatureWrapper<QrFeature>()
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ import mozilla.components.browser.session.Session
|
|||
import mozilla.components.concept.engine.content.blocking.Tracker
|
||||
import mozilla.components.feature.session.TrackingProtectionUseCases
|
||||
import mozilla.components.lib.state.ext.observe
|
||||
import mozilla.components.support.base.feature.BackHandler
|
||||
import mozilla.components.support.base.feature.UserInteractionHandler
|
||||
import mozilla.components.support.base.log.logger.Logger
|
||||
import org.mozilla.fenix.HomeActivity
|
||||
import org.mozilla.fenix.R
|
||||
|
@ -38,7 +38,7 @@ import org.mozilla.fenix.ext.metrics
|
|||
import org.mozilla.fenix.ext.nav
|
||||
import org.mozilla.fenix.ext.requireComponents
|
||||
|
||||
class TrackingProtectionPanelDialogFragment : AppCompatDialogFragment(), BackHandler {
|
||||
class TrackingProtectionPanelDialogFragment : AppCompatDialogFragment(), UserInteractionHandler {
|
||||
|
||||
private val args by navArgs<TrackingProtectionPanelDialogFragmentArgs>()
|
||||
|
||||
|
|
Loading…
Reference in New Issue