update 总是跳回应用

This commit is contained in:
gallonyin
2023-05-12 09:59:33 +08:00
parent 359dbcde91
commit 21fb01a762

View File

@@ -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) {