fix: Thread.interrupt() not working
This commit is contained in:
@@ -3,6 +3,7 @@ package com.stardust.autojs.core.looper;
|
||||
import android.content.pm.PackageManager;
|
||||
|
||||
import com.stardust.autojs.runtime.ScriptRuntime;
|
||||
import com.stardust.lang.ThreadCompat;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@@ -87,7 +88,7 @@ public class MainThreadProxy {
|
||||
}
|
||||
|
||||
public static boolean interrupted() {
|
||||
return Thread.interrupted();
|
||||
return ThreadCompat.interrupted();
|
||||
}
|
||||
|
||||
public boolean isInterrupted() {
|
||||
|
||||
@@ -318,7 +318,7 @@ public class ScriptRuntime {
|
||||
|
||||
public void onExit() {
|
||||
//清除interrupt状态
|
||||
Thread.interrupted();
|
||||
// Thread.interrupted();
|
||||
//悬浮窗需要第一时间关闭以免出现恶意脚本全屏悬浮窗屏蔽屏幕并且在exit中写死循环的问题
|
||||
ignoresException(floaty::closeAll);
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user