Device:Android: always call "_decideFrontlightState" in "setIntensityHW" (#10737)

re https://github.com/koreader/koreader/pull/10731#discussion_r1271505121

This PR changes so that androids implementation of `setIntensityHW` always calls `_decideFrontlightState`
This commit is contained in:
hasezoey
2023-10-12 15:05:20 +02:00
committed by GitHub
parent ff6ee69753
commit ee7a6455ce
2 changed files with 1 additions and 1 deletions

View File

@@ -516,7 +516,6 @@ function Device:_showLightDialog()
elseif action == C.ALIGHTS_DIALOG_CANCEL then
logger.dbg("Dialog Cancel, brightness: " .. self.powerd.fl_intensity)
self.powerd:setIntensityHW(self.powerd.fl_intensity)
self.powerd:_decideFrontlightState()
if android.isWarmthDevice() then
logger.dbg("Dialog Cancel, warmth: " .. self.powerd.fl_warmth)
self.powerd:setWarmth(self.powerd.fl_warmth)

View File

@@ -16,6 +16,7 @@ function AndroidPowerD:setIntensityHW(intensity)
self.fl_intensity = intensity
android.setScreenBrightness(math.floor(intensity * self.bright_diff / self.fl_max))
self:_decideFrontlightState()
end
function AndroidPowerD:init()