X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/waydroid.git/blobdiff_plain/e074cf4f8d4a1dabd6767306fbf51d25de90ebc4..cca8af2d7d3494d887d9655f8e78244b5a2ca513:/tools/services/hardware_manager.py diff --git a/tools/services/hardware_manager.py b/tools/services/hardware_manager.py index 45c5110..8d21dd0 100644 --- a/tools/services/hardware_manager.py +++ b/tools/services/hardware_manager.py @@ -3,6 +3,8 @@ import logging import threading import tools.actions.container_manager +import tools.actions.session_manager +import tools.config from tools import helpers from tools.interfaces import IHardware @@ -16,7 +18,11 @@ def start(args): logging.debug("Function enableBluetooth not implemented") def suspend(): - tools.actions.container_manager.freeze(args) + cfg = tools.config.load(args) + if cfg["waydroid"]["suspend_action"] == "stop": + tools.actions.session_manager.stop(args) + else: + tools.actions.container_manager.freeze(args) def reboot(): helpers.lxc.stop(args)