6.7.0 - Alpha17 - Fine tuning
This commit is contained in:
@@ -67,9 +67,9 @@
|
||||
"li_major_changes_new_modules": "新モジュール [ [base64](https://docs.autojs6.com/#/base64) / [crypto](https://docs.autojs6.com/#/crypto) / [sqlite](https://docs.autojs6.com/#/sqlite) / [i18n](https://docs.autojs6.com/#/i18n) / [notice](https://docs.autojs6.com/#/notice) / [ocr](https://docs.autojs6.com/#/ocr) / [opencc](https://docs.autojs6.com/#/opencc) / [qrcode](https://docs.autojs6.com/#/qrcode) / [shizuku](https://docs.autojs6.com/#/shizuku) / ... ]",
|
||||
"li_major_changes_night_mode_support": "ナイトモード対応 [ 設定ページ / ドキュメントページ / レイアウト分析ページ / 浮動ウィンドウ / ... ]",
|
||||
"li_major_changes_rhino_engine_upgrade": "[Rhino](https://github.com/mozilla/rhino/)エンジンが [v1.7.7.2](https://github.com/mozilla/rhino/releases/tag/Rhino1_7_7_2_Release) から {{ latest_rhino_engine_name_with_github_lineno_address }} ({{ var_date_rhino_engine_latest_committed }} 更新) にアップグレードされました",
|
||||
"li_major_changes_shizuku_adb_privileges_support": "[Shizuku](https://shizuku.rikka.app/introduction/)経由でADB特権を取得し, システムAPIを使用可能",
|
||||
"li_major_changes_shizuku_adb_privileges_support": "[Shizuku](https://shizuku.rikka.app/introduction/) 経由でADB特権を取得し, システムAPIを使用可能",
|
||||
"li_major_changes_theme_color_support": "テーマカラーの適応 [ グループ化 / ロケーション / 検索 / 履歴 / 明るさとコントラストの自動適応 / ... ]",
|
||||
"li_major_changes_vscode_plugin_support": "[VSCodeプラグイン](http://vscext-project.autojs6.com)がクライアント (LAN)とサーバ (LAN/ADB)接続方法をサポート",
|
||||
"li_major_changes_vscode_plugin_support": "[VSCodeプラグイン](http://vscext-project.autojs6.com)がクライアント (LAN)とサーバ (LAN/ADB) 接続方法をサポート",
|
||||
"li_major_changes_websocket_support": "[WebSocket](https://docs.autojs6.com/#/webSocketType)インスタンスの作成, および[WebSocketプロトコル](https://ja.wikipedia.org/wiki/WebSocket)に基づくネットワークリクエストの処理をサポート",
|
||||
"li_manual_documentation": "アプリケーションドキュメント",
|
||||
"li_manual_troubleshooting": "トラブルシューティング",
|
||||
@@ -83,7 +83,7 @@
|
||||
"li_rhino_feature_rhino_engine_compatibility_list": "Rhinoエンジンの[互換リスト](https://mozilla.github.io/rhino/compat/engines.html)を見る",
|
||||
"li_rhino_feature_rhino_engine_new_features": "Rhinoエンジンの[新機能](http://project.autojs6.com/blob/master/app/src/main/assets-app/doc/RHINO.md)を見る",
|
||||
"li_rhino_feature_template_strings_support": "[テンプレート文字列](https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Template_literals)のサポート",
|
||||
"li_rhino_feature_unicode_code_point_escapes_support": "Unicode [コードポイント](https://developer.mozilla.org/ja/docs/Glossary/Code_point)エスケープのサポート [補助平面](https://ja.wikipedia.org/wiki/多言語面#補助平面)文字",
|
||||
"li_rhino_feature_unicode_code_point_escapes_support": "Unicode [コードポイント](https://developer.mozilla.org/ja/docs/Glossary/Code_point)エスケープのサポート [補助平面](https://ja.wikipedia.org/wiki/多言語面#補助平面) 文字",
|
||||
"p_android_sdk_preparation_auto_sdk_location_filled": "上記の `Android SDK場所` の欄が自動的に入力され, SDKの準備が完了します",
|
||||
"p_android_sdk_preparation_edit_sdk_location": "`Android SDK場所` の欄が空白の場合は, 右側の `編集` ボタンをクリックし, 表示されるウィンドウで `次へ` ボタンを数回クリックします",
|
||||
"p_android_sdk_preparation_finish_sdk_installation": "関連するリソースのダウンロードとインストールが完了したら, `完了` ボタンをクリックします",
|
||||
@@ -133,7 +133,7 @@
|
||||
"p_jdk_preparation_jdk_max_supported_version": "{{ var_date_jdk_max_supported }} 現在, AutoJs6がサポートする最大のJDKバージョンは `{{ jdk_max_supported }}` です",
|
||||
"p_jdk_preparation_jdk_version_requirements": "AutoJs6プロジェクトが依存する `JDK (Java開発キット)` のリリースバージョンは少なくとも `{{ jdk_min_supported }}` で, それ以下のバージョンは推奨されませんが, 最低でも `{{ jdk_min_suggested }}` の使用を推奨します",
|
||||
"p_jdk_preparation_open_jdk_settings": "`Gradle JDK` の設定ページを開く (いずれかの方法)",
|
||||
"p_jdk_preparation_select_existing_jdk": "リストに適切なバージョンのJDKが存在する場合(>= `{{ jdk_min_supported }}`), それを選択してください",
|
||||
"p_jdk_preparation_select_existing_jdk": "リストに適切なバージョンのJDKが存在する場合 (>= `{{ jdk_min_supported }}`), それを選択してください",
|
||||
"p_jdk_preparation_select_gradle_jdk": "`Gradle JDK` で異なるバージョンの JDK を選択または追加できます",
|
||||
"p_languages_all_supported_for_readme": "現在の README.md ファイルは以下の言語に対応しています",
|
||||
"p_major_changes_autojs6_version_updates": "Auto.js の最終オープンソースバージョン `4.1.1 Alpha2` と比較して, AutoJs6 は以下のアップグレードまたは変更を行いました",
|
||||
|
||||
@@ -37,6 +37,7 @@ import org.autojs.autojs.execution.ScriptExecution.AbstractScriptExecution
|
||||
import org.autojs.autojs.inrt.autojs.LoopBasedJavaScriptEngineWithDecryption
|
||||
import org.autojs.autojs.runtime.ScriptRuntime
|
||||
import org.autojs.autojs.script.ScriptSource
|
||||
import org.autojs.autojs.util.IntentUtils.startSafely
|
||||
import org.autojs.autojs.util.ViewUtils
|
||||
import org.autojs.autojs6.R
|
||||
import org.mozilla.javascript.ContinuationPending
|
||||
@@ -184,10 +185,10 @@ class ScriptExecuteActivity : AppCompatActivity(), OnActivityResultDelegate.Dele
|
||||
mScriptEngine.setTag(ScriptEngine.TAG_SOURCE, mScriptSource)
|
||||
mExecutionListener!!.onStart(mScriptExecution)
|
||||
|
||||
if (isInrt) {
|
||||
(mScriptEngine as LoopBasedJavaScriptEngineWithDecryption).execute(mScriptSource, executeCallback)
|
||||
} else {
|
||||
if (!isInrt) {
|
||||
(mScriptEngine as LoopBasedJavaScriptEngine).execute(mScriptSource, executeCallback)
|
||||
} else {
|
||||
(mScriptEngine as LoopBasedJavaScriptEngineWithDecryption).execute(mScriptSource, executeCallback)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,11 +305,10 @@ class ScriptExecuteActivity : AppCompatActivity(), OnActivityResultDelegate.Dele
|
||||
@JvmStatic
|
||||
fun execute(context: Context, manager: ScriptEngineManager, task: ScriptExecutionTask): ActivityScriptExecution {
|
||||
val execution = ActivityScriptExecution(manager, task)
|
||||
val i = Intent(context, ScriptExecuteActivity::class.java)
|
||||
Intent(context, ScriptExecuteActivity::class.java)
|
||||
.putExtra(EXTRA_EXECUTION_ID, execution.id)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
.addFlags(task.config.intentFlags)
|
||||
context.startActivity(i)
|
||||
.startSafely(context)
|
||||
return execution
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import android.content.Intent
|
||||
import android.provider.Settings
|
||||
import androidx.core.net.toUri
|
||||
import org.autojs.autojs.ui.main.drawer.PermissionItemHelper
|
||||
import org.autojs.autojs.util.IntentUtils.start
|
||||
import org.autojs.autojs.util.RomUtils
|
||||
import org.autojs.autojs.util.ViewUtils
|
||||
import org.autojs.autojs6.R
|
||||
@@ -39,15 +40,14 @@ class VivoBackgroundPopupPermission(
|
||||
|
||||
val intents = listOf(
|
||||
// Vivo permission detail page (commonly works on many models).
|
||||
// zh-CN: Vivo 权限详情页(较多机型可用).
|
||||
// zh-CN: Vivo 权限详情页 (较多机型可用).
|
||||
Intent()
|
||||
.setClassName(
|
||||
"com.vivo.permissionmanager",
|
||||
"com.vivo.permissionmanager.activity.SoftPermissionDetailActivity",
|
||||
)
|
||||
.setAction("secure.intent.action.softPermissionDetail")
|
||||
.putExtra("packagename", pkg)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK),
|
||||
.putExtra("packagename", pkg),
|
||||
|
||||
// Older models may use PurviewTabActivity.
|
||||
// zh-CN: 老机型可能使用 PurviewTabActivity.
|
||||
@@ -57,8 +57,7 @@ class VivoBackgroundPopupPermission(
|
||||
"com.vivo.permissionmanager.activity.PurviewTabActivity",
|
||||
)
|
||||
.putExtra("packagename", pkg)
|
||||
.putExtra("tabId", "1")
|
||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK),
|
||||
.putExtra("tabId", "1"),
|
||||
|
||||
// Some ROMs expose a background start manager page.
|
||||
// zh-CN: 部分 ROM 暴露了后台启动管理页.
|
||||
@@ -66,8 +65,7 @@ class VivoBackgroundPopupPermission(
|
||||
.setClassName(
|
||||
"com.vivo.permissionmanager",
|
||||
"com.vivo.permissionmanager.activity.BgStartUpManagerActivity",
|
||||
)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK),
|
||||
),
|
||||
)
|
||||
|
||||
return tryStartActivities(intents) || openAppDetails()
|
||||
@@ -76,7 +74,6 @@ class VivoBackgroundPopupPermission(
|
||||
private fun openAppDetails(): Boolean = Intent()
|
||||
.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS)
|
||||
.setData("package:${context.packageName}".toUri())
|
||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
.let { tryStartActivity(it) }
|
||||
|
||||
/**
|
||||
@@ -110,7 +107,7 @@ class VivoBackgroundPopupPermission(
|
||||
|
||||
// /**
|
||||
// * Check whether this looks like a vivo/iQOO device.
|
||||
// * zh-CN: 判断是否为 vivo/iQOO 设备(经验判断).
|
||||
// * zh-CN: 判断是否为 vivo/iQOO 设备 (经验判断).
|
||||
// */
|
||||
// private fun isVivoLikeDevice(): Boolean {
|
||||
// val brand = (Build.BRAND ?: "").lowercase()
|
||||
@@ -128,7 +125,7 @@ class VivoBackgroundPopupPermission(
|
||||
private fun tryStartActivity(i: Intent): Boolean = runCatching {
|
||||
val pm = context.packageManager
|
||||
i.resolveActivity(pm) ?: return@runCatching false
|
||||
context.startActivity(i)
|
||||
i.start(context)
|
||||
true
|
||||
}.onFailure {
|
||||
it.printStackTrace()
|
||||
|
||||
@@ -7,6 +7,7 @@ import android.os.Process
|
||||
import android.provider.Settings
|
||||
import androidx.core.net.toUri
|
||||
import org.autojs.autojs.ui.main.drawer.PermissionItemHelper
|
||||
import org.autojs.autojs.util.IntentUtils.start
|
||||
import org.autojs.autojs.util.RomUtils
|
||||
import org.autojs.autojs.util.ViewUtils
|
||||
import org.autojs.autojs6.R
|
||||
@@ -46,8 +47,7 @@ class XiaomiBackgroundPopupPermission(
|
||||
"com.miui.securitycenter",
|
||||
"com.miui.permcenter.permissions.PermissionsEditorActivity",
|
||||
)
|
||||
.putExtra("extra_pkgname", pkg)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK),
|
||||
.putExtra("extra_pkgname", pkg),
|
||||
|
||||
// Some MIUI versions use AppPermissionsEditorActivity.
|
||||
// zh-CN: 部分 MIUI 版本使用 AppPermissionsEditorActivity.
|
||||
@@ -56,8 +56,7 @@ class XiaomiBackgroundPopupPermission(
|
||||
"com.miui.securitycenter",
|
||||
"com.miui.permcenter.permissions.AppPermissionsEditorActivity",
|
||||
)
|
||||
.putExtra("extra_pkgname", pkg)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK),
|
||||
.putExtra("extra_pkgname", pkg),
|
||||
)
|
||||
|
||||
return tryStartActivities(intents) || openAppDetails()
|
||||
@@ -66,12 +65,11 @@ class XiaomiBackgroundPopupPermission(
|
||||
private fun openAppDetails(): Boolean = Intent()
|
||||
.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS)
|
||||
.setData("package:${context.packageName}".toUri())
|
||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
.let { tryStartActivity(it) }
|
||||
|
||||
/**
|
||||
* Check MIUI "background start activity" app-op (commonly op=10021).
|
||||
* zh-CN: 检查 MIUI "后台启动界面" 的 AppOps 状态(常见 op=10021).
|
||||
* zh-CN: 检查 MIUI "后台启动界面" 的 AppOps 状态 (常见 op=10021).
|
||||
*/
|
||||
private fun isMiuiBgStartPermissionGranted(context: Context): Boolean {
|
||||
val ops = context.getSystemService(Context.APP_OPS_SERVICE) as? AppOpsManager ?: return true
|
||||
@@ -96,7 +94,7 @@ class XiaomiBackgroundPopupPermission(
|
||||
|
||||
// /**
|
||||
// * Check whether this looks like a Xiaomi/Redmi/POCO device.
|
||||
// * zh-CN: 判断是否为 Xiaomi/Redmi/POCO 设备(经验判断).
|
||||
// * zh-CN: 判断是否为 Xiaomi/Redmi/POCO 设备 (经验判断).
|
||||
// */
|
||||
// private fun isXiaomiLikeDevice(): Boolean {
|
||||
// val brand = (Build.BRAND ?: "").lowercase()
|
||||
@@ -114,7 +112,7 @@ class XiaomiBackgroundPopupPermission(
|
||||
private fun tryStartActivity(i: Intent): Boolean = runCatching {
|
||||
val pm = context.packageManager
|
||||
i.resolveActivity(pm) ?: return@runCatching false
|
||||
context.startActivity(i)
|
||||
i.start(context)
|
||||
true
|
||||
}.onFailure {
|
||||
it.printStackTrace()
|
||||
@@ -124,7 +122,7 @@ class XiaomiBackgroundPopupPermission(
|
||||
private companion object {
|
||||
|
||||
// MIUI app-op code for background start activity (commonly 10021).
|
||||
// zh-CN: MIUI 后台启动界面常见的 AppOps 编号(通常为 10021).
|
||||
// zh-CN: MIUI 后台启动界面常见的 AppOps 编号 (通常为 10021).
|
||||
private const val OP_BACKGROUND_START_ACTIVITY = 10021
|
||||
|
||||
}
|
||||
|
||||
@@ -113,6 +113,26 @@ class Dialogs(scriptRuntime: ScriptRuntime) : Augmentable(scriptRuntime) {
|
||||
|
||||
private val presetAnimations = listOf("default", "activity", "dialog", "inputMethod", "toast", "translucent")
|
||||
|
||||
private val customJsPropertiesForBuild: Set<String> = setOf(
|
||||
"preset",
|
||||
"inputHint",
|
||||
"inputPrefill",
|
||||
"items",
|
||||
"progress",
|
||||
"checkBoxPrompt",
|
||||
"checkBoxChecked",
|
||||
"customView",
|
||||
"stubborn",
|
||||
"theme",
|
||||
"linkify",
|
||||
"onBackKey",
|
||||
"onBackPressed",
|
||||
"dimAmount",
|
||||
"animation",
|
||||
"keepScreenOn",
|
||||
"inputSingleLine",
|
||||
)
|
||||
|
||||
@JvmStatic
|
||||
@RhinoRuntimeFunctionInterface
|
||||
fun build(scriptRuntime: ScriptRuntime, args: Array<out Any?>): JsDialog = ensureArgumentsAtMost(args, 1) { argList ->
|
||||
@@ -460,23 +480,27 @@ class Dialogs(scriptRuntime: ScriptRuntime) : Augmentable(scriptRuntime) {
|
||||
|
||||
private fun applyDialogProperty(builder: JsDialogBuilder, name: String, value: Any?) {
|
||||
when (val propertySetter = propertySetterMap[name]) {
|
||||
CVT_DEFAULT -> invokeMethod(builder, name, arrayOf(value))
|
||||
CVT_DEFAULT -> invokeJavaMethod(builder, name, arrayOf(value))
|
||||
CVT_DEFAULT_STRICT_BOOLEAN -> {
|
||||
if (value == true) {
|
||||
invokeMethod(builder, name, emptyArray())
|
||||
invokeJavaMethod(builder, name, emptyArray())
|
||||
}
|
||||
}
|
||||
CVT_COLOR_INT -> {
|
||||
val colorInt = Colors.toIntRhino(value)
|
||||
invokeMethod(builder, name, arrayOf(colorInt))
|
||||
invokeJavaMethod(builder, name, arrayOf(colorInt))
|
||||
}
|
||||
is String -> when (propertySetter) {
|
||||
in propertySetterMap -> {
|
||||
applyDialogProperty(builder, propertySetter, value)
|
||||
}
|
||||
else -> invokeMethod(builder, propertySetter, arrayOf(value))
|
||||
else -> invokeJavaMethod(builder, propertySetter, arrayOf(value))
|
||||
}
|
||||
else -> {
|
||||
if (!customJsPropertiesForBuild.contains(name)) {
|
||||
invokeJavaMethod(builder, name, arrayOf(value))
|
||||
}
|
||||
}
|
||||
else -> invokeMethod(builder, name, arrayOf(value))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -766,13 +790,13 @@ class Dialogs(scriptRuntime: ScriptRuntime) : Augmentable(scriptRuntime) {
|
||||
}
|
||||
}
|
||||
|
||||
private fun invokeMethod(builder: JsDialogBuilder, key: String, argsForMethod: Array<out Any?>) {
|
||||
private fun invokeJavaMethod(builder: JsDialogBuilder, key: String, argsForMethod: Array<out Any?>) {
|
||||
val methods = builder.javaClass.methods
|
||||
val targetMethodsForName = methods.filter {
|
||||
it.name == key
|
||||
}
|
||||
if (targetMethodsForName.isEmpty()) {
|
||||
return
|
||||
require(targetMethodsForName.isNotEmpty()) {
|
||||
"Method key \"$key\" for dialogs.build is not a valid method name"
|
||||
}
|
||||
val targetMethodsForParamCount = targetMethodsForName.filter {
|
||||
it.parameterCount == argsForMethod.size
|
||||
|
||||
@@ -2,7 +2,6 @@ package org.autojs.autojs.runtime.api.augment.shell
|
||||
|
||||
import android.util.Log
|
||||
import android.view.KeyEvent
|
||||
import androidx.annotation.IntRange
|
||||
import org.autojs.autojs.annotation.RhinoRuntimeFunctionInterface
|
||||
import org.autojs.autojs.extension.AnyExtensions.isJsNullish
|
||||
import org.autojs.autojs.extension.AnyExtensions.jsBrief
|
||||
|
||||
@@ -65,7 +65,7 @@ public class RootUtils {
|
||||
private static boolean isSuPresentFast() {
|
||||
try {
|
||||
// 1. Check common su paths.
|
||||
// zh-CN: 1. 检查常见 su 路径.
|
||||
// zh-CN: 检查常见 su 路径.
|
||||
for (String path : COMMON_SU_PATHS) {
|
||||
if (isExecutableFile(path)) {
|
||||
return true;
|
||||
@@ -73,7 +73,7 @@ public class RootUtils {
|
||||
}
|
||||
|
||||
// 2. Check su in PATH environment.
|
||||
// zh-CN: 2. 检查 PATH 环境中的 su.
|
||||
// zh-CN: 检查 PATH 环境中的 su.
|
||||
String envPath = System.getenv("PATH");
|
||||
if (envPath != null && !envPath.isEmpty()) {
|
||||
String[] paths = envPath.split(":");
|
||||
|
||||
@@ -67,6 +67,7 @@ import com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import org.autojs.autojs.app.GlobalAppContext
|
||||
import org.autojs.autojs.core.pref.Pref
|
||||
import org.autojs.autojs.runtime.ScriptRuntime
|
||||
import org.autojs.autojs.theme.ThemeColorManager
|
||||
import org.autojs.autojs.util.StringUtils.key
|
||||
import org.autojs.autojs6.R
|
||||
@@ -303,7 +304,7 @@ object ViewUtils {
|
||||
if (systemUiHeightInset in 1..maxReasonable) return systemUiHeightInset
|
||||
|
||||
// Otherwise, try to remove an estimated nav bar height (dimen only).
|
||||
// zh-CN: 否则尝试减去导航栏估值(仅 dimen), 再次校验.
|
||||
// zh-CN: 否则尝试减去导航栏估值 (仅 dimen), 再次校验.
|
||||
val navBar = getNavigationBarHeightByDimen(context, withComputedOnPreR = false).coerceAtLeast(0)
|
||||
val guess = (systemUiHeightInset - navBar).coerceAtLeast(0)
|
||||
|
||||
@@ -1155,7 +1156,11 @@ object ViewUtils {
|
||||
|
||||
@JvmStatic
|
||||
fun showSnack(view: View, stringRes: Int, isLong: Boolean) {
|
||||
Snackbar.make(view, stringRes, if (isLong) Snackbar.LENGTH_LONG else Snackbar.LENGTH_SHORT).show()
|
||||
try {
|
||||
Snackbar.make(view, stringRes, if (isLong) Snackbar.LENGTH_LONG else Snackbar.LENGTH_SHORT).show()
|
||||
} catch (e: IllegalStateException) {
|
||||
ScriptRuntime.popException(e.message)
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
@@ -1163,14 +1168,30 @@ object ViewUtils {
|
||||
|
||||
@JvmStatic
|
||||
fun showSnack(view: View, string: CharSequence, isLong: Boolean) {
|
||||
Snackbar.make(view, string, if (isLong) Snackbar.LENGTH_LONG else Snackbar.LENGTH_SHORT).show()
|
||||
try {
|
||||
Snackbar.make(view, string, if (isLong) Snackbar.LENGTH_LONG else Snackbar.LENGTH_SHORT).show()
|
||||
} catch (e: IllegalStateException) {
|
||||
ScriptRuntime.popException(e.message)
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun showSnack(view: View, stringRes: Int, duration: Int) = Snackbar.make(view, stringRes, duration).show()
|
||||
fun showSnack(view: View, stringRes: Int, duration: Int) {
|
||||
try {
|
||||
Snackbar.make(view, stringRes, duration).show()
|
||||
} catch (e: IllegalStateException) {
|
||||
ScriptRuntime.popException(e.message)
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun showSnack(view: View, string: CharSequence, duration: Int) = Snackbar.make(view, string, duration).show()
|
||||
fun showSnack(view: View, string: CharSequence, duration: Int) {
|
||||
try {
|
||||
Snackbar.make(view, string, duration).show()
|
||||
} catch (e: IllegalStateException) {
|
||||
ScriptRuntime.popException(e.message)
|
||||
}
|
||||
}
|
||||
|
||||
fun setKeepScreenOnWhenInForegroundDisabled() {
|
||||
Pref.putString(R.string.key_keep_screen_on_when_in_foreground, key(R.string.key_keep_screen_on_when_in_foreground_disabled))
|
||||
|
||||
@@ -111,8 +111,8 @@ public final class OpenCLGuard {
|
||||
// 2) Try loading (absolute path first, then loadLibrary("OpenCL")).
|
||||
// zh-CN: 2) 尝试加载 (绝对路径优先, 其次 loadLibrary("OpenCL")).
|
||||
boolean loadOk = false;
|
||||
// 2.1 Absolute path dlopen.
|
||||
// zh-CN: 2.1 绝对路径 dlopen.
|
||||
// 2.1. Absolute path dlopen.
|
||||
// zh-CN: 绝对路径 dlopen.
|
||||
if (hitPath != null) {
|
||||
try {
|
||||
System.load(hitPath);
|
||||
@@ -122,8 +122,8 @@ public final class OpenCLGuard {
|
||||
Log.i(TAG, "[OpenCL] System.load failed: " + hitPath + " -> " + t.getClass().getSimpleName());
|
||||
}
|
||||
}
|
||||
// 2.2 Regular link name.
|
||||
// zh-CN: 2.2 常规链接名.
|
||||
// 2.2. Regular link name.
|
||||
// zh-CN: 常规链接名.
|
||||
if (!loadOk) {
|
||||
try {
|
||||
System.loadLibrary("OpenCL");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#Wed Jan 21 22:51:23 CST 2026
|
||||
BUILD_TIME=1769007083119
|
||||
#Thu Jan 22 00:50:41 CST 2026
|
||||
BUILD_TIME=1769014241677
|
||||
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=3644
|
||||
VERSION_BUILD=3645
|
||||
VERSION_NAME=6.7.0 Alpha17
|
||||
VSCODE_EXT_REQUIRED_VERSION=1.0.13
|
||||
|
||||
Reference in New Issue
Block a user