mirror of
https://github.com/Genymobile/scrcpy
synced 2024-12-22 15:13:17 +00:00
Do not restore power mode if --no-control
This totally disables deferred cleanup when --no-control is passed.
Refs f289d206ea
This commit is contained in:
parent
9d2e00697e
commit
c8dc1917f4
@ -19,6 +19,7 @@ public final class Server {
|
||||
private static void initAndCleanUp(Options options) {
|
||||
boolean mustDisableShowTouchesOnCleanUp = false;
|
||||
int restoreStayOn = -1;
|
||||
boolean restoreNormalPowerMode = options.getControl(); // only restore power mode if control is enabled
|
||||
if (options.getShowTouches() || options.getStayAwake()) {
|
||||
Settings settings = Device.getSettings();
|
||||
if (options.getShowTouches()) {
|
||||
@ -51,7 +52,8 @@ public final class Server {
|
||||
}
|
||||
|
||||
try {
|
||||
CleanUp.configure(options.getDisplayId(), restoreStayOn, mustDisableShowTouchesOnCleanUp, true, options.getPowerOffScreenOnClose());
|
||||
CleanUp.configure(options.getDisplayId(), restoreStayOn, mustDisableShowTouchesOnCleanUp, restoreNormalPowerMode,
|
||||
options.getPowerOffScreenOnClose());
|
||||
} catch (IOException e) {
|
||||
Ln.e("Could not configure cleanup", e);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user