diff --git a/app/src/main/java/sopt/uni/UniApplication.kt b/app/src/main/java/sopt/uni/UniApplication.kt index 1c41270..bd58145 100644 --- a/app/src/main/java/sopt/uni/UniApplication.kt +++ b/app/src/main/java/sopt/uni/UniApplication.kt @@ -12,12 +12,31 @@ import timber.log.Timber class UniApplication : Application() { override fun onCreate() { super.onCreate() + initializeSparkleStorage() + initializeKakaoSdk() + initializeDebugTree() + setDefaultNightMode() + clearSharedPreferences() + } + + private fun initializeSparkleStorage() { SparkleStorage.init(this) SparkleStorage.timerClear() + } + + private fun initializeKakaoSdk() { KakaoSdk.init(this, BuildConfig.KAKAO_APP_KEY) + } + + private fun initializeDebugTree() { if (BuildConfig.DEBUG) Timber.plant(Timber.DebugTree()) + } + + private fun setDefaultNightMode() { AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO) + } + private fun clearSharedPreferences() { val sharedPreferences = applicationContext.getSharedPreferences("timer_prefs", Context.MODE_PRIVATE) val editor = sharedPreferences.edit()