Make the forkDebug build work again

issues/166-allow-fallback-location
Adam Novak 4 years ago
parent a834303419
commit b154857979

@ -9,12 +9,11 @@ import androidx.preference.PreferenceManager
import leakcanary.AppWatcher import leakcanary.AppWatcher
import leakcanary.LeakCanary import leakcanary.LeakCanary
import org.mozilla.fenix.ext.getPreferenceKey import org.mozilla.fenix.ext.getPreferenceKey
import org.mozilla.fenix.ext.resetPoliciesAfter
class DebugFenixApplication : FenixApplication() { class DebugFenixApplication : FenixApplication() {
override fun setupLeakCanary() { override fun setupLeakCanary() {
val isEnabled = StrictMode.allowThreadDiskReads().resetPoliciesAfter { 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)
} }

Loading…
Cancel
Save