From 0d37b9e5ee9b0afb9ce727d68cf227faaad53fdf Mon Sep 17 00:00:00 2001 From: SuperMonster003 Date: Tue, 30 Dec 2025 13:40:25 +0800 Subject: [PATCH] 6.7.0 - Alpha13 - Fine tuning --- .changelog/lang_zh-Hans.json | 1 + .../java/org/autojs/autojs/core/database/Database.java | 4 ++-- app/src/main/java/org/autojs/autojs/runtime/api/SQLite.kt | 4 ++-- .../autojs/autojs/runtime/api/augment/sqlite/SQLite.kt | 8 ++++---- gradle/data/agp-releases.list | 6 +++--- gradle/data/android-studio-build-version.properties | 4 +++- 6 files changed, 15 insertions(+), 12 deletions(-) diff --git a/.changelog/lang_zh-Hans.json b/.changelog/lang_zh-Hans.json index 6e918e05..d8891414 100644 --- a/.changelog/lang_zh-Hans.json +++ b/.changelog/lang_zh-Hans.json @@ -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)_", diff --git a/app/src/main/java/org/autojs/autojs/core/database/Database.java b/app/src/main/java/org/autojs/autojs/core/database/Database.java index 7a6957d8..256b64f3 100644 --- a/app/src/main/java/org/autojs/autojs/core/database/Database.java +++ b/app/src/main/java/org/autojs/autojs/core/database/Database.java @@ -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; diff --git a/app/src/main/java/org/autojs/autojs/runtime/api/SQLite.kt b/app/src/main/java/org/autojs/autojs/runtime/api/SQLite.kt index 43b6b118..bbe06c61 100644 --- a/app/src/main/java/org/autojs/autojs/runtime/api/SQLite.kt +++ b/app/src/main/java/org/autojs/autojs/runtime/api/SQLite.kt @@ -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 { diff --git a/app/src/main/java/org/autojs/autojs/runtime/api/augment/sqlite/SQLite.kt b/app/src/main/java/org/autojs/autojs/runtime/api/augment/sqlite/SQLite.kt index 0abddbe6..2c201db5 100644 --- a/app/src/main/java/org/autojs/autojs/runtime/api/augment/sqlite/SQLite.kt +++ b/app/src/main/java/org/autojs/autojs/runtime/api/augment/sqlite/SQLite.kt @@ -36,10 +36,10 @@ class SQLite(private val scriptRuntime: ScriptRuntime) : Augmentable(scriptRunti @JvmStatic @RhinoRuntimeFunctionInterface fun open(scriptRuntime: ScriptRuntime, args: Array): 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, diff --git a/gradle/data/agp-releases.list b/gradle/data/agp-releases.list index 4a7a365d..dd3cff2a 100644 --- a/gradle/data/agp-releases.list +++ b/gradle/data/agp-releases.list @@ -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 diff --git a/gradle/data/android-studio-build-version.properties b/gradle/data/android-studio-build-version.properties index 09f14719..46e0c106 100644 --- a/gradle/data/android-studio-build-version.properties +++ b/gradle/data/android-studio-build-version.properties @@ -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