package bou.amine.apps.readerforselfossv2.service

import com.russhwolf.settings.Settings

// This will be used in ACRA process. For now, it does nothing.
// This is to fix ACRA not sending reports anymore.
// See https://www.acra.ch/docs/Troubleshooting-Guide#applicationoncreate
class ACRASettings : Settings {
    override val keys: Set<String> = emptySet()
    override val size: Int = 0

    override fun clear() {
        // Nothing
    }

    override fun getBoolean(
        key: String,
        defaultValue: Boolean,
    ): Boolean = false

    override fun getBooleanOrNull(key: String): Boolean? = null

    override fun getDouble(
        key: String,
        defaultValue: Double,
    ): Double = 0.0

    override fun getDoubleOrNull(key: String): Double? = null

    override fun getFloat(
        key: String,
        defaultValue: Float,
    ): Float = 0.0F

    override fun getFloatOrNull(key: String): Float? = null

    override fun getInt(
        key: String,
        defaultValue: Int,
    ): Int = 0

    override fun getIntOrNull(key: String): Int? = null

    override fun getLong(
        key: String,
        defaultValue: Long,
    ): Long = 0

    override fun getLongOrNull(key: String): Long? = null

    override fun getString(
        key: String,
        defaultValue: String,
    ): String = "0"

    override fun getStringOrNull(key: String): String? = null

    override fun hasKey(key: String): Boolean = false

    override fun putBoolean(
        key: String,
        value: Boolean,
    ) {
        // Nothing
    }

    override fun putDouble(
        key: String,
        value: Double,
    ) {
        // Nothing
    }

    override fun putFloat(
        key: String,
        value: Float,
    ) {
        // Nothing
    }

    override fun putInt(
        key: String,
        value: Int,
    ) {
        // Nothing
    }

    override fun putLong(
        key: String,
        value: Long,
    ) {
        // Nothing
    }

    override fun putString(
        key: String,
        value: String,
    ) {
        // Nothing
    }

    override fun remove(key: String) {
        // Nothing
    }
}
