No issue: move StrictModeManager to perf package.

While StrictMode is not exclusively used for performance purposes, it's
primarily used for perf purposes so let's move it to the perf package
and code owner it.
upstream-sync
Michael Comella 4 years ago committed by Michael Comella
parent 99600247bb
commit e8bf955893

@ -16,7 +16,7 @@ import mozilla.components.concept.sync.OAuthAccount
import mozilla.components.lib.crash.CrashReporter import mozilla.components.lib.crash.CrashReporter
import mozilla.components.service.fxa.manager.FxaAccountManager import mozilla.components.service.fxa.manager.FxaAccountManager
import mozilla.components.support.base.log.logger.Logger import mozilla.components.support.base.log.logger.Logger
import org.mozilla.fenix.StrictModeManager import org.mozilla.fenix.perf.StrictModeManager
import kotlin.coroutines.CoroutineContext import kotlin.coroutines.CoroutineContext
/** /**

@ -36,7 +36,7 @@ import mozilla.components.service.sync.logins.SyncableLoginsStorage
import mozilla.components.support.utils.RunWhenReadyQueue import mozilla.components.support.utils.RunWhenReadyQueue
import org.mozilla.fenix.Config import org.mozilla.fenix.Config
import org.mozilla.fenix.R import org.mozilla.fenix.R
import org.mozilla.fenix.StrictModeManager import org.mozilla.fenix.perf.StrictModeManager
import org.mozilla.fenix.components.metrics.Event import org.mozilla.fenix.components.metrics.Event
import org.mozilla.fenix.components.metrics.MetricController import org.mozilla.fenix.components.metrics.MetricController
import org.mozilla.fenix.ext.components import org.mozilla.fenix.ext.components

@ -19,7 +19,7 @@ import mozilla.components.support.migration.state.MigrationStore
import org.mozilla.fenix.BuildConfig import org.mozilla.fenix.BuildConfig
import org.mozilla.fenix.Config import org.mozilla.fenix.Config
import org.mozilla.fenix.HomeActivity import org.mozilla.fenix.HomeActivity
import org.mozilla.fenix.StrictModeManager import org.mozilla.fenix.perf.StrictModeManager
import org.mozilla.fenix.components.metrics.AppStartupTelemetry import org.mozilla.fenix.components.metrics.AppStartupTelemetry
import org.mozilla.fenix.ext.settings import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.perf.lazyMonitored import org.mozilla.fenix.perf.lazyMonitored

@ -63,7 +63,7 @@ import org.mozilla.fenix.AppRequestInterceptor
import org.mozilla.fenix.Config import org.mozilla.fenix.Config
import org.mozilla.fenix.HomeActivity import org.mozilla.fenix.HomeActivity
import org.mozilla.fenix.R import org.mozilla.fenix.R
import org.mozilla.fenix.StrictModeManager import org.mozilla.fenix.perf.StrictModeManager
import org.mozilla.fenix.TelemetryMiddleware import org.mozilla.fenix.TelemetryMiddleware
import org.mozilla.fenix.downloads.DownloadService import org.mozilla.fenix.downloads.DownloadService
import org.mozilla.fenix.ext.components import org.mozilla.fenix.ext.components

@ -19,7 +19,7 @@ import mozilla.components.feature.tab.collections.TabCollection
import mozilla.components.feature.tab.collections.TabCollectionStorage import mozilla.components.feature.tab.collections.TabCollectionStorage
import mozilla.components.support.base.observer.Observable import mozilla.components.support.base.observer.Observable
import mozilla.components.support.base.observer.ObserverRegistry import mozilla.components.support.base.observer.ObserverRegistry
import org.mozilla.fenix.StrictModeManager import org.mozilla.fenix.perf.StrictModeManager
import org.mozilla.fenix.ext.components import org.mozilla.fenix.ext.components
import org.mozilla.fenix.ext.toShortUrl import org.mozilla.fenix.ext.toShortUrl
import org.mozilla.fenix.home.sessioncontrol.viewholders.CollectionViewHolder import org.mozilla.fenix.home.sessioncontrol.viewholders.CollectionViewHolder

@ -7,7 +7,7 @@
// methods so we suppress the check. // methods so we suppress the check.
@file:Suppress("MozillaStrictModeSuppression") @file:Suppress("MozillaStrictModeSuppression")
package org.mozilla.fenix package org.mozilla.fenix.perf
import android.os.Build import android.os.Build
import android.os.Looper import android.os.Looper
@ -17,8 +17,8 @@ import androidx.annotation.VisibleForTesting.PRIVATE
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager import androidx.fragment.app.FragmentManager
import mozilla.components.support.ktx.android.os.resetAfter import mozilla.components.support.ktx.android.os.resetAfter
import org.mozilla.fenix.Config
import org.mozilla.fenix.components.Components import org.mozilla.fenix.components.Components
import org.mozilla.fenix.perf.Performance
import org.mozilla.fenix.utils.Mockable import org.mozilla.fenix.utils.Mockable
import java.util.concurrent.atomic.AtomicLong import java.util.concurrent.atomic.AtomicLong

@ -17,7 +17,7 @@ import org.junit.Assert.assertEquals
import org.junit.Assert.fail import org.junit.Assert.fail
import org.junit.Test import org.junit.Test
import org.junit.runner.RunWith import org.junit.runner.RunWith
import org.mozilla.fenix.StrictModeManager import org.mozilla.fenix.perf.StrictModeManager
import org.mozilla.fenix.helpers.TestStrictModeManager import org.mozilla.fenix.helpers.TestStrictModeManager
import kotlin.coroutines.CoroutineContext import kotlin.coroutines.CoroutineContext

@ -6,7 +6,7 @@ package org.mozilla.fenix.helpers
import android.os.StrictMode import android.os.StrictMode
import io.mockk.mockk import io.mockk.mockk
import org.mozilla.fenix.StrictModeManager import org.mozilla.fenix.perf.StrictModeManager
/** /**
* A test version of [StrictModeManager]. This class is difficult to mock because of [resetAfter] * A test version of [StrictModeManager]. This class is difficult to mock because of [resetAfter]

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.fenix package org.mozilla.fenix.perf
import android.os.StrictMode import android.os.StrictMode
import androidx.fragment.app.FragmentManager import androidx.fragment.app.FragmentManager
@ -21,6 +21,8 @@ import org.junit.Assert.fail
import org.junit.Before import org.junit.Before
import org.junit.Test import org.junit.Test
import org.junit.runner.RunWith import org.junit.runner.RunWith
import org.mozilla.fenix.Config
import org.mozilla.fenix.ReleaseChannel
import org.mozilla.fenix.components.Components import org.mozilla.fenix.components.Components
import org.mozilla.fenix.helpers.FenixRobolectricTestRunner import org.mozilla.fenix.helpers.FenixRobolectricTestRunner
Loading…
Cancel
Save