diff --git a/app/src/main/java/org/yameida/worktool/service/GlobalMethod.kt b/app/src/main/java/org/yameida/worktool/service/GlobalMethod.kt index fd2d506..4dfd5b6 100644 --- a/app/src/main/java/org/yameida/worktool/service/GlobalMethod.kt +++ b/app/src/main/java/org/yameida/worktool/service/GlobalMethod.kt @@ -126,15 +126,13 @@ fun getRoot(ignoreCheck: Boolean): AccessibilityNodeInfo { WeworkController.weworkService.currentPackage = root.packageName?.toString() ?: "" if (System.currentTimeMillis() % 30 == 0L) { error("当前不在企业微信: ${root.packageName}") - if (!root.packageName.contains("worktool")) { - if (!FloatWindowHelper.isPause) { - ToastUtils.show("当前不在企业微信: ${root.packageName}\n尝试跳转到企业微信") - Utils.getApp().packageManager.getLaunchIntentForPackage(Constant.PACKAGE_NAMES) - ?.apply { - this.flags = Intent.FLAG_ACTIVITY_NEW_TASK - Utils.getApp().startActivity(this) - } - } + if (!FloatWindowHelper.isPause) { + ToastUtils.show("当前不在企业微信: ${root.packageName}\n尝试跳转到企业微信") + Utils.getApp().packageManager.getLaunchIntentForPackage(Constant.PACKAGE_NAMES) + ?.apply { + this.flags = Intent.FLAG_ACTIVITY_NEW_TASK + Utils.getApp().startActivity(this) + } } } if (ignoreCheck) {