6.7.0 - Alpha15 - Fine tuning

This commit is contained in:
SuperMonster003
2026-01-17 18:25:31 +08:00
parent bbf7356ad4
commit a6542d4c71
8 changed files with 50 additions and 13 deletions

View File

@@ -4,6 +4,7 @@
"released_date": "2026/01/17",
"feature": [
"插件中心功能, 支持插件的安装/卸载/更新等操作 (入口: 主页抽屉按钮/主页标签页)",
"Paddle OCR (PP-OCRv5) 插件, 用于光学字符识别",
"cvt 模块, 用于数据单位转换 (参阅 项目文档 > [单位转换](https://docs.autojs6.com/#/cvt))",
"fmt 模块, 用于数据格式化 (参阅 项目文档 > [格式化](https://docs.autojs6.com/#/fmt))",
"zip 模块, 用于文件压缩与解压缩操作 (Ref to [Auto.js Pro](https://g.pro.autojs.org/)) (参阅 项目文档 > [Zip](https://docs.autojs6.com/#/zip))",
@@ -102,6 +103,7 @@
"构建工具启用 isCleanup[Paddle/Rapid]Ocr 配置选项时无法正常完成 Rebuild Project 任务的问题"
],
"improvement": [
"插件化 Paddle OCR (PP-OCRv3) 相关功能 _[`issue #334`](http://issues.autojs6.com/334)_ _[`issue #331`](http://issues.autojs6.com/331)_",
"runtime.loadJar 方法增强兼容性 (by [LYS86](https://github.com/LYS86)) _[`pr #475`](http://pr.autojs6.com/475)_",
"ui.getStatusBarHeight 方法/statusBarHeight 属性 (getter) 增强一定程度的兼容性",
"console.log 等方法打印全局对象 (images, app, ocr 等) 时支持显示详细信息",

View File

@@ -10,7 +10,7 @@
"android_studio_latest_recommended_file_name_of_tar": "android-studio-2025.2.3.9-linux.tar.gz",
"android_studio_latest_recommended_download_address_of_tar": "https://edgedl.me.gvt1.com/android/studio/ide-zips/2025.2.3.9/android-studio-2025.2.3.9-linux.tar.gz",
"android_studio_latest_recommended_file_size_of_tar": "1.39 GiB",
"var_date_contribution_table_data_updated": "2025/12/26",
"var_date_contribution_table_data_updated": "2026/01/17",
"latest_rhino_engine_name_with_github_lineno_address": "[v2.0.0-SNAPSHOT](http://rhino.autojs6.com/blob/master/gradle.properties#L3)",
"var_date_rhino_engine_latest_committed": "2025/12/25",
"var_date_jdk_max_supported": "%CURRENT_DATE%",

View File

@@ -37,6 +37,10 @@ class PluginCenterFragment : Fragment(R.layout.fragment_plugin_center) {
// zh-CN: 用于延迟显示空态提示的 Job.
private var emptyHintJob: Job? = null
// Job for debouncing package change refresh during replacing install/update.
// zh-CN: 用于在替换安装/更新期间对包变更刷新进行去抖的 Job.
private var pkgChangeRefreshJob: Job? = null
private var isFirstEnter: Boolean = true
// Latest full list from ViewModel (unfiltered).
@@ -300,14 +304,40 @@ class PluginCenterFragment : Fragment(R.layout.fragment_plugin_center) {
Intent.ACTION_PACKAGE_ADDED -> {
// Package installation (update) does not record "Recently installed" when replacing, but will refresh.
// zh-CN: 替换安装 (更新) 不记录 "最近安装", 但会刷新.
if (!replacing) PluginRecentStore.setLastInstalled(packageName)
vm.load(context, forceRefreshIndex = false)
if (!replacing) {
PluginRecentStore.setLastInstalled(packageName)
vm.load(context, forceRefreshIndex = false)
return
}
// Debounce refresh when replacing, to avoid transient "missing pluginInfo" state.
// zh-CN: 替换安装时对刷新做去抖, 避免短暂的 "pluginInfo 缺失" 中间态.
pkgChangeRefreshJob?.cancel()
pkgChangeRefreshJob = viewLifecycleOwner.lifecycleScope.launch {
delay(1500L)
if (isAdded && _binding != null) {
vm.load(context, forceRefreshIndex = false)
}
}
}
Intent.ACTION_PACKAGE_REMOVED -> {
// Package uninstallation (pre-update phase) does not record "Recently uninstalled" when replacing.
// zh-CN: 替换卸载 (更新前阶段) 不记录 "最近卸载".
if (!replacing) PluginRecentStore.setLastUninstalled(packageName)
vm.load(context, forceRefreshIndex = false)
if (!replacing) {
PluginRecentStore.setLastUninstalled(packageName)
vm.load(context, forceRefreshIndex = false)
return
}
// Debounce refresh when replacing, to avoid transient "missing pluginInfo" state.
// zh-CN: 替换卸载时对刷新做去抖, 避免短暂的 "pluginInfo 缺失" 中间态.
pkgChangeRefreshJob?.cancel()
pkgChangeRefreshJob = viewLifecycleOwner.lifecycleScope.launch {
delay(1500L)
if (isAdded && _binding != null) {
vm.load(context, forceRefreshIndex = false)
}
}
}
}
}
@@ -323,6 +353,8 @@ class PluginCenterFragment : Fragment(R.layout.fragment_plugin_center) {
override fun onStop() {
super.onStop()
pkgChangeRefreshJob?.cancel()
pkgChangeRefreshJob = null
pkgReceiver?.let { runCatching { requireContext().unregisterReceiver(it) } }
pkgReceiver = null
}
@@ -340,6 +372,8 @@ class PluginCenterFragment : Fragment(R.layout.fragment_plugin_center) {
super.onDestroyView()
emptyHintJob?.cancel()
emptyHintJob = null
pkgChangeRefreshJob?.cancel()
pkgChangeRefreshJob = null
_binding = null
}

View File

@@ -109,7 +109,7 @@ object PaddleOcrPluginHost {
): Discovered? {
val list = discover(context)
.filter { it.pluginInfo != null }
.filter { PluginEnableStore.isEnabled(context, it.serviceInfo.packageName, false) }
.filter { PluginEnableStore.isEnabled(context, it.serviceInfo.packageName, true) }
if (list.isEmpty()) return null
if (engineId != null) {
list.firstOrNull { d -> d.pluginInfo?.id == engineId }?.let { return it }

View File

@@ -38,7 +38,7 @@
<LinearLayout
android:id="@+id/title_container"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:minHeight="43dp"
android:layout_toEndOf="@+id/icon_container"
android:layout_toStartOf="@id/sw"

View File

@@ -1,4 +1,5 @@
#Thu Oct 30 10:26:35 GMT+8 2025
#Sat Jan 17 18:01:00 GMT+8 2026
9.3.0=2.2.21
9.2.0=2.2.20
9.0.0=2.2.0
8.12=2.0.21

View File

@@ -1,7 +1,7 @@
#Mon Dec 22 12:46:26 GMT+8 2025
#Sat Jan 17 18:00:52 GMT+8 2026
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME

View File

@@ -1,5 +1,5 @@
#Sat Jan 17 15:22:28 CST 2026
BUILD_TIME=1768634548657
#Sat Jan 17 18:13:03 CST 2026
BUILD_TIME=1768644783702
COMPILE_SDK_VERSION=36
IMAGE_QUANT_CMAKE_VERSION=3.22.1
IMAGE_QUANT_NDK_VERSION=26.1.10909125
@@ -27,6 +27,6 @@ RAPID_OCR_OPENCV_MOBILE_LABEL_VERSION=13
RAPID_OCR_OPENCV_MOBILE_VERSION=4.5.3
TARGET_SDK_VERSION=36
TARGET_SDK_VERSION_INRT=29
VERSION_BUILD=3623
VERSION_BUILD=3624
VERSION_NAME=6.7.0 Alpha15
VSCODE_EXT_REQUIRED_VERSION=1.0.13