Add torch brightness level support for Android 13+

This commit is contained in:
darthpaul
2022-10-23 09:03:16 +01:00
parent dc66f8bd66
commit cea57e9db0
6 changed files with 85 additions and 4 deletions

View File

@ -40,4 +40,8 @@ class Config(context: Context) : BaseConfig(context) {
var forcePortraitMode: Boolean
get() = prefs.getBoolean(FORCE_PORTRAIT_MODE, true)
set(forcePortraitMode) = prefs.edit().putBoolean(FORCE_PORTRAIT_MODE, forcePortraitMode).apply()
var brightnessLevel: Int
get() = prefs.getInt(BRIGHTNESS_LEVEL, DEFAULT_BRIGHTNESS_LEVEL)
set(brightnessLevel) = prefs.edit().putInt(BRIGHTNESS_LEVEL, brightnessLevel).apply()
}