mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-03 23:15:31 +00:00
[fenix] For https://github.com/mozilla-mobile/fenix/issues/22559: Update leak canary version to 2.8.1
This commit is contained in:
parent
95575255f8
commit
e9d42361a0
@ -21,7 +21,7 @@ import org.mozilla.fenix.ext.components
|
|||||||
import org.mozilla.fenix.helpers.HomeActivityTestRule
|
import org.mozilla.fenix.helpers.HomeActivityTestRule
|
||||||
|
|
||||||
// BEFORE INCREASING THESE VALUES, PLEASE CONSULT WITH THE PERF TEAM.
|
// BEFORE INCREASING THESE VALUES, PLEASE CONSULT WITH THE PERF TEAM.
|
||||||
private const val EXPECTED_SUPPRESSION_COUNT = 19
|
private const val EXPECTED_SUPPRESSION_COUNT = 20
|
||||||
@Suppress("TopLevelPropertyNaming") // it's silly this would have a different naming convention b/c no const
|
@Suppress("TopLevelPropertyNaming") // it's silly this would have a different naming convention b/c no const
|
||||||
private val EXPECTED_RUNBLOCKING_RANGE = 0..1 // CI has +1 counts compared to local runs: increment these together
|
private val EXPECTED_RUNBLOCKING_RANGE = 0..1 // CI has +1 counts compared to local runs: increment these together
|
||||||
private const val EXPECTED_RECYCLER_VIEW_CONSTRAINT_LAYOUT_CHILDREN = 4
|
private const val EXPECTED_RECYCLER_VIEW_CONSTRAINT_LAYOUT_CHILDREN = 4
|
||||||
|
@ -8,20 +8,31 @@ import android.os.StrictMode
|
|||||||
import androidx.preference.PreferenceManager
|
import androidx.preference.PreferenceManager
|
||||||
import leakcanary.AppWatcher
|
import leakcanary.AppWatcher
|
||||||
import leakcanary.LeakCanary
|
import leakcanary.LeakCanary
|
||||||
|
import org.mozilla.fenix.ext.application
|
||||||
import org.mozilla.fenix.ext.getPreferenceKey
|
import org.mozilla.fenix.ext.getPreferenceKey
|
||||||
|
|
||||||
class DebugFenixApplication : FenixApplication() {
|
class DebugFenixApplication : FenixApplication() {
|
||||||
|
|
||||||
override fun setupLeakCanary() {
|
override fun setupLeakCanary() {
|
||||||
|
if (!AppWatcher.isInstalled) {
|
||||||
|
AppWatcher.manualInstall(
|
||||||
|
application = application,
|
||||||
|
watchersToInstall = AppWatcher.appDefaultWatchers(application)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
val isEnabled = components.strictMode.resetAfter(StrictMode.allowThreadDiskReads()) {
|
val isEnabled = components.strictMode.resetAfter(StrictMode.allowThreadDiskReads()) {
|
||||||
PreferenceManager.getDefaultSharedPreferences(this)
|
PreferenceManager.getDefaultSharedPreferences(this)
|
||||||
.getBoolean(getPreferenceKey(R.string.pref_key_leakcanary), true)
|
.getBoolean(getPreferenceKey(R.string.pref_key_leakcanary), true)
|
||||||
}
|
}
|
||||||
|
|
||||||
updateLeakCanaryState(isEnabled)
|
updateLeakCanaryState(isEnabled)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun updateLeakCanaryState(isEnabled: Boolean) {
|
override fun updateLeakCanaryState(isEnabled: Boolean) {
|
||||||
AppWatcher.config = AppWatcher.config.copy(enabled = isEnabled)
|
LeakCanary.showLeakDisplayActivityLauncherIcon(isEnabled)
|
||||||
LeakCanary.config = LeakCanary.config.copy(dumpHeap = isEnabled)
|
components.strictMode.resetAfter(StrictMode.allowThreadDiskReads()) {
|
||||||
|
LeakCanary.config = LeakCanary.config.copy(dumpHeap = isEnabled)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ object Versions {
|
|||||||
const val android_lint_api = "30.0.0"
|
const val android_lint_api = "30.0.0"
|
||||||
|
|
||||||
const val sentry = "1.7.10"
|
const val sentry = "1.7.10"
|
||||||
const val leakcanary = "2.4"
|
const val leakcanary = "2.8.1"
|
||||||
const val osslicenses_plugin = "0.10.4"
|
const val osslicenses_plugin = "0.10.4"
|
||||||
const val detekt = "1.17.1"
|
const val detekt = "1.17.1"
|
||||||
const val jna = "5.6.0"
|
const val jna = "5.6.0"
|
||||||
@ -172,7 +172,7 @@ object Deps {
|
|||||||
const val mozilla_support_locale = "org.mozilla.components:support-locale:${Versions.mozilla_android_components}"
|
const val mozilla_support_locale = "org.mozilla.components:support-locale:${Versions.mozilla_android_components}"
|
||||||
|
|
||||||
const val sentry = "io.sentry:sentry-android:${Versions.sentry}"
|
const val sentry = "io.sentry:sentry-android:${Versions.sentry}"
|
||||||
const val leakcanary = "com.squareup.leakcanary:leakcanary-android:${Versions.leakcanary}"
|
const val leakcanary = "com.squareup.leakcanary:leakcanary-android-core:${Versions.leakcanary}"
|
||||||
|
|
||||||
const val androidx_compose_ui = "androidx.compose.ui:ui:${Versions.androidx_compose}"
|
const val androidx_compose_ui = "androidx.compose.ui:ui:${Versions.androidx_compose}"
|
||||||
const val androidx_compose_ui_test = "androidx.compose.ui:ui-test-junit4:${Versions.androidx_compose}"
|
const val androidx_compose_ui_test = "androidx.compose.ui:ui-test-junit4:${Versions.androidx_compose}"
|
||||||
|
Loading…
Reference in New Issue
Block a user