aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-06-04 11:15:37 -0700
committerAllan Wang <me@allanwang.ca>2017-06-04 11:15:37 -0700
commitbb49bd9c9f4fe44426c9a576827ad6a96a3ebda4 (patch)
tree483ed9b5d0da645053ef6f3ab3cea3e821d95e7d /app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt
parent5aac1cda7b1ad561131de109d1f29e8e7b730e82 (diff)
downloadfrost-bb49bd9c9f4fe44426c9a576827ad6a96a3ebda4.tar.gz
frost-bb49bd9c9f4fe44426c9a576827ad6a96a3ebda4.tar.bz2
frost-bb49bd9c9f4fe44426c9a576827ad6a96a3ebda4.zip
Clean up Refwatcher
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt20
1 files changed, 9 insertions, 11 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt b/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt
index 5527e434..b7b6b2d5 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt
@@ -29,21 +29,19 @@ import timber.log.Timber.DebugTree
*/
class FrostApp : Application() {
- companion object {
- fun refWatcher(c: Context) = (c.applicationContext as FrostApp).refWatcher
- }
+// companion object {
+// fun refWatcher(c: Context) = (c.applicationContext as FrostApp).refWatcher
+// }
lateinit var refWatcher: RefWatcher
override fun onCreate() {
- if (LeakCanary.isInAnalyzerProcess(this)) {
- // This process is dedicated to LeakCanary for heap analysis.
- // You should not init your app in this process.
- return;
- }
- refWatcher = LeakCanary.install(this);
- if (BuildConfig.DEBUG) Timber.plant(DebugTree())
- else {
+ if (LeakCanary.isInAnalyzerProcess(this)) return
+ refWatcher = LeakCanary.install(this)
+ if (BuildConfig.DEBUG) {
+ Timber.plant(DebugTree())
+ LeakCanary.enableDisplayLeakActivity(this)
+ } else {
Fabric.with(this, Crashlytics(), Answers())
Timber.plant(CrashReportingTree())
}