2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-19 09:25:34 +00:00

[fenix] No issue: Fix build breakage on erroneous lint warnings for WrongConstant: MODE_NIGHT_AUTO_BATTERY

This commit is contained in:
Colin Lee 2019-04-04 09:44:03 -05:00
parent e2f47f413e
commit f5a20ff95a
2 changed files with 5 additions and 0 deletions

View File

@ -138,6 +138,8 @@ open class FenixApplication : Application() {
}
}
@SuppressLint("WrongConstant")
// Suppressing erroneous lint warning about using MODE_NIGHT_AUTO_BATTERY, a likely library bug
private fun setDayNightTheme() {
when {
Settings.getInstance(this).shouldUseLightTheme -> {

View File

@ -4,6 +4,7 @@
package org.mozilla.fenix.settings
import android.annotation.SuppressLint
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.app.AppCompatDelegate
@ -69,6 +70,8 @@ class ThemeFragment : PreferenceFragmentCompat() {
}
}
@SuppressLint("WrongConstant")
// Suppressing erroneous lint warning about using MODE_NIGHT_AUTO_BATTERY, a likely library bug
private fun bindAutoBatteryTheme() {
val keyBatteryTheme = getString(R.string.pref_key_auto_battery_theme)
radioAutoBatteryTheme = requireNotNull(findPreference(keyBatteryTheme))