Simplify logic in setScreenPowerMode()
Refs <f2dee20a20 (r104417398)
>
Suggested-by: brunoais <brunoaiss@gmail.com>
This commit is contained in:
parent
39544f34b4
commit
d7841664f4
1 changed files with 1 additions and 4 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue