Simplify logic in setScreenPowerMode()
Refs <https://github.com/Genymobile/scrcpy/commit/f2dee20a207b9906574d9b3d62a0ab2585dade20#r104417398> Suggested-by: brunoais <brunoaiss@gmail.com>
This commit is contained in:
@@ -288,10 +288,7 @@ public final class Device {
|
|||||||
boolean allOk = true;
|
boolean allOk = true;
|
||||||
for (long physicalDisplayId : physicalDisplayIds) {
|
for (long physicalDisplayId : physicalDisplayIds) {
|
||||||
IBinder binder = SurfaceControl.getPhysicalDisplayToken(physicalDisplayId);
|
IBinder binder = SurfaceControl.getPhysicalDisplayToken(physicalDisplayId);
|
||||||
boolean ok = SurfaceControl.setDisplayPowerMode(binder, mode);
|
allOk &= SurfaceControl.setDisplayPowerMode(binder, mode);
|
||||||
if (!ok) {
|
|
||||||
allOk = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return allOk;
|
return allOk;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user