Simplify logic in setScreenPowerMode()

Refs <f2dee20a20 (r104417398)>

Suggested-by: brunoais <brunoaiss@gmail.com>
This commit is contained in:
Romain Vimont 2023-03-15 19:53:40 +01:00
parent 39544f34b4
commit d7841664f4

View file

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