mirror of
https://github.com/TonyJiangWJ/Auto.js.git
synced 2026-06-12 21:01:32 +08:00
优化部分代码
This commit is contained in:
parent
1a2612ba86
commit
8efb74eae0
@ -424,6 +424,7 @@ public class ScriptRuntime {
|
||||
});
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
ignoresException(images::releaseScreenCapturer);
|
||||
ignoresException(images::recycle);
|
||||
}
|
||||
ignoresException(sensors::unregisterAll);
|
||||
ignoresException(timers::recycle);
|
||||
|
||||
@ -267,7 +267,6 @@ public class Images {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && mScreenCapturer != null) {
|
||||
mScreenCapturer.release();
|
||||
}
|
||||
mScriptRuntime = null;
|
||||
}
|
||||
|
||||
public Point findImage(ImageWrapper image, ImageWrapper template) {
|
||||
@ -366,4 +365,8 @@ public class Images {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void recycle() {
|
||||
mScriptRuntime = null;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
include ':app', ':automator', ':common', ':autojs', ':inrt', ':autojs-tool-color-center'
|
||||
include ':autojs-tool-download'
|
||||
include ':autojs-tool-webview'
|
||||
include ':autojs-tool-encrypt'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user