Reset power mode only if screen is on
PR #1670 <https://github.com/Genymobile/scrcpy/pull/1670> Signed-off-by: Romain Vimont <rom@rom1v.com>
This commit is contained in:
@@ -78,7 +78,9 @@ public final class CleanUp {
|
||||
|
||||
if (restoreNormalPowerMode) {
|
||||
Ln.i("Restoring normal power mode");
|
||||
Device.setScreenPowerMode(Device.POWER_MODE_NORMAL);
|
||||
if (Device.isScreenOn()) {
|
||||
Device.setScreenPowerMode(Device.POWER_MODE_NORMAL);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user