diff options
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/java/app/passwordstore/Application.kt | 10 | ||||
-rw-r--r-- | app/src/main/res/values/bools.xml | 1 |
2 files changed, 8 insertions, 3 deletions
diff --git a/app/src/main/java/app/passwordstore/Application.kt b/app/src/main/java/app/passwordstore/Application.kt index 35e1ae22..984adde4 100644 --- a/app/src/main/java/app/passwordstore/Application.kt +++ b/app/src/main/java/app/passwordstore/Application.kt @@ -46,15 +46,19 @@ class Application : android.app.Application(), SharedPreferences.OnSharedPrefere override fun onCreate() { super.onCreate() instance = this - LeakCanary.config = - LeakCanary.config.copy(eventListeners = LeakCanary.config.eventListeners + SentryLeakUploader) + val eventListeners = LeakCanary.config.eventListeners + SentryLeakUploader if ( BuildConfig.ENABLE_DEBUG_FEATURES || prefs.getBoolean(PreferenceKeys.ENABLE_DEBUG_LOGGING, false) ) { LogcatLogger.install(AndroidLogcatLogger(DEBUG)) - AppWatcher.manualInstall(this) setVmPolicy() + LeakCanary.config.copy(dumpHeap = true, eventListeners = eventListeners) + LeakCanary.showLeakDisplayActivityLauncherIcon(true) + AppWatcher.manualInstall(this) + } else { + LeakCanary.config.copy(dumpHeap = false, eventListeners = eventListeners) + LeakCanary.showLeakDisplayActivityLauncherIcon(false) } prefs.registerOnSharedPreferenceChangeListener(this) setNightMode() diff --git a/app/src/main/res/values/bools.xml b/app/src/main/res/values/bools.xml index 78f5307a..02c5129a 100644 --- a/app/src/main/res/values/bools.xml +++ b/app/src/main/res/values/bools.xml @@ -5,5 +5,6 @@ <resources> <bool name="leak_canary_allow_in_non_debuggable_build">true</bool> + <bool name="leak_canary_watcher_auto_install">false</bool> <bool name="light_status_bar">true</bool> </resources> |