From a1af24be474f763d4f543ed416abc304047a0ebe Mon Sep 17 00:00:00 2001 From: lollipopkit Date: Thu, 1 Feb 2024 17:31:04 +0800 Subject: [PATCH] fix: empty disk list on busybox --- lib/data/model/app/shell_func.dart | 2 +- lib/view/page/ssh/page.dart | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/data/model/app/shell_func.dart b/lib/data/model/app/shell_func.dart index ab4658c9..b4636e1e 100644 --- a/lib/data/model/app/shell_func.dart +++ b/lib/data/model/app/shell_func.dart @@ -214,7 +214,7 @@ const _statusCmds = [ 'cat /proc/stat | grep cpu', 'uptime', 'cat /proc/net/snmp', - 'df -B 1K', + 'df', "cat /proc/meminfo | grep -E 'Mem|Swap'", 'cat /sys/class/thermal/thermal_zone*/type', 'cat /sys/class/thermal/thermal_zone*/temp', diff --git a/lib/view/page/ssh/page.dart b/lib/view/page/ssh/page.dart index 472447ea..cdb75ad3 100644 --- a/lib/view/page/ssh/page.dart +++ b/lib/view/page/ssh/page.dart @@ -437,9 +437,9 @@ class _SSHPageState extends State with AutomaticKeepAliveClientMixin { bool get wantKeepAlive => true; Future _initService() async { - final service = FlutterBackgroundService(); + if (!isAndroid) return; - await service.configure( + await FlutterBackgroundService().configure( androidConfiguration: AndroidConfiguration( onStart: _onStart, autoStart: true,