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>
pr1670
brunoais 4 years ago committed by Romain Vimont
parent 0c5e0a4f6d
commit 0bf110dd5c

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

Loading…
Cancel
Save