fix: actually apply LeakCanary config changes

This commit is contained in:
Harsh Shandilya 2023-04-10 16:06:39 +05:30
parent 11be4cf794
commit 5ab0c53d03
No known key found for this signature in database

View file

@ -54,10 +54,10 @@ class Application : android.app.Application(), SharedPreferences.OnSharedPrefere
LogcatLogger.install(AndroidLogcatLogger(DEBUG))
setVmPolicy()
AppWatcher.manualInstall(this)
LeakCanary.config.copy(dumpHeap = true, eventListeners = eventListeners)
LeakCanary.config = LeakCanary.config.copy(dumpHeap = true, eventListeners = eventListeners)
LeakCanary.showLeakDisplayActivityLauncherIcon(true)
} else {
LeakCanary.config.copy(dumpHeap = false, eventListeners = eventListeners)
LeakCanary.config = LeakCanary.config.copy(dumpHeap = false, eventListeners = eventListeners)
}
prefs.registerOnSharedPreferenceChangeListener(this)
setNightMode()