diff --git a/server/src/main/java/com/genymobile/scrcpy/Device.java b/server/src/main/java/com/genymobile/scrcpy/Device.java index b66474b7..3d83f73e 100644 --- a/server/src/main/java/com/genymobile/scrcpy/Device.java +++ b/server/src/main/java/com/genymobile/scrcpy/Device.java @@ -288,10 +288,7 @@ public final class Device { boolean allOk = true; for (long physicalDisplayId : physicalDisplayIds) { IBinder binder = SurfaceControl.getPhysicalDisplayToken(physicalDisplayId); - boolean ok = SurfaceControl.setDisplayPowerMode(binder, mode); - if (!ok) { - allOk = false; - } + allOk &= SurfaceControl.setDisplayPowerMode(binder, mode); } return allOk; }