No issue: Fix build breakage on erroneous lint warnings for WrongConstant: MODE_NIGHT_AUTO_BATTERY
parent
1d032bbe53
commit
fc84d3afdc
|
@ -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() {
|
private fun setDayNightTheme() {
|
||||||
when {
|
when {
|
||||||
Settings.getInstance(this).shouldUseLightTheme -> {
|
Settings.getInstance(this).shouldUseLightTheme -> {
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
package org.mozilla.fenix.settings
|
package org.mozilla.fenix.settings
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.appcompat.app.AppCompatDelegate
|
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() {
|
private fun bindAutoBatteryTheme() {
|
||||||
val keyBatteryTheme = getString(R.string.pref_key_auto_battery_theme)
|
val keyBatteryTheme = getString(R.string.pref_key_auto_battery_theme)
|
||||||
radioAutoBatteryTheme = requireNotNull(findPreference(keyBatteryTheme))
|
radioAutoBatteryTheme = requireNotNull(findPreference(keyBatteryTheme))
|
||||||
|
|
Loading…
Reference in New Issue