Skip to content

Commit ef28fbe

Browse files
fix. main thread freeze when using executor
1 parent 1ed9c51 commit ef28fbe

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/plugins/terminal/src/android/Executor.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ public boolean execute(String action, JSONArray args, CallbackContext callbackCo
6868
}
6969

7070
private void exec(String cmd,String alpine, CallbackContext callbackContext) {
71+
cordova.getThreadPool().execute(() -> {
7172
try {
7273
if (cmd != null && !cmd.isEmpty()) {
7374
String xcmd = cmd;
@@ -126,6 +127,7 @@ private void exec(String cmd,String alpine, CallbackContext callbackContext) {
126127
e.printStackTrace();
127128
callbackContext.error("Exception: " + e.getMessage());
128129
}
130+
});
129131
}
130132

131133
private void startProcess(String pid, String cmd,String alpine, CallbackContext callbackContext) {

www/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,17 +165,17 @@
165165

166166
<title>Acode</title>
167167
<!--styles-->
168-
<link rel="stylesheet" href="./css/build/218.css">
169-
<link rel="stylesheet" href="./css/build/32.css">
170-
<link rel="stylesheet" href="./css/build/383.css">
171-
<link rel="stylesheet" href="./css/build/53.css">
172-
<link rel="stylesheet" href="./css/build/609.css">
173168
<link rel="stylesheet" href="./css/build/about.css">
174169
<link rel="stylesheet" href="./css/build/customTheme.css">
175170
<link rel="stylesheet" href="./css/build/donate.css">
176171
<link rel="stylesheet" href="./css/build/fileBrowser.css">
177172
<link rel="stylesheet" href="./css/build/main.css">
178173
<link rel="stylesheet" href="./css/build/plugins.css">
174+
<link rel="stylesheet" href="./css/build/src_pages_quickTools_quickTools_js.css">
175+
<link rel="stylesheet" href="./css/build/src_sidebarApps_extensions_index_js.css">
176+
<link rel="stylesheet" href="./css/build/src_sidebarApps_files_index_js.css">
177+
<link rel="stylesheet" href="./css/build/src_sidebarApps_notification_index_js.css">
178+
<link rel="stylesheet" href="./css/build/src_sidebarApps_searchInFiles_index_js.css">
179179
<link rel="stylesheet" href="./css/build/themeSetting.css">
180180
<!--styles_end-->
181181
</head>

0 commit comments

Comments
 (0)