]> glassweightruler.freedombox.rocks Git - waydroid.git/blobdiff - tools/services/hardware_manager.py
lxc: Allow shell and logcat from frozen
[waydroid.git] / tools / services / hardware_manager.py
index 45c51109a68e8fd17ba109098e716abfee7c7b4f..8d21dd04299e41bee979488a4dfb02d1e350adfb 100644 (file)
@@ -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)