6.7.0 - Alpha13 - Fine tuning

This commit is contained in:
SuperMonster003
2025-12-30 13:40:25 +08:00
parent be2860b90b
commit 0d37b9e5ee
6 changed files with 15 additions and 12 deletions

View File

@@ -26,6 +26,7 @@
"structuredClone 全局方法, 用于深拷贝 JavaScript 对象 (参阅 [MDN](https://developer.mozilla.org/zh-CN/docs/Web/API/Window/structuredClone))",
"等价系列选择器 (UiSelector#id/text/...) 及包含系列选择器 (UiSelector#xxxContains) 支持正则表达式参数",
"选择器的正则表达式参数支持使用标志 (i, m, s, u)",
"正则表达式支持后瞻断言语法 _[`issue #464`](http://issues.autojs6.com/464)_",
"设置页面增加 \"Java 原始类型包装\" 设置选项 _[`issue #435`](http://issues.autojs6.com/435)_",
"设置页面增加 \"定时任务调度引擎\" 设置选项, 支持 AlarmManager/WorkManager/JobScheduler _[`issue #457`](http://issues.autojs6.com/457)_ _[`issue #388`](http://issues.autojs6.com/388)_ _[`issue #163`](http://issues.autojs6.com/163)_ _[`issue #53`](http://issues.autojs6.com/53)_ _[`issue #21`](http://issues.autojs6.com/21)_",
"设置页面增加 \"应用启动器图标\" 设置选项, 支持自适应图标/透明背景图标 _[`issue #405`](http://issues.autojs6.com/405)_",

View File

@@ -25,8 +25,8 @@ public class Database extends SQLiteOpenHelper implements Closeable {
private final ScriptRuntime mScriptRuntime;
private final TypeAdapter mTypeAdapter;
public Database(@NonNull Context context, @NonNull ScriptRuntime scriptRuntime, @NonNull String name, int version, boolean readable, @Nullable DatabaseCallback databaseCallback, @NonNull TypeAdapter typeAdapter) {
super(context, scriptRuntime.files.nonNullPath(name), null, version, databaseCallback == null ? null : new DatabaseErrorHandlerWrapper(databaseCallback));
public Database(@NonNull Context context, @NonNull ScriptRuntime scriptRuntime, @NonNull String databaseFilePath, int version, boolean readable, @Nullable DatabaseCallback databaseCallback, @NonNull TypeAdapter typeAdapter) {
super(context, scriptRuntime.files.nonNullPath(databaseFilePath), null, version, databaseCallback == null ? null : new DatabaseErrorHandlerWrapper(databaseCallback));
mTypeAdapter = typeAdapter;
mCallback = databaseCallback;
mScriptRuntime = scriptRuntime;

View File

@@ -18,8 +18,8 @@ import org.mozilla.javascript.NativeObject
class SQLite(private val context: Context, private val scriptRuntime: ScriptRuntime) {
fun open(name: String, version: Int, readOnly: Boolean, callback: Database.DatabaseCallback?): Database {
return Database(context, scriptRuntime, name, version, readOnly, callback, TypeAdapterImpl())
fun open(databaseFilePath: String, version: Int, readOnly: Boolean, callback: Database.DatabaseCallback?): Database {
return Database(context, scriptRuntime, databaseFilePath, version, readOnly, callback, TypeAdapterImpl())
}
private class TypeAdapterImpl : Database.TypeAdapter {

View File

@@ -36,10 +36,10 @@ class SQLite(private val scriptRuntime: ScriptRuntime) : Augmentable(scriptRunti
@JvmStatic
@RhinoRuntimeFunctionInterface
fun open(scriptRuntime: ScriptRuntime, args: Array<out Any?>): Database = ensureArgumentsLengthInRange(args, 1..3) { argList ->
val (name, options, callback) = argList
val (databaseFilePath, options, callback) = argList
val niceName = coerceString(name, "")
require(niceName.isNotEmpty()) { "Argument name of sqlite.open() must not be empty" }
val filePath = coerceString(databaseFilePath, "")
require(filePath.isNotEmpty()) { "Argument databaseFilePath of sqlite.open() must not be empty" }
val niceOptions = if (options.isJsNullish()) newNativeObject() else options
require(niceOptions is NativeObject) { "Argument \"options\" ${options.jsBrief()} for sqlite.open() must be a JavaScript Object" }
@@ -48,7 +48,7 @@ class SQLite(private val scriptRuntime: ScriptRuntime) : Augmentable(scriptRunti
require(niceCallback is DatabaseCallback?) { "Argument \"callback\" ${callback.jsBrief()} for sqlite.open() must be a DatabaseCallback" }
scriptRuntime.sqlite.open(
name = niceName,
databaseFilePath = filePath,
version = niceOptions.inquire("version", ::coerceIntNumber, DEFAULT_VERSION),
readOnly = niceOptions.inquire("readOnly", ::coerceBoolean, DEFAULT_READ_ONLY),
callback = niceCallback,

View File

@@ -1,6 +1,6 @@
#Sun Dec 21 20:53:47 GMT+8 2025
9.1.0-alpha01
9.0.0-rc01
#Tue Dec 30 10:52:45 GMT+8 2025
9.1.0-alpha02
9.0.0-rc02
8.13.2
8.12.3
8.11.2

View File

@@ -1,5 +1,7 @@
#Wed Dec 24 13:29:17 GMT+8 2025
#Tue Dec 30 10:51:57 GMT+8 2025
253.29346.138.2531.14643844=2025.3.1.2
253.28294.334.2531.14612490=2025.3.1.1
252.28238.7.2523.14636682=2025.2.3.7
252.28238.7.2523.14608894=2025.2.3.6
252.28238.7.2523.14575018=2025.2.3.5
252.28238.7.2523.14542061=2025.2.3.4