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

Fix #17253

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
lolodomo 2024-08-14 13:58:45 +02:00 committed by GitHub
parent 034c03f9aa
commit d332dd41f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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;
}