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:
parent
0c5e0a4f6d
commit
0bf110dd5c
1 changed files with 3 additions and 1 deletions
|
@ -78,7 +78,9 @@ public final class CleanUp {
|
||||||
|
|
||||||
if (restoreNormalPowerMode) {
|
if (restoreNormalPowerMode) {
|
||||||
Ln.i("Restoring normal power mode");
|
Ln.i("Restoring normal power mode");
|
||||||
|
if (Device.isScreenOn()) {
|
||||||
Device.setScreenPowerMode(Device.POWER_MODE_NORMAL);
|
Device.setScreenPowerMode(Device.POWER_MODE_NORMAL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue