From 3d8e3e28eb40cddff7f3623a7d81aff70eeaad0a Mon Sep 17 00:00:00 2001 From: SuperMonster003 Date: Wed, 21 May 2025 20:05:39 +0800 Subject: [PATCH] =?UTF-8?q?6.6.3=20-=20Alpha5=20-=20APK=20=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E7=B1=BB=E5=9E=8B=E4=BF=A1=E6=81=AF=E5=8F=8A=E5=AA=92?= =?UTF-8?q?=E4=BD=93=E6=96=87=E4=BB=B6=E7=B1=BB=E5=9E=8B=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=AF=B9=E8=AF=9D=E6=A1=86=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E6=95=88=E7=8E=87=E5=8F=8A=E4=BF=A1=E6=81=AF=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .changelog/lang_zh-Hans.json | 1 + .../extension/MaterialDialogExtensions.kt | 19 +- .../theme/app/ColorInfoDialogManager.kt | 2 +- .../ui/main/scripts/ApkInfoDialogManager.kt | 181 ++++++++++-------- .../scripts/BaseDisplayContentActivity.kt | 1 - .../ui/main/scripts/MediaInfoDialogManager.kt | 69 +++---- version.properties | 6 +- 7 files changed, 152 insertions(+), 127 deletions(-) diff --git a/.changelog/lang_zh-Hans.json b/.changelog/lang_zh-Hans.json index 557e762b..90c857b5 100644 --- a/.changelog/lang_zh-Hans.json +++ b/.changelog/lang_zh-Hans.json @@ -43,6 +43,7 @@ "已忽略更新记录及客户端模式连接地址记录支持清空操作", "版本更新信息支持多语言显示 (与当前显示语言同步)", "使用异步加载方式一定程度提升文件管理器列表滑动流畅性", + "APK 文件类型信息及媒体文件类型信息优化对话框显示效率及信息展示逻辑", "Gradle 构建脚本提升版本自适应能力 _[`discussion #369`](http://discussions.autojs6.com/369)_" ], "dependency": [ diff --git a/app/src/main/java/org/autojs/autojs/extension/MaterialDialogExtensions.kt b/app/src/main/java/org/autojs/autojs/extension/MaterialDialogExtensions.kt index 85ad1fad..838bf872 100644 --- a/app/src/main/java/org/autojs/autojs/extension/MaterialDialogExtensions.kt +++ b/app/src/main/java/org/autojs/autojs/extension/MaterialDialogExtensions.kt @@ -3,6 +3,10 @@ package org.autojs.autojs.extension import android.view.View import android.widget.TextView import com.afollestad.materialdialogs.MaterialDialog +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.launch +import kotlinx.coroutines.withContext import org.autojs.autojs.theme.ThemeColorHelper import org.autojs.autojs.util.ClipboardUtils import org.autojs.autojs.util.IntentUtils @@ -36,16 +40,23 @@ object MaterialDialogExtensions { } } - fun MaterialDialog.setCopyableTextIfAbsent(textView: TextView, f: () -> String?) { - val textValue = f.invoke() + fun MaterialDialog.setCopyableTextIfAbsent(textView: TextView, textValue: String?) { if (textView.text == context.getString(R.string.ellipsis_six)) { textView.text = textValue.takeUnless { it.isNullOrBlank() } ?: context.getString(R.string.text_unknown) } this.makeTextCopyable(textView, textValue) } - fun MaterialDialog.setCopyableText(textView: TextView, f: () -> String?) { - val textValue = f.invoke() + fun MaterialDialog.setCopyableTextIfAbsent(textView: TextView, scope: CoroutineScope, f: () -> String?) { + scope.launch(Dispatchers.IO) { + val textValue = f.invoke() + withContext(Dispatchers.Main) { + setCopyableTextIfAbsent(textView, textValue) + } + } + } + + fun MaterialDialog.setCopyableText(textView: TextView, textValue: String?) { textView.text = textValue.takeUnless { it.isNullOrBlank() } ?: context.getString(R.string.text_unknown) this.makeTextCopyable(textView, textValue) } diff --git a/app/src/main/java/org/autojs/autojs/theme/app/ColorInfoDialogManager.kt b/app/src/main/java/org/autojs/autojs/theme/app/ColorInfoDialogManager.kt index 3297f9de..6d80b1dd 100644 --- a/app/src/main/java/org/autojs/autojs/theme/app/ColorInfoDialogManager.kt +++ b/app/src/main/java/org/autojs/autojs/theme/app/ColorInfoDialogManager.kt @@ -109,7 +109,7 @@ object ColorInfoDialogManager { private suspend fun TextView.bindWith(dialog: MaterialDialog, text: String) { withContext(Dispatchers.Main) { - dialog.setCopyableText(this@bindWith) { text } + dialog.setCopyableText(this@bindWith, text) } } diff --git a/app/src/main/java/org/autojs/autojs/ui/main/scripts/ApkInfoDialogManager.kt b/app/src/main/java/org/autojs/autojs/ui/main/scripts/ApkInfoDialogManager.kt index b4d18f37..3448d257 100644 --- a/app/src/main/java/org/autojs/autojs/ui/main/scripts/ApkInfoDialogManager.kt +++ b/app/src/main/java/org/autojs/autojs/ui/main/scripts/ApkInfoDialogManager.kt @@ -2,6 +2,8 @@ package org.autojs.autojs.ui.main.scripts import android.annotation.SuppressLint import android.content.Context +import android.content.pm.PackageInfo +import android.content.pm.PackageManager import android.content.pm.PackageManager.GET_META_DATA import android.os.Build import android.view.LayoutInflater @@ -14,7 +16,11 @@ import com.afollestad.materialdialogs.MaterialDialog import com.android.apksig.ApkVerifier import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.SupervisorJob +import kotlinx.coroutines.async +import kotlinx.coroutines.cancel import kotlinx.coroutines.launch +import kotlinx.coroutines.selects.select import kotlinx.coroutines.withContext import net.dongliu.apk.parser.ApkFile import org.autojs.autojs.extension.MaterialDialogExtensions.makeSettingsLaunchable @@ -38,6 +44,10 @@ object ApkInfoDialogManager { fun showApkInfoDialog(context: Context, apkFile: File) { val binding = ApkFileInfoDialogListItemBinding.inflate(LayoutInflater.from(context)) + // Create an independent Scope for the Dialog, bind its lifecycle with the Dialog. + // zh-CN: 针对 Dialog 独立创建一个 Scope, 生命周期与 Dialog 绑定. + val scope = CoroutineScope(SupervisorJob() + Dispatchers.Main.immediate) + val apkFilePath = apkFile.absolutePath val packageManager = context.packageManager @@ -63,101 +73,118 @@ object ApkInfoDialogManager { .neutralColorRes(R.color.dialog_button_hint) .onNegative { materialDialog, _ -> materialDialog.dismiss() } .show() - - CoroutineScope(Dispatchers.Main).launch { - val packageInfo = withContext(Dispatchers.IO) { - runCatching { packageManager.getPackageArchiveInfo(apkFilePath, GET_META_DATA) }.getOrNull() + .apply { + setOnDismissListener { scope.cancel() } + makeTextCopyable { it.titleView } } - val applicationInfo = packageInfo?.applicationInfo - val packageName = packageInfo?.packageName - val versionName = packageInfo?.versionName - val versionCode = packageInfo?.let { - when { - Build.VERSION.SDK_INT >= Build.VERSION_CODES.P -> it.longVersionCode - else -> @Suppress("DEPRECATION") it.versionCode.toLong() + scope.launch { + val apkInfoDeferred = async(Dispatchers.IO) { getApkInfo(apkFile) } + val packageInfoDeferred = async(Dispatchers.IO) { getPackageInfo(packageManager, apkFilePath) } + + val firstPackageName: String? = select { + apkInfoDeferred.onAwait { it?.packageName } + packageInfoDeferred.onAwait { it?.packageName } + } + val packageName: String? = firstPackageName ?: when { + apkInfoDeferred.isCompleted -> packageInfoDeferred.await()?.packageName + else -> apkInfoDeferred.await()?.packageName + } + + // @Hint by SuperMonster003 on Nov 27, 2024. + // ! Prioritize handling "installed version" to determine whether to display its content view. + // ! This is the only content view that needs to be considered before displaying the dialog. + // ! It is now safe to display the dialog immediately as all content views have placeholders. + // ! zh-CN: + // ! 优先处理 "已安装版本", 决定是否显示其内容视图. + // ! 这是唯一一个在显示对话框之前需要考虑的内容视图. + // ! 此时可立即安全显示对话框, 因所有内容视图均已完成占位. + val installedPackageName: String? = packageName?.also { pkg -> + AppUtils.getInstalledVersionInfo(pkg)?.let { versionInfo -> + binding.installedVersionParent.isVisible = true + dialog.setCopyableTextIfAbsent( + binding.installedVersionValue, + context.getString(R.string.text_full_version_info, versionInfo.versionName, versionInfo.versionCode), + ) } } - val fileSize = withContext(Dispatchers.IO) { PFiles.getHumanReadableSize(apkFile.length()) } + restoreEssentialViews(binding, context) + updateGuidelines(binding) - val signatureScheme = withContext(Dispatchers.IO) { getApkSignatureInfo(apkFile) } + dialog.setCopyableTextIfAbsent(binding.packageNameValue, packageName) + dialog.setCopyableTextIfAbsent(binding.deviceSdkValue, "${Build.VERSION.SDK_INT}") + dialog.setCopyableTextIfAbsent(binding.fileSizeValue, this) { PFiles.getHumanReadableSize(apkFile.length()) } + dialog.setCopyableTextIfAbsent(binding.signatureSchemeValue, this) { getApkSignatureInfo(apkFile) } - withContext(Dispatchers.Main) { - // @Hint by SuperMonster003 on Nov 27, 2024. - // ! Prioritize handling "installed version" to determine whether to display its content view. - // ! This is the only content view that needs to be considered before displaying the dialog. - // ! It is now safe to display the dialog immediately as all content views have placeholders. - // ! zh-CN: - // ! 优先处理 "已安装版本", 决定是否显示其内容视图. - // ! 这是唯一一个在显示对话框之前需要考虑的内容视图. - // ! 此时可立即安全显示对话框, 因所有内容视图均已完成占位. - val installedPackageName: String? = packageName?.let { pkg -> - AppUtils.getInstalledVersionInfo(pkg)?.let { versionInfo -> - binding.installedVersionParent.isVisible = true - dialog.setCopyableTextIfAbsent(binding.installedVersionValue) { context.getString(R.string.text_full_version_info, versionInfo.versionName, versionInfo.versionCode) } - pkg /* returns as installedPackageName */ + launch(Dispatchers.IO) { + val apkInfo = apkInfoDeferred.await() + + withContext(Dispatchers.Main) { + dialog.setCopyableTextIfAbsent(binding.labelNameValue, apkInfo?.label) + dialog.setCopyableTextIfAbsent(binding.minSdkValue, apkInfo?.minSdkVersion?.toString()) + dialog.setCopyableTextIfAbsent(binding.targetSdkValue, apkInfo?.targetSdkVersion?.toString()) + + if (apkInfo != null) dialog.getActionButton(DialogAction.NEUTRAL).let { neutralButton -> + neutralButton.isVisible = true + neutralButton.text = "Manifest" + neutralButton.setOnClickListener { DisplayManifestActivity.launch(context, apkInfo.manifestXml, apkInfo.usesPermissions) } } } + } - restoreEssentialViews(binding, context) - updateGuidelines(binding) - - when { - versionName != null -> { - binding.versionPlaceholderLabel.text = context.getString(R.string.text_version) - dialog.setCopyableTextIfAbsent(binding.versionPlaceholderValue) { context.getString(R.string.text_full_version_info, versionName, versionCode) } + launch(Dispatchers.IO) { + val packageInfo = packageInfoDeferred.await() + val applicationInfo = packageInfo?.applicationInfo + val versionName = packageInfo?.versionName + val versionCode = packageInfo?.let { + when { + Build.VERSION.SDK_INT >= Build.VERSION_CODES.P -> it.longVersionCode + else -> @Suppress("DEPRECATION") it.versionCode.toLong() } - versionCode != null -> { - binding.versionPlaceholderLabel.text = context.getString(R.string.text_version_code) - dialog.setCopyableTextIfAbsent(binding.versionPlaceholderValue) { "$versionCode" } - } - else -> dialog.setCopyableTextIfAbsent(binding.versionPlaceholderValue) { null } } + withContext(Dispatchers.Main) { + when { + versionName != null -> { + binding.versionPlaceholderLabel.text = context.getString(R.string.text_version) + dialog.setCopyableTextIfAbsent( + binding.versionPlaceholderValue, + context.getString(R.string.text_full_version_info, versionName, versionCode), + ) + } + versionCode != null -> { + binding.versionPlaceholderLabel.text = context.getString(R.string.text_version_code) + dialog.setCopyableTextIfAbsent(binding.versionPlaceholderValue, "$versionCode") + } + else -> dialog.setCopyableTextIfAbsent(binding.versionPlaceholderValue, null) + } - dialog.setCopyableTextIfAbsent(binding.packageNameValue) { packageName } - dialog.setCopyableTextIfAbsent(binding.deviceSdkValue) { "${Build.VERSION.SDK_INT}" } - dialog.setCopyableTextIfAbsent(binding.fileSizeValue) { fileSize } - dialog.setCopyableTextIfAbsent(binding.signatureSchemeValue) { signatureScheme } - - dialog.setIcon(applicationInfo?.apply { - sourceDir = apkFilePath - publicSourceDir = apkFilePath - }?.loadIcon(packageManager) ?: AppCompatResources.getDrawable(context, R.drawable.ic_packaging)) - - dialog.makeSettingsLaunchable({ it.iconView }, installedPackageName) - dialog.makeTextCopyable { it.titleView } - - val apkInfo = getApkInfo(apkFile) - - dialog.setCopyableTextIfAbsent(binding.labelNameValue) { apkInfo?.label } - dialog.setCopyableTextIfAbsent(binding.packageNameValue) { apkInfo?.packageName } - dialog.setCopyableTextIfAbsent(binding.minSdkValue) { apkInfo?.minSdkVersion?.toString() } - dialog.setCopyableTextIfAbsent(binding.targetSdkValue) { apkInfo?.targetSdkVersion?.toString() } - - if (apkInfo != null) dialog.getActionButton(DialogAction.NEUTRAL).let { neutralButton -> - neutralButton.isVisible = true - neutralButton.text = "Manifest" - neutralButton.setOnClickListener { DisplayManifestActivity.launch(context, apkInfo.manifestXml, apkInfo.usesPermissions) } + dialog.setIcon(applicationInfo?.apply { + sourceDir = apkFilePath + publicSourceDir = apkFilePath + }?.loadIcon(packageManager) ?: AppCompatResources.getDrawable(context, R.drawable.ic_packaging)) + dialog.makeSettingsLaunchable({ it.iconView }, installedPackageName) } } } } - private suspend fun getApkInfo(apkFile: File): ApkInfo? = withContext(Dispatchers.IO) { - runCatching { - ApkFile(apkFile).use { parser -> - val meta = runCatching { parser.apkMeta }.getOrNull() - val label = meta?.label - val packageName = meta?.packageName - val minSdkVersion = meta?.minSdkVersion?.toIntOrNull() - val targetSdkVersion = meta?.targetSdkVersion?.toIntOrNull() - val usesPermissions = meta?.usesPermissions ?: emptyList() - val manifestXml = parser.manifestXml - ApkInfo(label, packageName, minSdkVersion, targetSdkVersion, usesPermissions, manifestXml) - } - }.getOrNull() - } + private fun getApkInfo(apkFile: File): ApkInfo? = runCatching { + ApkFile(apkFile).use { parser -> + val meta = runCatching { parser.apkMeta }.getOrNull() + val label = meta?.label + val packageName = meta?.packageName + val minSdkVersion = meta?.minSdkVersion?.toIntOrNull() + val targetSdkVersion = meta?.targetSdkVersion?.toIntOrNull() + val usesPermissions = meta?.usesPermissions ?: emptyList() + val manifestXml = parser.manifestXml + ApkInfo(label, packageName, minSdkVersion, targetSdkVersion, usesPermissions, manifestXml) + } + }.getOrNull() + + private fun getPackageInfo(packageManager: PackageManager, apkFilePath: String): PackageInfo? = runCatching { + packageManager.getPackageArchiveInfo(apkFilePath, GET_META_DATA) + }.getOrNull() private fun restoreEssentialViews(binding: ApkFileInfoDialogListItemBinding, context: Context) { listOf( diff --git a/app/src/main/java/org/autojs/autojs/ui/main/scripts/BaseDisplayContentActivity.kt b/app/src/main/java/org/autojs/autojs/ui/main/scripts/BaseDisplayContentActivity.kt index 18d2ed3b..27e0ddb0 100644 --- a/app/src/main/java/org/autojs/autojs/ui/main/scripts/BaseDisplayContentActivity.kt +++ b/app/src/main/java/org/autojs/autojs/ui/main/scripts/BaseDisplayContentActivity.kt @@ -100,7 +100,6 @@ abstract class BaseDisplayContentActivity : BaseActivity() { // ! zh-CN: 事实上, 此处依然存疑. // ! Reference: https://stackoverflow.com/questions/3866499/two-directional-scroll-view // ! - super.onTouchEvent(event) or view.onTouchEvent(event) } else -> super.onTouchEvent(event) diff --git a/app/src/main/java/org/autojs/autojs/ui/main/scripts/MediaInfoDialogManager.kt b/app/src/main/java/org/autojs/autojs/ui/main/scripts/MediaInfoDialogManager.kt index 5afa1538..28458587 100644 --- a/app/src/main/java/org/autojs/autojs/ui/main/scripts/MediaInfoDialogManager.kt +++ b/app/src/main/java/org/autojs/autojs/ui/main/scripts/MediaInfoDialogManager.kt @@ -11,8 +11,9 @@ import com.afollestad.materialdialogs.DialogAction import com.afollestad.materialdialogs.MaterialDialog import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.SupervisorJob import kotlinx.coroutines.async -import kotlinx.coroutines.awaitAll +import kotlinx.coroutines.cancel import kotlinx.coroutines.launch import kotlinx.coroutines.withContext import org.autojs.autojs.extension.MaterialDialogExtensions.makeTextCopyable @@ -35,6 +36,10 @@ object MediaInfoDialogManager { fun showMediaInfoDialog(context: Context, explorerItem: ExplorerItem) { val binding = MediaFileInfoDialogListItemBinding.inflate(LayoutInflater.from(context)) + // Create an independent Scope for the Dialog, bind its lifecycle with the Dialog. + // zh-CN: 针对 Dialog 独立创建一个 Scope, 生命周期与 Dialog 绑定. + val scope = CoroutineScope(SupervisorJob() + Dispatchers.Main.immediate) + val dialog = MaterialDialog.Builder(context) .title(explorerItem.name) .customView(binding.root, false) @@ -48,60 +53,42 @@ object MediaInfoDialogManager { .neutralText(R.string.ellipsis_six) .neutralColorRes(R.color.dialog_button_unavailable) .show() + .apply { setOnDismissListener { scope.cancel() } } - CoroutineScope(Dispatchers.Main).launch { + scope.launch { val mediaInfo = MediaInfo() val filePath = explorerItem.path - val deferredVideoFormat = async(Dispatchers.IO) { mediaInfo(filePath, VIDEO, "Format") } - val deferredAudioFormat = async(Dispatchers.IO) { mediaInfo(filePath, AUDIO, "Format") } - val deferredContainerFormat = async(Dispatchers.IO) { mediaInfo(filePath, GENERAL, "Format") } - val deferredMediaInfoTrimmed = async(Dispatchers.IO) { mediaInfo.getMediaInfoTrimmed(explorerItem.path) } + val videoFormatDeferred = async(Dispatchers.IO) { mediaInfo(filePath, VIDEO, "Format") } + val audioFormatDeferred = async(Dispatchers.IO) { mediaInfo(filePath, AUDIO, "Format") } + val containerFormatDeferred = async(Dispatchers.IO) { mediaInfo(filePath, GENERAL, "Format") } + val mediaInfoTrimmedDeferred = async(Dispatchers.IO) { mediaInfo.getMediaInfoTrimmed(explorerItem.path) } launch(Dispatchers.IO) { - mediaInfo(filePath, GENERAL, "FileSize/String").let { - binding.fileSizeValue.bindWith(dialog, it) - } - } - launch(Dispatchers.IO) { + mediaInfo(filePath, GENERAL, "FileSize/String").let { binding.fileSizeValue.bindWith(dialog, it) } mediaInfo(filePath, GENERAL, "Duration/String").let { binding.durationValue.bindWith(dialog, it) } - } - launch(Dispatchers.IO) { - mediaInfo(filePath, GENERAL, "Album").let { binding.albumValue.bindWith(dialog, it) } - } - launch(Dispatchers.IO) { - mediaInfo(filePath, GENERAL, "Track").let { binding.trackNameValue.bindWith(dialog, it) } - } - launch(Dispatchers.IO) { - mediaInfo(filePath, GENERAL, "Performer").let { binding.performerValue.bindWith(dialog, it) } - } - launch(Dispatchers.IO) { mediaInfo(filePath, AUDIO, "BitRate/String").let { binding.bitRateForAudioValue.bindWith(dialog, it) } - } - launch(Dispatchers.IO) { mediaInfo(filePath, VIDEO, "BitRate/String").let { binding.bitRateForVideoValue.bindWith(dialog, it) } - } - launch(Dispatchers.IO) { + mediaInfo(filePath, GENERAL, "Track").let { binding.trackNameValue.bindWith(dialog, it) } + mediaInfo(filePath, GENERAL, "Performer").let { binding.performerValue.bindWith(dialog, it) } + mediaInfo(filePath, GENERAL, "Album").let { binding.albumValue.bindWith(dialog, it) } + run { + val width = mediaInfo(filePath, VIDEO, "Width") + val height = mediaInfo(filePath, VIDEO, "Height") + binding.resolutionValue.bindWith(dialog, if (width.isNotEmpty() && height.isNotEmpty()) "$width × $height" else "") + } mediaInfo(filePath, VIDEO, "DisplayAspectRatio/String").let { binding.aspectRatioValue.bindWith(dialog, it) } - } - launch(Dispatchers.IO) { mediaInfo(filePath, VIDEO, "FrameRate").let { binding.frameRateValue.bindWith(dialog, it) } } - launch(Dispatchers.IO) { - val deferredVideoWidth = async(Dispatchers.IO) { mediaInfo(filePath, VIDEO, "Width") } - val deferredVideoHeight = async(Dispatchers.IO) { mediaInfo(filePath, VIDEO, "Height") } - val (width, height) = awaitAll(deferredVideoWidth, deferredVideoHeight) - binding.resolutionValue.bindWith(dialog, if (width.isNotEmpty() && height.isNotEmpty()) "$width × $height" else "") - } when { - deferredVideoFormat.await().isNotEmpty() -> { + videoFormatDeferred.await().isNotEmpty() -> { setViewsAsVideoPlaceholder(binding) dialog.setIcon(R.drawable.ic_movie) dialog.getActionButton(DialogAction.POSITIVE) setDialogPlayable(dialog, context, explorerItem) } - deferredAudioFormat.await().isNotEmpty() -> { + audioFormatDeferred.await().isNotEmpty() -> { setViewsAsMediaPlaceholder(binding) dialog.setIcon(R.drawable.ic_voice_note) setDialogPlayable(dialog, context, explorerItem) @@ -126,7 +113,7 @@ object MediaInfoDialogManager { dialog.makeTextCopyable { it.titleView } } - when (val containerFormat = deferredContainerFormat.await()) { + when (val containerFormat = containerFormatDeferred.await()) { MEDIA_INFO_ERROR_OPENING_FILE -> { dialog.setContent(MEDIA_INFO_ERROR_OPENING_FILE) dialog.getActionButton(DialogAction.NEUTRAL).let { @@ -136,12 +123,12 @@ object MediaInfoDialogManager { } else -> { containerFormat.let { binding.containerFormatValue.bindWith(dialog, it) } - deferredAudioFormat.await().let { binding.audioFormatValue.bindWith(dialog, it) } - deferredVideoFormat.await().let { binding.videoFormatValue.bindWith(dialog, it) } + audioFormatDeferred.await().let { binding.audioFormatValue.bindWith(dialog, it) } + videoFormatDeferred.await().let { binding.videoFormatValue.bindWith(dialog, it) } } } - updateDialogNeutralButton(dialog, context, deferredMediaInfoTrimmed.await()) + updateDialogNeutralButton(dialog, context, mediaInfoTrimmedDeferred.await()) } } @@ -255,7 +242,7 @@ object MediaInfoDialogManager { private suspend fun TextView.bindWith(dialog: MaterialDialog, text: String) { withContext(Dispatchers.Main) { - dialog.setCopyableText(this@bindWith) { text } + dialog.setCopyableText(this@bindWith, text) } } diff --git a/version.properties b/version.properties index 1d483a14..a040879b 100644 --- a/version.properties +++ b/version.properties @@ -1,5 +1,5 @@ -#Wed May 21 13:21:19 CST 2025 -BUILD_TIME=1747804879230 +#Wed May 21 19:59:17 CST 2025 +BUILD_TIME=1747828757164 COMPILE_SDK_VERSION=35 IMAGE_QUANT_CMAKE_VERSION=3.22.1 IMAGE_QUANT_NDK_VERSION=26.1.10909125 @@ -19,6 +19,6 @@ RAPID_OCR_OPENCV_MOBILE_LABEL_VERSION=13 RAPID_OCR_OPENCV_MOBILE_VERSION=4.5.3 TARGET_SDK_VERSION=35 TARGET_SDK_VERSION_INRT=29 -VERSION_BUILD=3240 +VERSION_BUILD=3241 VERSION_NAME=6.6.3 Alpha5 VSCODE_EXT_REQUIRED_VERSION=1.0.8