From f48187d77a889c146324442655158d132fdc1114 Mon Sep 17 00:00:00 2001 From: darrenyuen <1061581881@qq.com> Date: Wed, 7 May 2025 14:44:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=A7=A3=E5=86=B3=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E5=88=86=E5=8F=91=E7=BA=BF=E7=A8=8B=E8=AE=BF=E9=97=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../codelocator/action/InstallApkMenuAction.kt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/CodeLocatorPlugin/src/main/java/com/bytedance/tools/codelocator/action/InstallApkMenuAction.kt b/CodeLocatorPlugin/src/main/java/com/bytedance/tools/codelocator/action/InstallApkMenuAction.kt index 7c0a500..256172a 100644 --- a/CodeLocatorPlugin/src/main/java/com/bytedance/tools/codelocator/action/InstallApkMenuAction.kt +++ b/CodeLocatorPlugin/src/main/java/com/bytedance/tools/codelocator/action/InstallApkMenuAction.kt @@ -24,12 +24,14 @@ class InstallApkMenuAction : AnAction() { } override fun update(e: AnActionEvent) { - var virtualFile = e.getData(PlatformDataKeys.VIRTUAL_FILE) - val presentation: Presentation = e.presentation - presentation.isVisible = - (virtualFile != null && !(virtualFile!!.isDirectory || !virtualFile!!.name.endsWith("apk"))) - presentation.text = ResUtils.getString("install_apk_file") - presentation.description = ResUtils.getString("install_apk_file") + ApplicationManager.getApplication().executeOnPooledThread { + var virtualFile = e.getData(PlatformDataKeys.VIRTUAL_FILE) + val presentation: Presentation = e.presentation + presentation.isVisible = + (virtualFile != null && !(virtualFile!!.isDirectory || !virtualFile!!.name.endsWith("apk"))) + presentation.text = ResUtils.getString("install_apk_file") + presentation.description = ResUtils.getString("install_apk_file") + } } } \ No newline at end of file