Something went wrong. Try again.
A fork of Simple Time Tracker with WearOS support. (Now integrated upstream)
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950package com.example.util.simpletimetracker
import android.app.Applicationimport android.os.StrictModeimport androidx.emoji2.bundled.BundledEmojiCompatConfigimport androidx.emoji2.text.EmojiCompatimport dagger.hilt.android.HiltAndroidAppimport timber.log.Timberimport timber.log.Timber.DebugTree
@HiltAndroidAppclass TimeTrackerApp : Application() {
override fun onCreate() { super.onCreate() initLog() initLibraries() initStrictMode() }
private fun initLog() { if (BuildConfig.DEBUG) { Timber.plant(DebugTree()) } }
private fun initLibraries() { val config = BundledEmojiCompatConfig(applicationContext) .setReplaceAll(true) EmojiCompat.init(config) }
private fun initStrictMode() { if (BuildConfig.DEBUG) { StrictMode.setThreadPolicy( StrictMode.ThreadPolicy.Builder() .detectAll() .penaltyLog() .penaltyDialog() .build(), ) StrictMode.setVmPolicy( StrictMode.VmPolicy.Builder() .detectAll() .penaltyLog() .build(), ) } }}