<commit_before>package fr.nicopico.dashclock.birthday

import android.content.Intent
import android.content.SharedPreferences
import android.content.res.Configuration
import android.content.res.Resources
import android.net.Uri
import android.preference.PreferenceManager
import android.provider.ContactsContract.Contacts
import com.google.android.apps.dashclock.api.DashClockExtension
import com.google.android.apps.dashclock.api.ExtensionData
import fr.nicopico.happybirthday.domain.model.Contact
import fr.nicopico.happybirthday.domain.model.nextBirthdaySorter
import fr.nicopico.happybirthday.extensions.toCalendar
import rx.Subscriber
import rx.schedulers.Schedulers
import timber.log.Timber
import java.util.*

class BirthdayService : DashClockExtension() {

    private val DEFAULT_LANG = BuildConfig.DEFAULT_LANG

    private val contactRepository by lazy {
        DaggerAppComponent.builder()
                .appModule(AppModule(application))
                .build()
                .contactRepository()
    }
    private val prefs: SharedPreferences by lazy {
        PreferenceManager.getDefaultSharedPreferences(applicationContext)
    }

    private var daysLimit: Int = 0
    private var showQuickContact: Boolean = false
    private var disableLocalization: Boolean = false
    private var contactGroupId: Long? = null

    private var needToRefreshLocalization: Boolean = false

    override fun onCreate() {
        super.onCreate()
        if (BuildConfig.DEBUG) {
            Timber.plant(Timber.DebugTree())
        }
    }

    override fun onInitialize(isReconnect: Boolean) {<commit_msg>DashClock: enable SQLBrite logging on debug variants<commit_after>package fr.nicopico.dashclock.birthday

import android.content.Intent
import android.content.SharedPreferences
import android.content.res.Configuration
import android.content.res.Resources
import android.net.Uri
import android.preference.PreferenceManager
import android.provider.ContactsContract.Contacts
import com.google.android.apps.dashclock.api.DashClockExtension
import com.google.android.apps.dashclock.api.ExtensionData
import fr.nicopico.happybirthday.domain.model.Contact
import fr.nicopico.happybirthday.domain.model.nextBirthdaySorter
import fr.nicopico.happybirthday.extensions.toCalendar
import fr.nicopico.happybirthday.inject.DataModule
import rx.Subscriber
import rx.schedulers.Schedulers
import timber.log.Timber
import java.util.*

class BirthdayService : DashClockExtension() {

    private val DEFAULT_LANG = BuildConfig.DEFAULT_LANG

    private val contactRepository by lazy {
        DaggerAppComponent.builder()
                .appModule(AppModule(application))
                .dataModule(DataModule(BuildConfig.DEBUG))
                .build()
                .contactRepository()
    }
    private val prefs: SharedPreferences by lazy {
        PreferenceManager.getDefaultSharedPreferences(applicationContext)
    }

    private var daysLimit: Int = 0
    private var showQuickContact: Boolean = false
    private var disableLocalization: Boolean = false
    private var contactGroupId: Long? = null

    private var needToRefreshLocalization: Boolean = false

    override fun onCreate() {
        super.onCreate()
        if (BuildConfig.DEBUG) {
            Timber.plant(Timber.DebugTree())
        }
    }

    override fun onInitialize(isReconnect: Boolean) {
{'fraction_non_alphanumeric': 0.07322857989919952, 'fraction_numerical': 0.0005929439667951378, 'mean_word_length': 3.8477011494252875, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5565201', 'n_tokens_mistral': 920, 'n_tokens_neox': 877, 'n_words': 195}