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
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)
helpers.images.umount_rootfs(args)
helpers.images.replace(args, system_zip, system_time,
vendor_zip, vendor_time)
- helpers.images.mount_rootfs(args, args.images_path)
+ helpers.images.mount_rootfs(args, args.images_path, args.session)
helpers.protocol.set_aidl_version(args)
helpers.lxc.start(args)