[freeboxos] Avoid a call to the lcd API when no required (#17254)

Fix #17253

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This commit is contained in:
lolodomo 2024-08-14 13:58:45 +02:00 committed by Ciprian Pascu
parent a03803c947
commit afdaf4e5e2

View File

@ -47,18 +47,17 @@ public class RevolutionHandler extends ServerHandler {
@Override
protected boolean internalHandleCommand(String channelId, Command command) throws FreeboxException {
LcdManager manager = getManager(LcdManager.class);
Config config = manager.getConfig();
switch (channelId) {
case LCD_BRIGHTNESS:
setBrightness(manager, config, command);
setBrightness(manager, manager.getConfig(), command);
internalPoll();
return true;
case LCD_ORIENTATION:
setOrientation(manager, config, command);
setOrientation(manager, manager.getConfig(), command);
internalPoll();
return true;
case LCD_FORCED:
setForced(manager, config, command);
setForced(manager, manager.getConfig(), command);
internalPoll();
return true;
}