1
0
mirror of https://github.com/AllanWang/Frost-for-Facebook.git synced 2024-11-10 04:52:38 +01:00

Init bugsnag after pref setup

This commit is contained in:
Allan Wang 2019-07-28 11:08:47 -07:00
parent 65ad23e076
commit 4744662f5c
No known key found for this signature in database
GPG Key ID: C93E3F9C679D7A56

View File

@ -84,22 +84,13 @@ class FrostApp : Application() {
.withDatabase(NotificationDb.NAME, NotificationDb::class) .withDatabase(NotificationDb.NAME, NotificationDb::class)
.build() .build()
) )
Showcase.initialize(this, "${BuildConfig.APPLICATION_ID}.showcase")
Prefs.initialize(this, "${BuildConfig.APPLICATION_ID}.prefs")
// if (LeakCanary.isInAnalyzerProcess(this)) return // if (LeakCanary.isInAnalyzerProcess(this)) return
// refWatcher = LeakCanary.install(this) // refWatcher = LeakCanary.install(this)
initPrefs()
initBugsnag() initBugsnag()
KL.shouldLog = { BuildConfig.DEBUG }
Prefs.verboseLogging = false
L.i { "Begin Frost for Facebook" } L.i { "Begin Frost for Facebook" }
FrostPglAdBlock.init(this) FrostPglAdBlock.init(this)
if (Prefs.installDate == -1L) {
Prefs.installDate = System.currentTimeMillis()
}
if (Prefs.identifier == -1) {
Prefs.identifier = Random().nextInt(Int.MAX_VALUE)
}
Prefs.lastLaunch = System.currentTimeMillis()
super.onCreate() super.onCreate()
@ -150,6 +141,19 @@ class FrostApp : Application() {
} }
} }
private fun initPrefs() {
Prefs.initialize(this, "${BuildConfig.APPLICATION_ID}.prefs")
KL.shouldLog = { BuildConfig.DEBUG }
Prefs.verboseLogging = false
if (Prefs.installDate == -1L) {
Prefs.installDate = System.currentTimeMillis()
}
if (Prefs.identifier == -1) {
Prefs.identifier = Random().nextInt(Int.MAX_VALUE)
}
Prefs.lastLaunch = System.currentTimeMillis()
}
private fun initBugsnag() { private fun initBugsnag() {
if (BuildConfig.DEBUG) { if (BuildConfig.DEBUG) {
return return